.wpfd-files-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.wpfd-files-container * {
    box-sizing: border-box;
}

.wpfd-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #e2e2e2;
    border-radius: 6px 6px 0 0;
}

.wpfd-files-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpfd-files-header h3 svg {
    width: 20px;
    height: 20px;
    fill: #c0a062;
}

.wpfd-files-count {
    font-size: 12px;
    color: #999;
}

.wpfd-files-search {
    padding: 8px 16px;
    border: 1px solid #e2e2e2;
    border-top: none;
    background: #fff;
}

.wpfd-files-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.wpfd-files-search input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.wpfd-files-body {
    border: 1px solid #e2e2e2;
    border-top: none;
}

.wpfd-theme-grid .wpfd-files-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 16px;
}

.wpfd-theme-list .wpfd-files-body {
    padding: 0;
}

.wpfd-theme-list .wpfd-file-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.wpfd-theme-list .wpfd-file-row:hover {
    background: #fafafa;
}

.wpfd-theme-list .wpfd-file-row:last-child {
    border-bottom: none;
}

.wpfd-theme-table .wpfd-files-body {
    padding: 0;
}

.wpfd-theme-table table {
    width: 100%;
    border-collapse: collapse;
}

.wpfd-theme-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fafafa;
    border-bottom: 2px solid #eee;
}

.wpfd-theme-table td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.wpfd-theme-table tr:hover td {
    background: #fafafa;
}

.wpfd-file-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.wpfd-file-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.wpfd-file-ext-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.wpfd-file-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #23282d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.wpfd-file-card-meta {
    font-size: 11px;
    color: #999;
}

.wpfd-file-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
}

.wpfd-file-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #23282d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpfd-file-size {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

.wpfd-file-dl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #0073aa;
    text-decoration: none;
    white-space: nowrap;
}

.wpfd-file-dl:hover {
    color: #005a87;
    text-decoration: underline;
}

.wpfd-file-dl svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.wpfd-files-footer {
    padding: 10px 16px;
    border: 1px solid #e2e2e2;
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: #fafafa;
    text-align: center;
}

.wpfd-dl-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.wpfd-dl-all:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

.wpfd-dl-all svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.ext-pdf { background: #e74c3c; }
.ext-doc, .ext-docx { background: #2980b9; }
.ext-xls, .ext-xlsx { background: #27ae60; }
.ext-ppt, .ext-pptx { background: #e67e22; }
.ext-jpg, .ext-jpeg, .ext-png, .ext-gif, .ext-webp, .ext-svg, .ext-bmp { background: #9b59b6; }
.ext-zip, .ext-rar, .ext-tar, .ext-gz, .ext-7z { background: #f39c12; }
.ext-txt, .ext-csv { background: #7f8c8d; }
.ext-mp3, .ext-wav, .ext-ogg { background: #1abc9c; }
.ext-mp4, .ext-avi, .ext-mov, .ext-wmv { background: #e91e63; }
.ext-default { background: #95a5a6; }

.wpfd-empty {
    text-align: center;
    padding: 40px 20px;
    color: #ccc;
}

.wpfd-empty svg {
    width: 48px;
    height: 48px;
    fill: #ddd;
}

.wpfd-empty p {
    color: #999;
    font-size: 14px;
}

/* Accordion Styles */
.wpfd-accordion-wrapper {
    margin-top: 15px;
    font-family: inherit;
}

.wpfd-accordion-section {
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 0;
}

.wpfd-accordion-header {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    list-style: none; /* remove native triangle */
}

/* Remove Safari/Webkit native triangle */
.wpfd-accordion-header::-webkit-details-marker {
    display: none;
}

.wpfd-accordion-header::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 12px;
    font-weight: bold;
    font-size: 18px;
    color: #000;
}

.wpfd-accordion-section[open] > .wpfd-accordion-header::before {
    content: '-';
}

.wpfd-path {
    flex: 1;
}

.wpfd-accordion-content {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}
