/**
 * PB Academy - Landing Page Styles
 *
 * Full-width course panels with photo headers, section table,
 * test grouping, review dialog.
 * Depends on: global.css
 */

/* Hide site banner on academy landing (header is now unified) */
.pb-template-academy-landing .pb-site-banner {
    display: none !important;
}

/* Removed: .ac-topbar, .ac-brand, .ac-back-link, .ac-account-btn
   Landing page now uses the unified header via shared/header.php */

/* Account button — kept for potential future use */
.ac-account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.ac-account-btn:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.ac-account-btn svg { width: 16px; height: 16px; }

/* ─── Shared utilities ──────────────────────────────────────────────── */
.ac-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.6;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.ac-pill svg { width: 11px; height: 11px; flex-shrink: 0; }
.ac-pill--default { color: #44597f; background: #f3f4f6; border: 1px solid #e5e7eb; }
.ac-pill--default:hover { background: #fffbeb; border-color: #fef3c7; }
.ac-pill--passed { color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; }
.ac-pill--passed:hover { background: #d1fae5; border-color: #6ee7b7; }
.ac-pill--failed { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.ac-pill--failed:hover { background: #fef3c7; border-color: #fcd34d; }
.ac-pill--locked { color: #9ca3af; background: #f9fafb; border: 1px solid #e5e7eb; cursor: not-allowed; }
.ac-pill--locked:hover { background: #f3f4f6; border-color: #d1d5db; }

.ac-badge {
    display: inline-flex; padding: 1px 6px; border-radius: 4px;
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.ac-badge--passed { background: #d1fae5; color: #065f46; }
.ac-badge--failed { background: #fef3c7; color: #92400e; }

/* ─── Progress bar ──────────────────────────────────────────────────── */
.ac-progress-bar {
    height: 5px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    overflow: hidden;
}
.ac-progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #F4C542, #F6A722);
    border-radius: 3px;
}
.ac-progress-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

/* ─── Access Course CTA button ──────────────────────────────────────── */
.ac-btn-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(244, 197, 66, 0.2); color: #F4C542;
    font-size: 0.78rem; font-weight: 700;
    border-radius: 8px; border: 1px solid rgba(244, 197, 66, 0.35);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.ac-btn-cta:hover { background: rgba(244, 197, 66, 0.35); border-color: rgba(244, 197, 66, 0.5); color: #F4C542; }
.ac-btn-cta svg { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════════════════════════════════
   COURSE PANELS — full-width with photo headers
   ═══════════════════════════════════════════════════════════════════════ */
.ac-landing-courses {
    max-width: var(--pb-site-container-width, 1400px);
    margin: 0 auto;
    padding: 32px var(--pb-site-container-padding, 2rem) 60px;
}

.ac-course-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

/* ─── Course Header — Photo background ─────────────────────────────── */
.ac-course-header {
    position: relative;
    padding: 20px 28px;
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 100px;
}
.ac-course-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,22,40,0.82) 0%, rgba(21,47,94,0.72) 100%);
    z-index: 1;
}
.ac-course-header > * {
    position: relative;
    z-index: 2;
}
.ac-course-header--c1 { background-image: url('/wp-content/uploads/2024/02/beesflightlandingboard-1024x682.jpg'); }
.ac-course-header--c2 { background-image: url('/wp-content/uploads/2025/04/BeekeeperPullingFOB-1024x684.jpg'); }
.ac-course-header--c3 { background-image: url('/wp-content/uploads/2025/01/Honeycomb-600x450.jpg'); }

.ac-course-num {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #F4C542;
}
.ac-course-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.ac-course-desc {
    flex: 1;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.92);
    line-height: 1.55;
    min-width: 0;
    margin: 0;
}
.ac-course-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
    width: 220px;
}
.ac-course-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.ac-course-progress .ac-progress-bar { flex: 1; }

/* ─── Section table ───────────────────────────────────────────────────── */
.ac-section-table {
    width: 100%;
    border-collapse: collapse;
}
.ac-section-table tr { border-bottom: 1px solid #f3f4f6; }
.ac-section-table tr:last-child { border-bottom: none; }
.ac-section-table td {
    padding: 12px 16px;
    font-size: 0.82rem;
    vertical-align: middle;
}
.ac-section-table td:first-child { padding-left: 28px; }
.ac-section-table td:last-child { padding-right: 28px; }

.ac-sec-num {
    color: #9ca3af;
    font-size: 0.82rem;
    font-weight: 700;
    margin-right: 4px;
}
.ac-sec-title { color: #374151; font-weight: 500; }
.ac-sec-title a { color: inherit; text-decoration: none; }
.ac-sec-title a:hover { color: #152F5E; }
.ac-sec-excerpt {
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.45;
    margin-top: 2px;
}

/* Section pills row (View + Test + Webinar on one line) */
.ac-sec-pills {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

.ac-td-title { }
.ac-td-pills { text-align: right; white-space: nowrap; min-width: 320px; }

/* ─── Test group — visual zone ────────────────────────────────────────── */
.ac-test-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 6px;
}
.ac-test-group--passed .ac-test-result { border-left-color: #a7f3d0; background: #fafffe; }
.ac-test-group--failed .ac-test-result { border-left-color: #fde68a; background: #fffefb; }

.ac-test-result {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: #6b7280;
    background: #f9fafb;
    border-left: 2px solid #e5e7eb;
    border-radius: 0 6px 6px 0;
    padding: 5px 10px;
}
.ac-test-result__score { font-weight: 600; color: #374151; }
.ac-test-result__date { color: #6b7280; }
.ac-test-result__review {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.6;
    cursor: pointer;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.ac-test-result__review:hover { background: #fef3c7; border-color: #fcd34d; }
.ac-test-not-taken {
    font-size: 0.72rem;
    color: #9ca3af;
    flex: 1;
}

/* ─── Course footer ────────────────────────────────────────────────────── */
.ac-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #fafbfc;
    border-top: 1px solid #f3f4f6;
}
.ac-course-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ═══════════════════════════════════════════════════════════════════════
   Welcome notice (non-members, top of page)
   ═══════════════════════════════════════════════════════════════════════ */
.ac-landing-notice {
    max-width: var(--pb-site-container-width, 1400px);
    margin: 0 auto;
    padding: 32px 24px 0;
}
.ac-landing-notice__body {
    max-width: 820px;
    margin: 0 auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #F4C542;
    border-radius: 8px;
    padding: 24px 28px;
}
.ac-landing-notice__heading {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #152F5E;
    margin: 0 0 8px;
}
.ac-landing-notice__text {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.55;
    margin: 0 0 12px;
}
.ac-landing-notice__benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}
.ac-landing-notice__benefits li {
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.5;
    padding-left: 20px;
    position: relative;
}
.ac-landing-notice__benefits li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #F4C542;
    font-weight: 700;
}
.ac-landing-notice__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.ac-landing-notice__btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: #F4C542;
    color: #152F5E;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    transition: background 0.15s;
}
.ac-landing-notice__btn:hover { background: #d4a722; color: #152F5E; }
.ac-landing-notice__signin {
    font-size: 0.82rem;
    color: #9ca3af;
}
.ac-landing-notice__signin a {
    color: #152F5E;
    text-decoration: underline;
    font-weight: 500;
}
.ac-landing-notice__signin a:hover { color: #1e3f78; }

/* ═══════════════════════════════════════════════════════════════════════
   CTA block (non-members)
   ═══════════════════════════════════════════════════════════════════════ */
.ac-landing-cta {
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    padding: 60px 24px;
    text-align: center;
}
.ac-landing-cta__inner {
    max-width: 560px;
    margin: 0 auto;
}
.ac-landing-cta__heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #152F5E;
    margin: 0 0 12px;
}
.ac-landing-cta__text {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 24px;
}
.ac-landing-cta__btn {
    display: inline-flex;
    align-items: center;
    padding: 13px 32px;
    background: #F4C542;
    color: #152F5E;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.15s;
}
.ac-landing-cta__btn:hover { background: #d4a722; }

/* ═══════════════════════════════════════════════════════════════════════
   Review Answers Dialog (Modal)
   ═══════════════════════════════════════════════════════════════════════ */
.ac-review-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 640px;
    width: calc(100% - 32px);
    max-height: 85vh;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    margin: auto;
}
.ac-review-dialog::backdrop {
    background: rgba(10, 22, 40, 0.5);
}
.ac-review-dialog__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
}
.ac-review-dialog__section-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #152F5E;
    flex: 1;
}
.ac-review-dialog__score {
    font-size: 0.78rem;
    color: #6b7280;
}
.ac-review-dialog__close {
    width: 32px; height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background 0.15s;
}
.ac-review-dialog__close:hover { background: #e5e7eb; }

.ac-review-dialog__body {
    padding: 16px 24px 20px;
    overflow-y: auto;
    max-height: calc(85vh - 130px);
}

.ac-review-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 0.875rem;
}
.ac-review-item--correct { background: #f0fdf4; }
.ac-review-item--wrong { background: #fef2f2; }
.ac-review-item__question {
    font-weight: 600; color: #1a1a1a;
    margin-bottom: 6px; line-height: 1.4;
}
.ac-review-item__answer {
    display: flex; align-items: flex-start;
    gap: 6px; line-height: 1.35;
}
.ac-review-item__answer svg { flex-shrink: 0; margin-top: 2px; }
.ac-review-item__correct { color: #14532d; }
.ac-review-item__wrong { color: #7f1d1d; }

.ac-review-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    border-radius: 0 0 12px 12px;
}
.ac-review-dialog__retake {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: #152F5E; color: #fff;
    font-size: 0.82rem; font-weight: 600;
    border-radius: 8px; border: none; cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.ac-review-dialog__retake:hover { background: #1e3f78; color: #fff; }
.ac-review-dialog__done {
    padding: 8px 18px;
    background: #f3f4f6; color: #374151;
    font-size: 0.82rem; font-weight: 600;
    border-radius: 8px; border: none; cursor: pointer;
    transition: background 0.15s;
}
.ac-review-dialog__done:hover { background: #e5e7eb; }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ac-back-link { display: none; }
    .ac-brand__logo { height: 28px; }

    .ac-landing-courses { padding: 20px 16px 40px; }

    .ac-course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 20px;
    }
    .ac-course-header-right {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    .ac-course-progress { flex: 1; }

    .ac-section-table td:first-child { padding-left: 20px; }
    .ac-section-table td:last-child { padding-right: 20px; }

    .ac-section-table,
    .ac-section-table tbody,
    .ac-section-table tr,
    .ac-section-table td { display: block; width: 100%; }
    .ac-section-table tr {
        padding: 10px 20px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }
    .ac-section-table td { padding: 0 !important; }
    .ac-td-title { flex: 1; min-width: 0; }
    .ac-td-pills { width: 100%; margin-top: 6px; }
    .ac-test-group { padding: 6px 10px; }

    .ac-course-footer { padding: 12px 20px; }

    .ac-landing-notice { padding: 20px 16px 0; }
    .ac-landing-notice__body { padding: 18px 20px; }
    .ac-landing-notice__benefits { grid-template-columns: 1fr; gap: 4px; }
    .ac-landing-notice__actions { flex-direction: column; align-items: flex-start; gap: 12px; }

    .ac-review-dialog { max-width: none; width: calc(100% - 16px); max-height: 92vh; }
    .ac-review-dialog__body { max-height: calc(92vh - 130px); }
}
