/* ── FGC Member Documents – Frontend Styles ──────────────────────────────── */

.fgc-md-library {
    font-family: inherit;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */

.fgc-md-notice {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}

.fgc-md-not-logged-in {
    background: #f0f6ff;
    border: 1px solid #b0cfee;
    color: #1a4f7a;
}

.fgc-md-access-denied {
    background: #fff5f5;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.fgc-md-notice p { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */

.fgc-md-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.fgc-md-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    transition: color .15s;
}

.fgc-md-breadcrumb a:hover { color: #1d4ed8; text-decoration: underline; }

.fgc-md-sep { color: #d1d5db; }

/* ── Folder Header ───────────────────────────────────────────────────────── */

.fgc-md-folder-header {
    margin-bottom: 24px;
}

.fgc-md-folder-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fgc-md-folder-header h2 .fas { color: #f59e0b; }

.fgc-md-folder-desc {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ── Section ─────────────────────────────────────────────────────────────── */

.fgc-md-section {
    margin-bottom: 32px;
}

.fgc-md-section-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
}

/* ── Folder Grid ─────────────────────────────────────────────────────────── */

.fgc-md-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.fgc-md-folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, border-color .2s, transform .15s;
    cursor: pointer;
}

.fgc-md-folder-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .1);
    transform: translateY(-2px);
    text-decoration: none;
}

.fgc-md-folder-icon {
    font-size: 42px;
    color: #f59e0b;
    margin-bottom: 10px;
    line-height: 1;
}

.fgc-md-folder-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    word-break: break-word;
}

.fgc-md-folder-card .fgc-md-folder-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ── File List ───────────────────────────────────────────────────────────── */

.fgc-md-file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fgc-md-file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow .2s, border-color .2s;
}

.fgc-md-file-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 10px rgba(37, 99, 235, .08);
}

.fgc-md-file-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    color: #6b7280;
}

/* Icon colour by file type */
.fgc-md-file-icon .fa-file-pdf        { color: #dc2626; }
.fgc-md-file-icon .fa-file-word       { color: #2563eb; }
.fgc-md-file-icon .fa-file-excel      { color: #16a34a; }
.fgc-md-file-icon .fa-file-powerpoint { color: #ea580c; }
.fgc-md-file-icon .fa-file-image      { color: #7c3aed; }
.fgc-md-file-icon .fa-file-video      { color: #0891b2; }
.fgc-md-file-icon .fa-file-audio      { color: #db2777; }
.fgc-md-file-icon .fa-file-archive    { color: #92400e; }
.fgc-md-file-icon .fa-file-csv        { color: #047857; }

.fgc-md-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fgc-md-file-name {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fgc-md-file-desc {
    font-size: 13px;
    color: #6b7280;
}

.fgc-md-file-meta {
    font-size: 12px;
    color: #9ca3af;
}

.fgc-md-file-actions {
    flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.fgc-md-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, box-shadow .15s;
    border: none;
}

.fgc-md-btn-download {
    background: #2563eb;
    color: #fff;
}

.fgc-md-btn-download:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}

.fgc-md-not-logged-in .fgc-md-btn {
    background: #2563eb;
    color: #fff;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */

.fgc-md-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
}

.fgc-md-empty-state .fas {
    font-size: 56px;
    display: block;
    margin: 0 auto 16px;
    opacity: .4;
}

.fgc-md-empty-state p {
    font-size: 15px;
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .fgc-md-folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .fgc-md-file-card {
        flex-wrap: wrap;
    }

    .fgc-md-file-actions {
        width: 100%;
    }

    .fgc-md-btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* ── Member Profile Tabs ─────────────────────────────────────────────────── */

.fgc-md-profile-tabs {
    margin: 24px 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.fgc-md-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.fgc-md-tab-button {
    appearance: none;
    border: 0;
    border-right: 1px solid #e5e7eb;
    background: transparent;
    color: #374151;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fgc-md-tab-button:hover,
.fgc-md-tab-button.is-active {
    background: #fff;
    color: #111827;
}

.fgc-md-tab-button.is-active {
    box-shadow: inset 0 -3px 0 #2563eb;
}

.fgc-md-tab-panel {
    padding: 24px;
}

.fgc-md-tab-panel .fgc-md-library {
    margin: 0;
}

.fgc-md-profile-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.fgc-md-profile-card-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.fgc-md-profile-card-header p {
    margin: 0;
    color: #6b7280;
}

.fgc-md-profile-table-wrap {
    overflow-x: auto;
}

.fgc-md-profile-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.fgc-md-profile-table th,
.fgc-md-profile-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.fgc-md-profile-table th {
    width: 220px;
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
}

.fgc-md-profile-table tr:last-child th,
.fgc-md-profile-table tr:last-child td {
    border-bottom: 0;
}

.fgc-md-btn-edit-profile {
    background: #111827;
    color: #fff;
    white-space: nowrap;
}

.fgc-md-btn-edit-profile:hover {
    background: #374151;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 600px) {
    .fgc-md-tabs-nav {
        flex-direction: column;
    }

    .fgc-md-tab-button {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
        justify-content: flex-start;
    }

    .fgc-md-profile-card-header {
        flex-direction: column;
    }

    .fgc-md-btn-edit-profile {
        width: 100%;
        justify-content: center;
    }

    .fgc-md-profile-table th,
    .fgc-md-profile-table td {
        display: block;
        width: 100%;
    }

    .fgc-md-profile-table th {
        border-bottom: 0;
        padding-bottom: 4px;
    }

    .fgc-md-profile-table td {
        padding-top: 4px;
    }
}
