/* =============================================================================
   Dr. Jackie Eldridge — Course Player & Access Gate Styles
   Palette: Teal #3a6b65 | Gold #b89a5c | Dark #2d2d2d | Warm White #f7f5f1
   ============================================================================= */

/* ── Gate: outer wrap ──────────────────────────────────────────────────────── */
.dje-gate-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 0 80px;
    font-family: inherit;
}

/* ── Eyebrow label ─────────────────────────────────────────────────────────── */
.dje-gate-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #b89a5c;
    border: 1.5px solid #b89a5c;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

/* ── Hero: two-column ──────────────────────────────────────────────────────── */
.dje-gate-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 64px;
}

.dje-gate-title {
    font-size: 34px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 0 0 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.dje-gate-desc {
    color: #666;
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 28px;
}

.dje-gate-desc p { margin: 0 0 12px; }
.dje-gate-desc p:last-child { margin-bottom: 0; }

/* ── Hero CTA area ─────────────────────────────────────────────────────────── */
.dje-gate-hero-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.dje-gate-price-inline {
    font-size: 30px;
    font-weight: 700;
    color: #3a6b65;
    letter-spacing: -1px;
    line-height: 1;
}

.dje-gate-guarantee {
    margin: 0;
    font-size: 12px;
    color: #aaa;
    letter-spacing: 0.2px;
}

/* ── Hero image ────────────────────────────────────────────────────────────── */
.dje-gate-image-col {
    position: relative;
}

.dje-gate-image-col::before {
    content: '';
    position: absolute;
    inset: -12px -12px 12px 12px;
    background: #e8e3da;
    border-radius: 16px;
    z-index: 0;
}

.dje-gate-hero-img {
    position: relative;
    z-index: 1;
    width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

/* ── Module cards section ──────────────────────────────────────────────────── */
.dje-gate-modules-section {
    margin-bottom: 48px;
}

.dje-gate-modules-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #999;
    margin: 0 0 20px;
}

.dje-module-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.dje-module-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #ece8e2;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dje-module-card:hover {
    border-color: #c8b9a4;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.dje-module-card-icon {
    font-size: 22px;
    width: 40px;
    height: 40px;
    background: #f7f4ef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dje-module-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.dje-module-card-num {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #b89a5c;
}

.dje-module-card-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d2d2d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dje-module-card-lock {
    font-size: 13px;
    opacity: 0.3;
    flex-shrink: 0;
}

/* ── Restore access bar ────────────────────────────────────────────────────── */
.dje-gate-restore {
    background: #f7f5f1;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dje-gate-restore-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0;
    white-space: nowrap;
}

.dje-unlock-form {
    display: flex;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

.dje-unlock-form input[type=email] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.dje-unlock-form input[type=email]:focus {
    outline: none;
    border-color: #3a6b65;
    box-shadow: 0 0 0 2px rgba(58,107,101,0.12);
}

.dje-msg {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
}

.dje-msg-success { background: #d4edda; color: #155724; }
.dje-msg-error   { background: #f8d7da; color: #721c24; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.dje-btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.dje-btn-enroll {
    background: #3a6b65;
    color: #fff !important;
}
.dje-btn-enroll:hover {
    background: #2a4f4a;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(58,107,101,0.3);
}

.dje-btn-large {
    padding: 14px 36px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
}

.dje-btn-secondary {
    background: transparent;
    color: #3a6b65 !important;
    border: 2px solid #3a6b65;
    white-space: nowrap;
}
.dje-btn-secondary:hover {
    background: #3a6b65;
    color: #fff !important;
}
.dje-btn-secondary:disabled {
    border-color: #ccc;
    color: #ccc !important;
    cursor: not-allowed;
}

.dje-btn-sold-out {
    background: #ccc;
    color: #888 !important;
    cursor: not-allowed;
}

/* =============================================================================
   Course Player (unlocked view)
   ============================================================================= */

.dje-player-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
    font-family: inherit;
}

.dje-player-header {
    background: linear-gradient(135deg, #3a6b65 0%, #2a4f4a 100%);
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.dje-player-header h2 { color:#fff; margin:0 0 4px; font-size:20px; }
.dje-player-access    { color:rgba(255,255,255,0.8); font-size:13px; }

.dje-player-progress { text-align:right; }
.dje-progress-label  { font-size:12px; color:rgba(255,255,255,0.8); margin-bottom:6px; }

.dje-progress-track {
    width: 200px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}
.dje-progress-fill {
    height: 100%;
    background: #b89a5c;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.dje-player-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}

.dje-module-nav {
    background: #fff;
    border: 1px solid #e8e4de;
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.dje-module-nav-title {
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    background: #f7f5f1;
    border-bottom: 1px solid #e8e4de;
}

.dje-module-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 12px 18px;
    background: none;
    border: none;
    border-bottom: 1px solid #f0ede8;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: background 0.15s;
}
.dje-module-nav-item:last-child { border-bottom: none; }
.dje-module-nav-item:hover      { background: #f7f5f1; color: #3a6b65; }
.dje-module-nav-item.active     { background: #eef4f3; color: #3a6b65; font-weight: 600; }

.dje-module-check { font-size: 14px; color: #ccc; flex-shrink: 0; }
.dje-module-nav-item.completed .dje-module-check { color: #3a6b65; }
.dje-module-nav-label { line-height: 1.3; }

.dje-player-content { display: flex; flex-direction: column; gap: 14px; }

.dje-iframe-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8e4de;
    background: #1a1a1a;
    aspect-ratio: 16 / 9;
}

.dje-iframe-loading {
    position: absolute; inset: 0;
    background: #f7f5f1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; z-index: 2;
}
.dje-iframe-loading p { color: #888; font-size: 14px; margin: 0; }

#dje-module-iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%; border: none;
}

.dje-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dje-module-current-label {
    font-size: 14px; font-weight: 600;
    color: #3a6b65; text-align: center; flex: 1;
}

/* ── Loading overlay ─────────────────────────────────────────────────────── */
#dje-loading-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.dje-loader {
    background: #fff; border-radius: 12px;
    padding: 40px 50px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.dje-loader p { margin: 16px 0 0; color: #555; font-size: 15px; }

.dje-spinner {
    width: 44px; height: 44px;
    border: 3px solid #f0ede8;
    border-top-color: #3a6b65;
    border-radius: 50%;
    animation: dje-spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes dje-spin { to { transform: rotate(360deg); } }

/* ── Error modal ─────────────────────────────────────────────────────────── */
#dje-error-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.dje-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.dje-modal-box {
    position: relative; background: #fff;
    border-radius: 12px; padding: 40px 44px;
    max-width: 440px; width: 90%; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.dje-modal-close {
    position: absolute; top: 14px; right: 18px;
    background: none; border: none; font-size: 22px;
    cursor: pointer; color: #999;
}
.dje-modal-icon { font-size: 40px; margin-bottom: 14px; }
.dje-modal-box h3 { color: #2d2d2d; margin: 0 0 10px; font-size: 20px; }
.dje-modal-box p  { color: #666; margin: 0 0 20px; }

/* ── No modules ──────────────────────────────────────────────────────────── */
.dje-no-modules {
    text-align: center; color: #888;
    font-style: italic; padding: 40px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .dje-gate-hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .dje-gate-image-col { order: -1; }
    .dje-gate-image-col::before { display: none; }
    .dje-gate-hero-img { aspect-ratio: 16 / 9; }
    .dje-gate-hero-cta { flex-direction: column; align-items: stretch; }
    .dje-btn-large { text-align: center; }
    .dje-gate-restore { flex-direction: column; align-items: stretch; }
    .dje-module-cards { grid-template-columns: 1fr; }
    .dje-player-layout { grid-template-columns: 1fr; }
    .dje-module-nav { position: static; }
    .dje-progress-track { width: 120px; }
    .dje-iframe-wrap { aspect-ratio: 4 / 3; }
}
