/**
 * SFS Teacher Portal – Styles
 *
 * Color palette derived from schoolforstrings.org:
 *   Primary dark:  #2c2c2c (near-black, used for headings/nav)
 *   Accent gold:   #c9a84c (warm gold, CTA/links)
 *   Warm cream:    #faf8f5 (page backgrounds)
 *   Soft gray:     #f0ede8 (card backgrounds)
 *   Text:          #4a4a4a
 *   Border:        #e0dcd5
 */

:root {
    --sfs-dark:       #2c2c2c;
    --sfs-gold:       #c9a84c;
    --sfs-gold-light: #d4b76a;
    --sfs-cream:      #faf8f5;
    --sfs-gray:       #f0ede8;
    --sfs-text:       #4a4a4a;
    --sfs-text-light: #7a7a7a;
    --sfs-border:     #e0dcd5;
    --sfs-white:      #ffffff;
    --sfs-red:        #c0392b;
    --sfs-green:      #27ae60;
    --sfs-blue:       #2980b9;
    --sfs-radius:     6px;
    --sfs-shadow:     0 2px 8px rgba(0,0,0,0.06);
    --sfs-shadow-lg:  0 4px 20px rgba(0,0,0,0.08);
    --sfs-font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ── Compact theme banner on portal pages ───────────────────────── */
body.sfs-teacher-portal .page-banner {
    background-image: none !important;
    background-color: #a42326;
    min-height: 0 !important;
    height: 146px !important;
    padding: 0 !important;
    overflow: hidden;
}
body.sfs-teacher-portal .page-banner .page-banner-text {
    display: none !important;
}
body.sfs-teacher-portal .page-banner .curve-bot {
    display: none !important;
}

/* ── Page Title (in-page heading) ──────────────────────────────── */
.sfs-tp-page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sfs-dark);
    margin: 0 0 8px;
}

/* ── Portal Navigation ──────────────────────────────────────────── */
.sfs-tp-portal-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sfs-border);
}
.sfs-tp-portal-nav-link {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--sfs-text);
    background: var(--sfs-gray);
    transition: background 0.2s, color 0.2s;
}
.sfs-tp-portal-nav-link:hover {
    background: var(--sfs-gold-light);
    color: #fff;
}
.sfs-tp-portal-nav-link--active {
    background: var(--sfs-gold);
    color: #fff;
}

/* ── Page Container ────────────────────────────────────────────── */
.sfs-tp-page {
    background: var(--sfs-cream);
    min-height: 60vh;
    padding: 40px 0 80px;
    font-family: var(--sfs-font);
    color: var(--sfs-text);
    line-height: 1.6;
}
.sfs-tp-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Typography ────────────────────────────────────────────────── */
.sfs-tp-page h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sfs-dark);
    margin-bottom: 0.25em;
    letter-spacing: -0.02em;
}
.sfs-tp-page h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--sfs-dark);
    margin-bottom: 0.75em;
}
.sfs-tp-page h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--sfs-dark);
    margin-bottom: 0.5em;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.sfs-tp-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--sfs-radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
    text-align: center;
}
.sfs-tp-btn-primary {
    background: var(--sfs-gold);
    color: var(--sfs-white);
    border-color: var(--sfs-gold);
}
.sfs-tp-btn-primary:hover {
    background: var(--sfs-gold-light);
    border-color: var(--sfs-gold-light);
    color: var(--sfs-white);
}
.sfs-tp-btn-small {
    padding: 5px 14px;
    font-size: 0.8rem;
    background: var(--sfs-white);
    color: var(--sfs-text);
    border: 1px solid var(--sfs-border);
}
.sfs-tp-btn-small:hover {
    background: var(--sfs-gray);
}
.sfs-tp-btn-danger {
    color: var(--sfs-red);
    border-color: #f5c6cb;
}
.sfs-tp-btn-danger:hover {
    background: var(--sfs-red);
    color: var(--sfs-white);
    border-color: var(--sfs-red);
}

/* ── Login ─────────────────────────────────────────────────────── */
.sfs-tp-login-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}
.sfs-tp-login-card {
    background: var(--sfs-white);
    border-radius: 10px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--sfs-shadow-lg);
    text-align: center;
}
.sfs-tp-login-header {
    margin-bottom: 28px;
}
.sfs-tp-login-header h1 {
    font-size: 1.75rem;
}
.sfs-tp-login-header p {
    color: var(--sfs-text-light);
    margin-top: 8px;
}
.sfs-tp-login-card .login-username,
.sfs-tp-login-card .login-password {
    margin-bottom: 16px;
    text-align: left;
}
.sfs-tp-login-card label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sfs-dark);
    margin-bottom: 6px;
}
.sfs-tp-login-card input[type="text"],
.sfs-tp-login-card input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--sfs-border);
    border-radius: var(--sfs-radius);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.sfs-tp-login-card input[type="text"]:focus,
.sfs-tp-login-card input[type="password"]:focus {
    outline: none;
    border-color: var(--sfs-gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.sfs-tp-login-card .login-remember {
    text-align: left;
    margin-bottom: 16px;
}
.sfs-tp-login-card input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--sfs-gold);
    color: var(--sfs-white);
    border: none;
    border-radius: var(--sfs-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.sfs-tp-login-card input[type="submit"]:hover {
    background: var(--sfs-gold-light);
}
.sfs-tp-login-forgot {
    margin-top: 16px;
    font-size: 0.85rem;
}
.sfs-tp-login-forgot a {
    color: var(--sfs-gold);
    text-decoration: none;
}

/* ── Dashboard ─────────────────────────────────────────────────── */
.sfs-tp-dashboard-header {
    margin-bottom: 32px;
}
.sfs-tp-dashboard-welcome p {
    color: var(--sfs-text-light);
    font-size: 0.95rem;
}
.sfs-tp-dashboard-welcome a {
    color: var(--sfs-gold);
    text-decoration: none;
    font-weight: 500;
}
.sfs-tp-dashboard-welcome a:hover {
    text-decoration: underline;
}
.sfs-tp-separator {
    margin: 0 8px;
    color: var(--sfs-border);
}

/* ── Tabs ──────────────────────────────────────────────────────── */
.sfs-tp-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid var(--sfs-border);
}
.sfs-tp-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sfs-text-light);
    cursor: pointer;
    transition: all 0.2s;
}
.sfs-tp-tab:hover {
    color: var(--sfs-dark);
}
.sfs-tp-tab--active {
    color: var(--sfs-gold);
    border-bottom-color: var(--sfs-gold);
}
.sfs-tp-tab-icon {
    margin-right: 6px;
}
.sfs-tp-tab-content {
    display: none;
    padding-top: 32px;
}
.sfs-tp-tab-content--active {
    display: block;
}

/* ── ACF Form Overrides ────────────────────────────────────────── */
.sfs-tp-form-wrapper {
    background: var(--sfs-white);
    border-radius: 10px;
    padding: 32px;
    box-shadow: var(--sfs-shadow);
}
.sfs-tp-form-wrapper .acf-fields {
    margin-bottom: 16px;
}
.sfs-tp-form-wrapper .acf-field {
    padding: 12px 0;
    border-top: none;
}
.sfs-tp-form-wrapper .acf-label label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--sfs-dark);
}
.sfs-tp-form-wrapper .acf-input input[type="text"],
.sfs-tp-form-wrapper .acf-input input[type="url"],
.sfs-tp-form-wrapper .acf-input textarea,
.sfs-tp-form-wrapper .acf-input select {
    border: 1px solid var(--sfs-border);
    border-radius: var(--sfs-radius);
    padding: 10px 14px;
    font-size: 0.95rem;
}
.sfs-tp-form-wrapper .acf-input input:focus,
.sfs-tp-form-wrapper .acf-input textarea:focus,
.sfs-tp-form-wrapper .acf-input select:focus {
    border-color: var(--sfs-gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
    outline: none;
}

/* ── Notices ───────────────────────────────────────────────────── */
.sfs-tp-notice {
    padding: 14px 20px;
    border-radius: var(--sfs-radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.sfs-tp-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.sfs-tp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 14px 20px;
    border-radius: var(--sfs-radius);
    border: 1px solid #f5c6cb;
}

/* ── Resource Table (Dashboard) ────────────────────────────────── */
.sfs-tp-my-resources h3 .sfs-tp-count {
    font-weight: 400;
    color: var(--sfs-text-light);
    font-size: 0.9em;
}
.sfs-tp-resource-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--sfs-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--sfs-shadow);
    font-size: 0.9rem;
}
.sfs-tp-resource-table thead {
    background: var(--sfs-gray);
}
.sfs-tp-resource-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--sfs-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sfs-tp-resource-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--sfs-border);
    vertical-align: middle;
}
.sfs-tp-resource-table tbody tr:hover {
    background: var(--sfs-cream);
}
.sfs-tp-actions {
    display: flex;
    gap: 6px;
}

/* Status Badges */
.sfs-tp-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.sfs-tp-status--publish {
    background: #d4edda;
    color: #155724;
}
.sfs-tp-status--pending {
    background: #fff3cd;
    color: #856404;
}
.sfs-tp-status--draft {
    background: var(--sfs-gray);
    color: var(--sfs-text-light);
}

/* ── Profile Page ──────────────────────────────────────────────── */
.sfs-tp-profile-header {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--sfs-border);
}
.sfs-tp-profile-photo {
    flex-shrink: 0;
}
.sfs-tp-profile-photo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--sfs-shadow-lg);
}
.sfs-tp-profile-info h1 {
    margin-bottom: 4px;
}
.sfs-tp-profile-title {
    font-size: 1.1rem;
    color: var(--sfs-gold);
    font-weight: 500;
    margin-bottom: 16px;
}
.sfs-tp-profile-bio {
    color: var(--sfs-text);
    line-height: 1.7;
}

/* ── Small & Outline Buttons ────────────────────────────────────── */
.sfs-tp-btn-small {
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: var(--sfs-radius);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}
.sfs-tp-btn-outline {
    background: transparent;
    color: var(--sfs-gold);
    border: 1px solid var(--sfs-gold);
}
.sfs-tp-btn-outline:hover {
    background: var(--sfs-gold);
    color: #fff;
}

/* ── Resource Card Actions ─────────────────────────────────────── */
.sfs-tp-resource-card-action {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 16px;
}

/* ── Profile Edit Form ─────────────────────────────────────────── */
.sfs-tp-profile-edit {
    max-width: 700px;
}
.sfs-tp-profile-edit h1 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}
.sfs-tp-profile-edit .acf-fields {
    background: var(--sfs-white);
    padding: 24px;
    border-radius: 10px;
    box-shadow: var(--sfs-shadow);
}
.sfs-tp-profile-edit .acf-field {
    padding: 12px 0;
    border-top: none;
}
.sfs-tp-profile-edit .acf-label label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--sfs-dark);
}
.sfs-tp-profile-edit .acf-input input[type="text"],
.sfs-tp-profile-edit .acf-input textarea {
    border: 1px solid var(--sfs-border);
    border-radius: var(--sfs-radius);
    padding: 10px 14px;
    font-size: 0.95rem;
    width: 100%;
}
.sfs-tp-profile-edit .acf-input input:focus,
.sfs-tp-profile-edit .acf-input textarea:focus {
    border-color: var(--sfs-gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
    outline: none;
}

/* ── ACF Form Title Field ──────────────────────────────────────── */
.sfs-tp-form-wrapper .acf-post-title {
    margin-bottom: 8px;
    padding-bottom: 8px;
}
.sfs-tp-form-wrapper .acf-post-title input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1.15rem;
    font-weight: 600;
    border: 1px solid var(--sfs-border);
    border-radius: var(--sfs-radius);
    font-family: var(--sfs-font);
}
.sfs-tp-form-wrapper .acf-post-title input:focus {
    border-color: var(--sfs-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

/* ── Custom PDF Upload ──────────────────────────────────────────── */
.sfs-tp-pdf-upload {
    padding: 16px;
    background: var(--sfs-gray);
    border: 2px dashed var(--sfs-border);
    border-radius: var(--sfs-radius);
}
.sfs-tp-pdf-upload:hover {
    border-color: var(--sfs-gold-light);
}
.sfs-tp-pdf-upload input[type="file"] {
    display: block;
    width: 100%;
    padding: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    background: none;
}
.sfs-tp-pdf-upload .description {
    font-size: 0.8rem;
    color: #888;
    margin-top: 6px;
}
.sfs-tp-pdf-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--sfs-white);
    border-radius: var(--sfs-radius);
    font-size: 0.9rem;
}
.sfs-tp-pdf-current a {
    color: var(--sfs-gold);
    font-weight: 500;
}

/* ── ACF Checkbox List (categories) ────────────────────────────── */
.sfs-tp-form-wrapper .acf-checkbox-list,
.sfs-tp-profile-edit .acf-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px 16px;
    list-style: none;
    padding: 12px 16px;
    margin: 0;
    background: var(--sfs-gray);
    border-radius: var(--sfs-radius);
    border: 1px solid var(--sfs-border);
}
.sfs-tp-form-wrapper .acf-checkbox-list li:empty,
.sfs-tp-profile-edit .acf-checkbox-list li:empty {
    display: none;
}
.sfs-tp-form-wrapper ul.acf-checkbox-list::before,
.sfs-tp-form-wrapper ul.acf-checkbox-list::after,
.sfs-tp-profile-edit ul.acf-checkbox-list::before,
.sfs-tp-profile-edit ul.acf-checkbox-list::after,
.sfs-tp-form-wrapper ul.acf-bl::before,
.sfs-tp-form-wrapper ul.acf-bl::after,
.sfs-tp-profile-edit ul.acf-bl::before,
.sfs-tp-profile-edit ul.acf-bl::after,
ul.acf-checkbox-list.acf-bl::before,
ul.acf-checkbox-list.acf-bl::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}
.sfs-tp-form-wrapper .acf-checkbox-list li,
.sfs-tp-profile-edit .acf-checkbox-list li {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}
.sfs-tp-form-wrapper .acf-checkbox-list li label,
.sfs-tp-profile-edit .acf-checkbox-list li label {
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sfs-tp-form-wrapper .acf-checkbox-list li label input[type="checkbox"],
.sfs-tp-profile-edit .acf-checkbox-list li label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--sfs-gold);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── ACF File Upload Field ─────────────────────────────────────── */
.sfs-tp-form-wrapper .acf-file-uploader,
.sfs-tp-profile-edit .acf-file-uploader {
    border: 2px dashed var(--sfs-border);
    border-radius: var(--sfs-radius);
    padding: 20px;
    text-align: center;
    background: var(--sfs-gray);
    transition: border-color 0.2s;
}
.sfs-tp-form-wrapper .acf-file-uploader:hover,
.sfs-tp-profile-edit .acf-file-uploader:hover {
    border-color: var(--sfs-gold-light);
}
.sfs-tp-form-wrapper .acf-file-uploader .acf-button,
.sfs-tp-form-wrapper .acf-image-uploader .acf-button,
.sfs-tp-profile-edit .acf-file-uploader .acf-button,
.sfs-tp-profile-edit .acf-image-uploader .acf-button,
.sfs-tp-form-wrapper a[data-name="add"],
.sfs-tp-profile-edit a[data-name="add"] {
    display: inline-block;
    padding: 10px 24px;
    background: var(--sfs-gold);
    color: #fff !important;
    border: none;
    border-radius: var(--sfs-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.sfs-tp-form-wrapper .acf-file-uploader .acf-button:hover,
.sfs-tp-form-wrapper .acf-image-uploader .acf-button:hover,
.sfs-tp-profile-edit .acf-file-uploader .acf-button:hover,
.sfs-tp-profile-edit .acf-image-uploader .acf-button:hover,
.sfs-tp-form-wrapper a[data-name="add"]:hover,
.sfs-tp-profile-edit a[data-name="add"]:hover {
    background: var(--sfs-gold-light);
}

/* ── ACF Image Upload Field ────────────────────────────────────── */
.sfs-tp-form-wrapper .acf-image-uploader,
.sfs-tp-profile-edit .acf-image-uploader {
    border: 2px dashed var(--sfs-border);
    border-radius: var(--sfs-radius);
    padding: 20px;
    text-align: center;
    background: var(--sfs-gray);
}
.sfs-tp-form-wrapper .acf-image-uploader.has-value,
.sfs-tp-profile-edit .acf-image-uploader.has-value {
    border-style: solid;
    padding: 12px;
}
.sfs-tp-form-wrapper .acf-image-uploader img,
.sfs-tp-profile-edit .acf-image-uploader img {
    max-width: 200px;
    border-radius: var(--sfs-radius);
}

/* ── ACF Field Instructions ────────────────────────────────────── */
.sfs-tp-form-wrapper .acf-field .description,
.sfs-tp-form-wrapper .acf-field p.description,
.sfs-tp-profile-edit .acf-field .description,
.sfs-tp-profile-edit .acf-field p.description {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* ── ACF Basic Uploader (input[type=file]) ─────────────────────── */
.sfs-tp-form-wrapper input[type="file"],
.sfs-tp-profile-edit input[type="file"] {
    padding: 10px;
    border: 2px dashed var(--sfs-border);
    border-radius: var(--sfs-radius);
    background: var(--sfs-gray);
    width: 100%;
    cursor: pointer;
    font-size: 0.9rem;
}
.sfs-tp-form-wrapper input[type="file"]:hover,
.sfs-tp-profile-edit input[type="file"]:hover {
    border-color: var(--sfs-gold-light);
}

/* ── Category Filters ──────────────────────────────────────────── */
.sfs-tp-category-filter,
.sfs-tp-archive-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.sfs-tp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--sfs-border);
    border-radius: 24px;
    background: var(--sfs-white);
    color: var(--sfs-text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.sfs-tp-filter-btn:hover {
    border-color: var(--sfs-gold);
    color: var(--sfs-gold);
}
.sfs-tp-filter-btn--active {
    background: var(--sfs-gold);
    color: var(--sfs-white);
    border-color: var(--sfs-gold);
}
.sfs-tp-filter-btn--active:hover {
    background: var(--sfs-gold-light);
    color: var(--sfs-white);
}
.sfs-tp-filter-count {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ── Resource Cards ────────────────────────────────────────────── */
.sfs-tp-resource-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}
.sfs-tp-resource-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: var(--sfs-white);
    border-radius: 10px;
    border: 1px solid var(--sfs-border);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.sfs-tp-resource-card:hover {
    box-shadow: var(--sfs-shadow);
    border-color: var(--sfs-gold-light);
}
.sfs-tp-resource-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.sfs-tp-resource-card--pdf .sfs-tp-resource-card-icon {
    background: #fef3f2;
    color: var(--sfs-red);
}
.sfs-tp-resource-card--video .sfs-tp-resource-card-icon {
    background: #fef9ec;
    color: var(--sfs-gold);
}
.sfs-tp-resource-card--link .sfs-tp-resource-card-icon {
    background: #eef6ff;
    color: var(--sfs-blue);
}
.sfs-tp-resource-card-body {
    flex: 1;
    min-width: 0;
}
.sfs-tp-resource-card-body h3,
.sfs-tp-resource-card-body h4 {
    margin: 0 0 4px;
    font-size: 1rem;
}
.sfs-tp-resource-card-body a {
    color: var(--sfs-dark);
    text-decoration: none;
}
.sfs-tp-resource-card-body a:hover {
    color: var(--sfs-gold);
}
.sfs-tp-resource-type {
    font-size: 0.8rem;
    color: var(--sfs-text-light);
}
.sfs-tp-resource-desc {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--sfs-text-light);
    line-height: 1.5;
}
.sfs-tp-resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
.sfs-tp-resource-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--sfs-text);
    text-decoration: none;
    font-weight: 500;
}
.sfs-tp-resource-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.sfs-tp-resource-author:hover {
    color: var(--sfs-gold);
}
.sfs-tp-resource-card-action {
    flex-shrink: 0;
    align-self: center;
}

/* ── Meta Tags ─────────────────────────────────────────────────── */
.sfs-tp-meta-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--sfs-gray);
    color: var(--sfs-text-light);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}
.sfs-tp-meta-tag--instrument {
    background: #eef6ff;
    color: var(--sfs-blue);
}

/* ── Single Resource ───────────────────────────────────────────── */
.sfs-tp-breadcrumb {
    font-size: 0.85rem;
    color: var(--sfs-text-light);
    margin-bottom: 24px;
}
.sfs-tp-breadcrumb a {
    color: var(--sfs-gold);
    text-decoration: none;
}
.sfs-tp-breadcrumb a:hover {
    text-decoration: underline;
}
.sfs-tp-breadcrumb-sep {
    margin: 0 8px;
}
.sfs-tp-single-resource header {
    margin-bottom: 32px;
}
.sfs-tp-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}
.sfs-tp-single-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--sfs-text);
    font-weight: 500;
    font-size: 0.9rem;
}
.sfs-tp-single-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.sfs-tp-single-author:hover {
    color: var(--sfs-gold);
}
.sfs-tp-single-date {
    color: var(--sfs-text-light);
    font-size: 0.85rem;
}
.sfs-tp-single-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--sfs-text);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--sfs-border);
}

/* Video Embed */
.sfs-tp-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--sfs-shadow-lg);
}
.sfs-tp-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* PDF Embed */
.sfs-tp-pdf-embed {
    margin-bottom: 24px;
}
.sfs-tp-pdf-embed iframe {
    border: 1px solid var(--sfs-border);
    border-radius: 10px;
    margin-bottom: 16px;
}

/* Link Block */
.sfs-tp-link-block {
    padding: 32px;
    text-align: center;
    background: var(--sfs-gray);
    border-radius: 10px;
}

/* ── Teacher Directory ─────────────────────────────────────────── */
.sfs-tp-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.sfs-tp-directory-card {
    display: block;
    background: var(--sfs-white);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--sfs-border);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}
.sfs-tp-directory-card:hover {
    box-shadow: var(--sfs-shadow-lg);
    transform: translateY(-2px);
}
.sfs-tp-directory-photo img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
.sfs-tp-directory-info {
    padding: 16px 20px;
}
.sfs-tp-directory-info h4 {
    margin: 0 0 4px;
    color: var(--sfs-dark);
    font-size: 1rem;
}
.sfs-tp-directory-info p {
    color: var(--sfs-gold);
    font-size: 0.85rem;
    margin: 0;
}

/* ── Archive Header ────────────────────────────────────────────── */
.sfs-tp-archive-header {
    margin-bottom: 32px;
}
.sfs-tp-archive-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.sfs-tp-archive-header p {
    color: var(--sfs-text-light);
    font-size: 1.05rem;
}
.sfs-tp-archive-actions {
    flex-shrink: 0;
    padding-top: 6px;
}
.sfs-tp-empty-library {
    text-align: center;
    padding: 60px 24px;
}

/* ── Pagination ────────────────────────────────────────────────── */
.sfs-tp-pagination {
    text-align: center;
    margin-top: 32px;
}
.sfs-tp-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border-radius: var(--sfs-radius);
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--sfs-text);
    border: 1px solid var(--sfs-border);
}
.sfs-tp-pagination .page-numbers.current {
    background: var(--sfs-gold);
    color: var(--sfs-white);
    border-color: var(--sfs-gold);
}
.sfs-tp-pagination .page-numbers:hover:not(.current) {
    background: var(--sfs-gray);
}

/* ── Content Type Icons ─────────────────────────────────────────── */
.sfs-tp-resource-card-icons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    font-size: 1.25rem;
    padding-top: 2px;
}

/* ── Links List (single resource) ──────────────────────────────── */
.sfs-tp-links-list {
    margin: 24px 0;
}
.sfs-tp-links-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sfs-tp-links-list li {
    padding: 12px 16px;
    border: 1px solid var(--sfs-border);
    border-radius: var(--sfs-radius);
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.sfs-tp-links-list li:hover {
    border-color: var(--sfs-gold);
}
.sfs-tp-links-list a {
    color: var(--sfs-gold);
    text-decoration: none;
    font-weight: 500;
}
.sfs-tp-links-list a:hover {
    text-decoration: underline;
}

/* ── Single resource section spacing ───────────────────────────── */
.sfs-tp-single-content > div {
    margin-bottom: 32px;
}
.sfs-tp-single-content h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sfs-text-light);
    margin-bottom: 12px;
}

/* ── Resource Attachments ───────────────────────────────────────── */
.sfs-tp-resource-attachments {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
}
.sfs-tp-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--sfs-gray);
    border-radius: var(--sfs-radius);
    font-size: 0.9rem;
    color: var(--sfs-gold);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.sfs-tp-attachment:hover {
    background: #e8e4dd;
}

/* ── Video Wrapper (card size) ─────────────────────────────────── */
.sfs-tp-video-wrapper--card {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--sfs-radius);
    margin: 12px 0;
}
.sfs-tp-video-wrapper--card iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ── Expanded Resource Card ────────────────────────────────────── */
.sfs-tp-resource-card--expanded {
    flex-direction: column;
}
.sfs-tp-resource-card--expanded .sfs-tp-resource-card-body {
    width: 100%;
}

/* ── Empty State ───────────────────────────────────────────────── */
.sfs-tp-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--sfs-text-light);
    font-size: 1rem;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sfs-tp-profile-header {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    .sfs-tp-profile-photo img {
        width: 140px;
        height: 140px;
        margin: 0 auto;
    }
    .sfs-tp-resource-card {
        flex-direction: column;
    }
    .sfs-tp-archive-header-top {
        flex-direction: column;
    }
    .sfs-tp-resource-card-action {
        align-self: flex-start;
    }
    .sfs-tp-resource-table {
        font-size: 0.8rem;
    }
    .sfs-tp-resource-table th,
    .sfs-tp-resource-table td {
        padding: 10px 8px;
    }
    .sfs-tp-tabs {
        overflow-x: auto;
    }
    .sfs-tp-form-wrapper {
        padding: 20px;
    }
    .sfs-tp-login-card {
        padding: 32px 24px;
    }
    .sfs-tp-directory {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ═══════════════════════════════════════════════════════════════
   Resource Library – Type Filters, Search, 3-col Grid
   ═══════════════════════════════════════════════════════════════ */

/* ── Type Filter Buttons ────────────────────────────────────── */
.sfs-tp-type-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sfs-tp-type-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid var(--sfs-border);
    border-radius: 10px;
    background: var(--sfs-white);
    color: var(--sfs-text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--sfs-font);
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.sfs-tp-type-btn:hover {
    border-color: var(--sfs-gold);
    color: var(--sfs-gold);
    background: #fdf8ee;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,168,76,0.15);
}

.sfs-tp-type-btn--active {
    background: var(--sfs-gold);
    border-color: var(--sfs-gold);
    color: var(--sfs-white) !important;
    box-shadow: 0 4px 14px rgba(201,168,76,0.35);
    transform: translateY(-1px);
}

.sfs-tp-type-btn--active:hover {
    background: var(--sfs-gold-light);
    border-color: var(--sfs-gold-light);
    transform: translateY(-1px);
}

.sfs-tp-type-btn-icon {
    font-size: 1.1rem;
    line-height: 1;
    color: #a42326;
    font-variant-emoji: text;
    font-style: normal;
}

.sfs-tp-type-btn--active .sfs-tp-type-btn-icon {
    color: #fff;
}

.sfs-tp-type-btn-label {
    white-space: nowrap;
}

/* ── Search Bar ─────────────────────────────────────────────── */
.sfs-tp-search-bar {
    margin-bottom: 28px;
    background: var(--sfs-white);
    border: 1px solid var(--sfs-border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--sfs-shadow);
}

.sfs-tp-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sfs-tp-search-icon {
    color: var(--sfs-text-light);
    flex-shrink: 0;
}

.sfs-tp-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--sfs-dark);
    background: transparent;
    font-family: var(--sfs-font);
}

.sfs-tp-search-input::placeholder {
    color: #b0aba3;
}

.sfs-tp-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sfs-text-light);
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.sfs-tp-search-clear:hover {
    background: var(--sfs-gray);
    color: var(--sfs-dark);
}

/* ── Category Pills ─────────────────────────────────────────── */
.sfs-tp-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 12px;
    padding-bottom: 4px;
    border-top: 1px solid var(--sfs-border);
}

.sfs-tp-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1px solid var(--sfs-border);
    border-radius: 20px;
    background: var(--sfs-gray);
    color: var(--sfs-text);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--sfs-font);
}

.sfs-tp-pill:hover {
    border-color: var(--sfs-gold);
    color: var(--sfs-gold);
    background: #fdf8ee;
}

.sfs-tp-pill--active {
    background: var(--sfs-dark);
    border-color: var(--sfs-dark);
    color: var(--sfs-white);
}

.sfs-tp-pill--active:hover {
    background: #444;
    border-color: #444;
    color: var(--sfs-white);
}

.sfs-tp-pill-count {
    font-size: 0.73rem;
    opacity: 0.65;
}

/* ── Results Meta Bar ───────────────────────────────────────── */
.sfs-tp-results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: var(--sfs-text-light);
}

.sfs-tp-reset-filters {
    background: none;
    border: none;
    color: var(--sfs-gold);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: var(--sfs-font);
    text-decoration: underline;
}

.sfs-tp-reset-filters:hover {
    color: var(--sfs-gold-light);
}

/* ── 3-Column Resource Grid ─────────────────────────────────── */
.sfs-tp-resource-grid--three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
    align-items: start;
}

/* ── Card Column Style ──────────────────────────────────────── */
.sfs-tp-resource-card--col {
    display: flex;
    flex-direction: column;
    background: var(--sfs-white);
    border-radius: 10px;
    border: 1px solid var(--sfs-border);
    overflow: hidden;
    padding: 0;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.sfs-tp-resource-card--col:hover {
    box-shadow: var(--sfs-shadow-lg);
    border-color: var(--sfs-gold-light);
    transform: translateY(-2px);
}

/* Media area (video embed) */
.sfs-tp-card-media {
    width: 100%;
    background: #000;
}

.sfs-tp-card-media .sfs-tp-video-wrapper--card {
    border-radius: 0;
    margin: 0;
}

/* Type badge for non-video cards */
.sfs-tp-card-type-badge {
    padding: 20px 20px 0;
}

.sfs-tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sfs-tp-badge--pdf {
    background: #fef2f2;
    color: #b91c1c;
}

.sfs-tp-badge--link {
    background: #eff6ff;
    color: #1d4ed8;
}

.sfs-tp-badge--other {
    background: var(--sfs-gray);
    color: var(--sfs-text-light);
}

/* Card body for column layout */
.sfs-tp-resource-card--col .sfs-tp-resource-card-body {
    padding: 18px 20px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sfs-tp-resource-card--col .sfs-tp-resource-card-body h3 {
    font-size: 0.97rem;
    margin: 0 0 6px;
    line-height: 1.4;
}

.sfs-tp-resource-card--col .sfs-tp-resource-desc {
    font-size: 0.85rem;
    color: var(--sfs-text-light);
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sfs-tp-resource-card--col .sfs-tp-resource-attachments {
    margin: 0 0 12px;
    gap: 5px;
}

.sfs-tp-resource-card--col .sfs-tp-attachment {
    font-size: 0.82rem;
    padding: 6px 12px;
}

.sfs-tp-resource-card--col .sfs-tp-resource-meta {
    margin-top: auto;
    padding-top: 10px;
    gap: 6px;
}

/* ── No Results State ───────────────────────────────────────── */
.sfs-tp-no-results {
    text-align: center;
    padding: 60px 24px;
    background: var(--sfs-white);
    border-radius: 12px;
    border: 1px dashed var(--sfs-border);
}

.sfs-tp-no-results-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.sfs-tp-no-results h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--sfs-dark);
}

.sfs-tp-no-results p {
    color: var(--sfs-text-light);
    margin-bottom: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
    .sfs-tp-resource-grid--three-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sfs-tp-resource-grid--three-col {
        grid-template-columns: 1fr;
    }

    .sfs-tp-type-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* ── Filter Rows (Level + Instrument) ──────────────────────── */
.sfs-tp-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-top: 14px;
    padding-bottom: 4px;
    border-top: 1px solid var(--sfs-border);
    margin-top: 6px;
}

.sfs-tp-filter-row-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sfs-text-light);
    margin-right: 2px;
    white-space: nowrap;
}

/* ── Teacher Initials & Card Author Footer ─────────────────────────── */

.sfs-tp-initials-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #a42326;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.sfs-tp-initials-circle--lg {
    width: 44px;
    height: 44px;
    font-size: 15px;
}

.sfs-tp-card-author-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background-color: #f5f5f5;
    border-top: 1px solid #e8e8e8;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
}

.sfs-tp-card-author-name {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    line-height: 1.2;
}

/* Remove old author link styles now that it's a plain element */
.sfs-tp-resource-author {
    pointer-events: none;
    text-decoration: none;
    color: inherit;
}

/* Ensure cards use flex-column so footer pins to bottom */
.sfs-tp-resource-card--col {
    display: flex;
    flex-direction: column;
}

.sfs-tp-resource-card-body {
    flex: 1;
}

/* ── reCAPTCHA widget ──────────────────────────────────────────────── */
.sfs-tp-recaptcha-wrapper {
    margin: 16px 0 8px;
}

/* ── Custom login form fields ──────────────────────────────────────── */
.sfs-tp-form-field {
    margin-bottom: 16px;
}
.sfs-tp-form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--sfs-dark);
}
.sfs-tp-form-field input[type="text"],
.sfs-tp-form-field input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--sfs-border);
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.sfs-tp-form-field input[type="text"]:focus,
.sfs-tp-form-field input[type="password"]:focus {
    outline: none;
    border-color: var(--sfs-red);
}
.sfs-tp-form-field--remember label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.sfs-tp-btn--full {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

/* ── Login error message ───────────────────────────────────────────── */
.sfs-tp-login-error,
.sfs-tp-login-msg {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}
