/* Teacher Portal — dashboard, profile page. Reuses site vars from style.css */

.alert-pending {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #c9a961;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.alert-danger, .alert-success { display: flex; align-items: center; gap: 10px; }

/* Teachers page toolbar: search + teacher login link */
.teachers-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.teachers-search {
    flex: 1;
    min-width: 260px;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 30px;
    padding: 6px 8px 6px 20px;
    box-shadow: var(--shadow);
}
.teachers-search i.fa-search { color: var(--text-light); }
.teachers-search input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 0;
    background: transparent;
    color: var(--text);
}
.teachers-search button {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.teachers-search button:hover { background: var(--primary-dark); }
.teachers-search .ts-clear {
    color: var(--text-light);
    padding: 0 6px;
    text-decoration: none;
    flex-shrink: 0;
}
.teachers-search .ts-clear:hover { color: #c0392b; }

.teachers-login-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 30px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.teachers-login-link:hover { background: var(--primary); color: #fff; }

/* Pagination */
.teachers-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 10px;
    flex-wrap: wrap;
}
.pg-link {
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--text);
    border: 1px solid rgba(0,0,0,0.08);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}
.pg-link:hover { border-color: var(--primary); color: var(--primary); }
.pg-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg-link.disabled { opacity: 0.4; pointer-events: none; }

/* Video watermark — Alfajar branding overlay on public video playback */
.video-watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    opacity: 0.88;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
    pointer-events: none;
    z-index: 5;
    border-radius: 6px;
}
.gig-cover .video-watermark { width: 24px; height: 24px; bottom: 8px; right: 8px; }

/* Gig-style search hero (teachers.php) */
.gig-hero { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.gig-hero h2 { margin-top: 8px; }
.gig-hero-search {
    max-width: 620px;
    margin: 24px auto 0;
    padding: 8px 8px 8px 24px;
    box-shadow: var(--shadow-lg);
}
.gig-hero-search input { font-size: 15px; padding: 12px 0; }
.gig-hero-search button { width: 44px; height: 44px; }

.gig-result-count { font-size: 13px; color: var(--text-light); font-weight: 600; }

/* Gig cards grid (Fiverr-style) */
.gig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}
.gig-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.gig-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.gig-cover { position: relative; width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--primary), var(--primary-light)); overflow: hidden; }
.gig-cover video, .gig-cover-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.gig-preview-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gig-body { padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gig-seller { display: flex; align-items: center; gap: 8px; }
.gig-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.gig-seller-name { font-size: 12.5px; font-weight: 600; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gig-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gig-tag {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-dark);
    background: var(--cream);
    padding: 4px 12px;
    border-radius: 20px;
}
.gig-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-light); margin-top: auto; padding-top: 4px; }
.gig-stats i { color: var(--gold-dark); margin-right: 3px; }

.gig-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: var(--cream);
    border-top: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
}
.gig-card:hover .gig-cta { background: var(--primary); color: #fff; }

/* Profile summary card */
.profile-summary-card {
    display: flex;
    gap: 26px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}
.psc-avatar { flex-shrink: 0; }
.psc-avatar img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--cream); display: block; }
.psc-info { flex: 1; min-width: 0; }
.psc-top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.psc-top-row h2 { font-size: 24px; color: var(--primary); margin-bottom: 2px; }
.psc-title { color: var(--gold-dark); font-weight: 600; font-size: 14px; }
.psc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.psc-actions .btn-primary, .psc-actions .btn-outline-primary { padding: 10px 20px; font-size: 13px; }
.psc-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 14px; }
.psc-meta span { font-size: 13px; color: var(--text-light); display: inline-flex; align-items: center; gap: 6px; }
.psc-meta span i { color: var(--gold-dark); }
.psc-bio { font-size: 14px; color: var(--text); line-height: 1.7; }
.psc-bio.empty { color: var(--text-light); font-style: italic; }

.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.card-title-row .btn-primary { width: auto; margin-top: 0; padding: 8px 16px; font-size: 12.5px; gap: 6px; white-space: nowrap; flex-shrink: 0; box-shadow: none; }

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,20,15,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--white);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--cream);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: #fbe0e0; color: #c0392b; }
.modal-box h3 { font-size: 22px; color: var(--primary); margin-bottom: 4px; }

/* Upload progress overlay (shown inside the modal while a video is uploading) */
.upload-progress { display: none; text-align: center; padding: 30px 10px 10px; }
.upload-progress.active { display: block; }
.upload-spinner {
    width: 46px; height: 46px;
    border: 4px solid var(--cream-dark, #ece4d0);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: uploadSpin 0.8s linear infinite;
}
@keyframes uploadSpin { to { transform: rotate(360deg); } }
.upload-progress p { color: var(--text); font-weight: 600; margin-bottom: 4px; }
.upload-progress small { color: var(--text-light); }

/* Toast notifications */
.toast-stack {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--white);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    max-width: 320px;
    animation: toastIn 0.3s ease;
}
.toast.error { border-left-color: #c0392b; color: #c0392b; }
.toast i { font-size: 18px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.leaving { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* Video management list (dashboard) */
.video-manage-list { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.video-manage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cream);
    border-radius: 10px;
    padding: 8px;
}
.video-manage-item video { width: 80px; height: 50px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: #000; }

/* Blog management list (dashboard) */
.blog-manage-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.blog-manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--cream);
    border-radius: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
}
.bmi-info { flex: 1; min-width: 200px; }
.bmi-info strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.bmi-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-light); margin-top: 6px; }
.bmi-actions { display: flex; gap: 8px; flex-shrink: 0; }
.blog-status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-status-badge.published { background: #e0f5ea; color: var(--primary); }
.blog-status-badge.pending { background: #fff3cd; color: #856404; }
.blog-status-badge.draft { background: #eceff1; color: #607d8b; }

/* Video self-intro tip */
.video-tip {
    background: #fff8e6;
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 18px;
}
.video-tip i { color: var(--gold-dark); margin-right: 6px; }
.vmi-info { flex: 1; min-width: 0; }
.vmi-info strong { display: block; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmi-info span { font-size: 12px; color: var(--text-light); margin-right: 12px; }

.btn-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    background: var(--white);
    color: var(--text-light);
    border: 1px solid rgba(0,0,0,0.08);
    transition: var(--transition);
}
.btn-icon.delete:hover { background: #c0392b; color: #fff; border-color: #c0392b; }

/* Outline button for light/white backgrounds — .btn-secondary assumes a dark section behind it */
.btn-outline-primary {
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    text-decoration: none;
}
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }

.become-teacher-cta {
    margin-top: 40px;
    background: var(--cream);
    border-radius: 16px;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.become-teacher-cta h3 { color: var(--primary); font-size: 20px; margin-bottom: 6px; }
.become-teacher-cta p { color: var(--text-light); font-size: 14px; margin: 0; }

/* Public teacher profile page */
.tp-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: start;
}
.tp-bio {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 0 30px 30px;
    text-align: center;
    position: sticky;
    top: 110px;
}
.tp-cover {
    height: 80px;
    margin: 0 -30px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.tp-photo {
    width: 130px; height: 130px;
    border-radius: 50%;
    margin: -65px auto 14px;
    overflow: hidden;
    background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    font-size: 50px;
    color: var(--gold-dark);
    border: 5px solid var(--white);
    box-shadow: var(--shadow);
}
.tp-photo img { width: 100%; height: 100%; object-fit: cover; }
.tp-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #1a7a5e;
    background: #e6f5ee;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.tp-bio h2 { font-size: 22px; color: var(--primary); margin-bottom: 4px; }
.tp-title { color: var(--gold-dark); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.tp-spec, .tp-exp { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.tp-desc { margin-top: 4px; font-size: 14px; line-height: 1.7; color: var(--text); text-align: left; }

.tp-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
}
.tp-stat-tile {
    background: var(--cream);
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
}
.tp-stat-tile i { display: block; color: var(--gold-dark); font-size: 15px; margin-bottom: 6px; }
.tp-stat-tile strong { display: block; font-size: 19px; color: var(--primary); font-family: 'Playfair Display', serif; line-height: 1.1; }
.tp-stat-tile span { font-size: 10px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }

.tp-content-col { display: flex; flex-direction: column; gap: 30px; }

.tp-videos, .tp-blogs { background: var(--white); border-radius: 16px; box-shadow: var(--shadow); padding: 26px; }
.tp-card-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold-dark);
    margin-bottom: 6px;
}
.tp-videos h3, .tp-blogs h3 { font-size: 22px; color: var(--primary); margin-bottom: 16px; }

.tp-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}
.tp-empty-state i { display: block; font-size: 40px; margin-bottom: 14px; color: var(--cream-dark); }
.tp-player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 520px;
    margin: 0 auto;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}
.tp-player-wrap video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain;
}

.tp-current-title { margin: 14px 0 0; font-size: 15px; font-weight: 600; color: var(--text); }
.tp-current-title span { color: var(--gold-dark); }
.tp-video-votes { display: flex; gap: 10px; margin: 14px 0 22px; }
.tp-video-votes .vote-btn { padding: 8px 18px; font-size: 13px; }

.tp-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.tp-video-thumb {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    aspect-ratio: 16/9;
    transition: var(--transition);
}
.tp-video-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tp-video-thumb video { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; pointer-events: none; }
.tp-video-thumb .video-watermark { width: 18px; height: 18px; bottom: 4px; left: 4px; right: auto; }
.tp-video-thumb i {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #fff; font-size: 22px; text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.tp-thumb-views {
    position: absolute; bottom: 4px; right: 6px;
    background: rgba(0,0,0,0.7); color: #fff;
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
}

@media (max-width: 900px) {
    .tp-grid { grid-template-columns: 1fr; }
    .tp-bio { position: static; }
    .teachers-toolbar { flex-direction: column; align-items: stretch; }
    .teachers-search { max-width: none; }
    .teachers-login-link { justify-content: center; }
}

@media (max-width: 640px) {
    .profile-summary-card { flex-direction: column; align-items: center; text-align: center; }
    .psc-top-row { flex-direction: column; align-items: center; text-align: center; }
    .psc-meta { justify-content: center; }
    .modal-box { padding: 24px 20px; }
}
