/* =============================================================================
   GrappleU Student Training Styles - Modular Import

   This file now imports from modular CSS files in the training/ directory.
   Original: 1604 lines -> Split into 10 focused modules
   ============================================================================= */

@import "training/index.css";

/* =========================================================================
   Student course-video player (coach-attached Bunny lesson)
   Rendered by js/student-course-video.js inside the lesson modal. The
   player box only takes layout once mounted (.cg-video-inline is added by
   the JS), so an un-clicked "Watch Lesson Video" button reserves no space.
   ========================================================================= */
.student-course-video-btn { margin-top: 0.25rem; }

.student-course-video-player.cg-video-inline {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.student-course-video-player .cg-video-stage {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}
.student-course-video-player .cg-video-stage iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.student-course-video-player .cg-video-watermark {
    position: absolute;
    bottom: 0.5rem;
    right: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.625rem;
    font-weight: 500;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    user-select: none;
}
.student-course-video-player .cg-video-loading-msg,
.student-course-video-player .cg-video-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}
.student-course-video-player .cg-video-error { color: #f87171; }

/* Course-video loading poster — show the lesson thumbnail behind a spinner
   while the signed URL resolves (instead of a bare "Loading…" line). */
.student-course-video-player.cg-video-loading {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.student-course-video-player .cg-video-poster {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.student-course-video-player .cg-video-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); /* dim so the spinner reads on a bright thumb */
}
.student-course-video-player .cg-video-spinner {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: scv-spin 0.8s linear infinite;
}
@keyframes scv-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .student-course-video-player .cg-video-spinner { animation: none; }
}

/* =========================================================================
   Member class reservations — day-view "Book" control
   States: Book / Book·N-left / Full–Join waitlist / Reserved ✓ / Waitlisted #N
   Tokens are theme-aware + WCAG-passing (white-on-accent #2563eb = 5.17:1).
   ========================================================================= */
.dv-reserve-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;            /* touch target */
    padding: 0 18px;
    margin: 4px 0 10px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}
.dv-reserve-btn:hover { filter: brightness(1.08); }
.dv-reserve-btn:active { transform: translateY(1px); }
.dv-reserve-btn:focus-visible {
    outline: 2px solid var(--text-on-accent);
    outline-offset: 2px;
}
.dv-reserve-btn:disabled { opacity: 1; cursor: progress; filter: brightness(0.9); }

/* Booked — solid success fill, white text (4.5:1+) */
.dv-reserve-btn--booked {
    background: var(--accent-success);
    color: var(--text-on-accent);
}
/* Waitlisted — outlined neutral so it reads as a holding state, not an action */
.dv-reserve-btn--waitlisted {
    background: var(--bg-card);
    color: var(--text-primary, #f5f5f7);
    border: 1.5px solid var(--border-strong, rgba(255,255,255,0.18));
}
/* Full — Join waitlist: muted accent so it's clearly secondary to a normal Book */
.dv-reserve-btn--full {
    background: var(--bg-card);
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

@media (max-width: 360px) {
    .dv-reserve-btn { width: 100%; }
}
