/*
 * wtdTutorial.css
 * WheresTheDance.com — Tutorial Mode styles
 * Deploy to: /CSS/wtdTutorial.css
 * Generated: 2026-06-30 00:00 UTC
 * Namespaced entirely under #wtdTut and .wtdTut- to avoid collisions with existing site CSS.
 * No OPcache bust needed after upload (lives in /CSS/, not /auth/application/).
 *
 * Updated June 2026: added rating slide and "What's Missing?" chapter styles.
 * Updated 2026-06-30: chapter-num circle font-size reduced to fit two-character
 * chapter numbers (6a, 6b) introduced when the renumbered chapter set went live.
 */

/* ============================================================
   VARIABLES (scoped to tutorial elements)
   ============================================================ */
#wtdTutPanel,
#wtdTutChapterMenu,
#wtdTutLaunchBtn,
#wtdTutCallout,
#wtdTutRing,
#wtdTutOffPrompt {
    --wtd-blue:        #2471a3;
    --wtd-blue-hover:  #1a5276;
    --wtd-orange:      #e67e22;
    --wtd-orange-hover:#d35400;
    --wtd-green:       #27ae60;
    --wtd-amber:       #f39c12;
    --wtd-grey-light:  #f0f2f5;
    --wtd-grey-mid:    #bdc3c7;
    --wtd-grey-dark:   #7f8c8d;
    --wtd-text:        #2c3e50;
    --wtd-shadow:      0 4px 16px rgba(0,0,0,0.18);
    --wtd-radius:      8px;
    --wtd-font:        Arial, Helvetica, sans-serif;
}

/* Rating and missing slides share the same variables but sit inside #wtdTutPanel,
   so they inherit from it automatically. No extra selector needed. */

/* ============================================================
   LAUNCH BUTTON — ℹ Tutorial (always visible)
   ============================================================ */
#wtdTutLaunchBtn {
    position:    fixed;
    top:         141px;
    right:       18px;
    z-index:     9000;
    display:     inline-flex;
    align-items: center;
    gap:         5px;
    padding:     4px 12px;
    background:  var(--wtd-blue);
    color:       #fff;
    border:      none;
    border-radius: 4px;
    font-family: var(--wtd-font);
    font-size:   13px;
    font-weight: 600;
    cursor:      pointer;
    box-shadow:  0 1px 4px rgba(0,0,0,0.25);
    transition:  background 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
    user-select: none;
    height:      23px;
    line-height: 1;
}

#wtdTutLaunchBtn:hover {
    background: var(--wtd-blue-hover);
}

/* Gentle pulse to draw attention for new visitors */
#wtdTutLaunchBtn.wtdTut-new {
    animation: wtdTutBtnPulse 2s ease-in-out 4;
}

@keyframes wtdTutBtnPulse {
    0%,100% { box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
    50%      { box-shadow: 0 0 0 5px rgba(36,113,163,0.35); }
}

@media (prefers-reduced-motion: reduce) {
    #wtdTutLaunchBtn.wtdTut-new {
        animation: none;
    }
}

/* Off state */
#wtdTutLaunchBtn.wtdTut-off {
    background: var(--wtd-grey-mid);
    color:      #555;
}

#wtdTutLaunchBtn.wtdTut-off:hover {
    background: #a0a8ad;
}

/* ============================================================
   FIRST-VISIT CALLOUT CARD
   ============================================================ */
#wtdTutCallout {
    position:      fixed;
    top:           178px; /* sits below the launch button */
    right:         18px;
    z-index:       9100;
    width:         280px;
    background:    #fff;
    border-radius: var(--wtd-radius);
    box-shadow:    var(--wtd-shadow);
    font-family:   var(--wtd-font);
    overflow:      hidden;

    /* entrance animation */
    opacity:   0;
    transform: translateY(12px);
    animation: wtdTutCalloutIn 0.4s ease forwards;
}

@keyframes wtdTutCalloutIn {
    to {
        opacity:   1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #wtdTutCallout {
        animation: none;
        opacity:   1;
        transform: none;
    }
}

.wtdTut-callout-header {
    background:  var(--wtd-orange);
    color:       #fff;
    font-size:   14px;
    font-weight: 700;
    padding:     10px 14px;
}

.wtdTut-callout-body {
    padding:     14px 14px 10px;
    color:       var(--wtd-text);
    font-size:   14px;
    line-height: 1.55;
}

.wtdTut-callout-body p {
    margin: 0 0 12px;
}

.wtdTut-callout-btn-primary {
    display:       block;
    width:         100%;
    padding:       11px 0;
    background:    var(--wtd-blue);
    color:         #fff;
    border:        none;
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     14px;
    font-weight:   600;
    cursor:        pointer;
    text-align:    center;
    margin-bottom: 8px;
    min-height:    44px;
    transition:    background 0.2s ease;
}

.wtdTut-callout-btn-primary:hover {
    background: var(--wtd-blue-hover);
}

.wtdTut-callout-btn-secondary {
    display:       block;
    width:         100%;
    padding:       9px 0;
    background:    var(--wtd-grey-light);
    color:         var(--wtd-grey-dark);
    border:        none;
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     13px;
    cursor:        pointer;
    text-align:    center;
    margin-bottom: 10px;
    min-height:    44px;
    transition:    background 0.2s ease;
}

.wtdTut-callout-btn-secondary:hover {
    background: #dde1e4;
}

/* upward arrow connecting callout to button above */
#wtdTutCallout::after {
    content:      '';
    position:     absolute;
    top:          -10px;
    right:        32px;
    border-left:  10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
    filter:       drop-shadow(0 -3px 2px rgba(0,0,0,0.12));
}

/* ============================================================
   OFF PROMPT — small popover when Tutorial is Off
   ============================================================ */
#wtdTutOffPrompt {
    position:      fixed;
    top:           178px;
    right:         18px;
    z-index:       9100;
    width:         240px;
    background:    #fff;
    border-radius: var(--wtd-radius);
    box-shadow:    var(--wtd-shadow);
    font-family:   var(--wtd-font);
    padding:       16px;
    display:       none;
}

#wtdTutOffPrompt p {
    margin:      0 0 12px;
    font-size:   14px;
    color:       var(--wtd-text);
    line-height: 1.5;
}

.wtdTut-offprompt-yes {
    display:       inline-block;
    padding:       9px 18px;
    background:    var(--wtd-blue);
    color:         #fff;
    border:        none;
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     14px;
    font-weight:   600;
    cursor:        pointer;
    min-height:    44px;
    margin-right:  8px;
    transition:    background 0.2s ease;
}

.wtdTut-offprompt-yes:hover {
    background: var(--wtd-blue-hover);
}

.wtdTut-offprompt-cancel {
    display:     inline-block;
    padding:     9px 12px;
    background:  none;
    color:       var(--wtd-grey-dark);
    border:      none;
    font-family: var(--wtd-font);
    font-size:   13px;
    cursor:      pointer;
    min-height:  44px;
    transition:  color 0.2s ease;
}

.wtdTut-offprompt-cancel:hover {
    color: var(--wtd-text);
}

/* ============================================================
   CHAPTER MENU — modal overlay + card
   ============================================================ */
#wtdTutMenuOverlay {
    position:   fixed;
    inset:      0;
    z-index:    9200;
    background: rgba(0,0,0,0.45);
    display:    none;
}

#wtdTutChapterMenu {
    position:      fixed;
    top:           50%;
    left:          50%;
    transform:     translate(-50%, -50%);
    z-index:       9300;
    width:         min(480px, calc(100vw - 32px));
    max-height:    80vh;
    overflow-y:    auto;
    background:    #fff;
    border-radius: var(--wtd-radius);
    box-shadow:    var(--wtd-shadow);
    font-family:   var(--wtd-font);
    display:       none;
}

.wtdTut-menu-header {
    background:    var(--wtd-blue);
    color:         #fff;
    padding:       14px 18px;
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    border-radius: var(--wtd-radius) var(--wtd-radius) 0 0;
}

.wtdTut-menu-header h2 {
    margin:      0;
    font-size:   17px;
    font-weight: 700;
    font-family: var(--wtd-font);
    color:       #fff;
}

.wtdTut-menu-close {
    background:  none;
    border:      none;
    color:       #fff;
    font-size:   20px;
    cursor:      pointer;
    padding:     4px 8px;
    line-height: 1;
    min-width:   44px;
    min-height:  44px;
    display:     flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition:  background 0.15s ease;
}

.wtdTut-menu-close:hover {
    background: rgba(255,255,255,0.2);
}

.wtdTut-chapter-list {
    list-style: none;
    margin:     0;
    padding:    8px 0;
}

.wtdTut-chapter-row {
    display:     flex;
    align-items: center;
    gap:         14px;
    padding:     14px 18px;
    cursor:      pointer;
    border-bottom: 1px solid #eef0f2;
    transition:  background 0.15s ease;
}

.wtdTut-chapter-row:last-child {
    border-bottom: none;
}

.wtdTut-chapter-row:hover {
    background: var(--wtd-grey-light);
}

/* Number circle */
.wtdTut-chapter-num {
    width:           34px;
    height:          34px;
    min-width:       34px;
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       13px;   /* small enough to fit two-character labels like 6a / 6b */
    font-weight:     700;
    font-family:     var(--wtd-font);
    color:           #fff;
    background:      var(--wtd-blue); /* default: unstarted */
    letter-spacing:  -0.3px;
}

.wtdTut-chapter-num.wtdTut-inprogress {
    background: var(--wtd-amber);
}

.wtdTut-chapter-num.wtdTut-done {
    background: var(--wtd-green);
}

.wtdTut-chapter-info {
    flex: 1;
}

.wtdTut-chapter-title {
    font-size:   15px;
    font-weight: 600;
    color:       var(--wtd-text);
    margin:      0 0 3px;
}

.wtdTut-chapter-meta {
    font-size: 13px;
    color:     var(--wtd-grey-dark);
}

.wtdTut-chapter-badge {
    font-size:     12px;
    font-weight:   600;
    padding:       3px 9px;
    border-radius: 12px;
    white-space:   nowrap;
}

.wtdTut-badge-inprogress {
    background: #fef3cd;
    color:      #856404;
}

.wtdTut-badge-done {
    background: #d4edda;
    color:      #155724;
}

/* External chapter row — lives on another page */
.wtdTut-chapter-external {
    opacity: 0.75;
}

.wtdTut-chapter-external:hover {
    opacity: 1;
}

.wtdTut-chapter-external .wtdTut-chapter-meta {
    font-style: italic;
}

.wtdTut-badge-external {
    background:     var(--wtd-blue);
    color:          #fff;
    text-decoration: none;
    font-size:      12px;
    font-weight:    600;
    padding:        3px 9px;
    border-radius:  12px;
    white-space:    nowrap;
    transition:     background 0.15s;
}

.wtdTut-badge-external:hover {
    background: var(--wtd-blue-hover);
    color:      #fff;
}

/* Reset All footer */
.wtdTut-menu-footer {
    padding:    12px 18px;
    border-top: 1px solid #eef0f2;
    text-align: center;
}

.wtdTut-reset-all {
    background:      none;
    border:          none;
    color:           var(--wtd-grey-dark);
    font-family:     var(--wtd-font);
    font-size:       13px;
    cursor:          pointer;
    text-decoration: underline;
    padding:         6px;
    transition:      color 0.15s ease;
}

.wtdTut-reset-all:hover {
    color: #c0392b;
}

/* Resume confirmation (shown inside chapter menu) */
#wtdTutResumePrompt {
    padding:     16px 18px;
    background:  #fffbf0;
    border-top:  2px solid var(--wtd-amber);
    font-family: var(--wtd-font);
    display:     none;
}

#wtdTutResumePrompt p {
    margin:      0 0 12px;
    font-size:   14px;
    color:       var(--wtd-text);
    line-height: 1.5;
}

.wtdTut-resume-btn {
    display:       inline-block;
    padding:       9px 18px;
    background:    var(--wtd-amber);
    color:         #fff;
    border:        none;
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     14px;
    font-weight:   600;
    cursor:        pointer;
    min-height:    44px;
    margin-right:  10px;
    transition:    background 0.2s ease;
}

.wtdTut-resume-btn:hover {
    background: #e67e22;
}

.wtdTut-restart-link {
    font-size:       13px;
    color:           var(--wtd-grey-dark);
    cursor:          pointer;
    text-decoration: underline;
}

.wtdTut-restart-link:hover {
    color: var(--wtd-text);
}

/* ============================================================
   TUTORIAL PANEL — floating step panel (right side)
   ============================================================ */
#wtdTutPanel {
    position:      fixed;
    top:           178px;
    right:         18px;
    z-index:       9400;
    width:         320px;
    background:    #fff;
    border-radius: var(--wtd-radius);
    box-shadow:    var(--wtd-shadow);
    font-family:   var(--wtd-font);
    display:       none;
    flex-direction: column;
    overflow:      hidden;
}

/* Title bar */
.wtdTut-panel-titlebar {
    background:      var(--wtd-blue);
    color:           #fff;
    padding:         10px 14px;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             8px;
}

.wtdTut-panel-chapter-label {
    font-size:   13px;
    font-weight: 600;
    flex:        1;
    line-height: 1.3;
}

.wtdTut-panel-chapters-link {
    font-size:       12px;
    color:           rgba(255,255,255,0.85);
    cursor:          pointer;
    text-decoration: underline;
    white-space:     nowrap;
    padding:         4px 6px;
    border-radius:   3px;
    transition:      background 0.15s ease;
}

.wtdTut-panel-chapters-link:hover {
    background: rgba(255,255,255,0.2);
    color:      #fff;
}

.wtdTut-panel-close {
    background:  none;
    border:      none;
    color:       #fff;
    font-size:   18px;
    cursor:      pointer;
    padding:     4px 6px;
    line-height: 1;
    min-width:   36px;
    min-height:  36px;
    display:     flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition:  background 0.15s ease;
}

.wtdTut-panel-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Progress bar */
.wtdTut-progress-track {
    height:     5px;
    background: #dce6ef;
}

.wtdTut-progress-fill {
    height:     5px;
    background: var(--wtd-orange);
    width:      0%;
    transition: width 0.35s ease;
}

/* Step counter */
.wtdTut-step-counter {
    padding:   6px 14px 0;
    font-size: 12px;
    color:     var(--wtd-grey-dark);
}

/* Step content */
.wtdTut-panel-body {
    padding: 10px 14px 12px;
}

.wtdTut-step-title {
    font-size:   17px;
    font-weight: 500;
    color:       var(--wtd-text);
    margin:      0 0 8px;
    line-height: 1.35;
    font-family: var(--wtd-font);
}

.wtdTut-step-text {
    font-size:   14px;
    color:       var(--wtd-text);
    line-height: 1.6;
    margin:      0;
}

/* Completed chapter note */
.wtdTut-completed-note {
    font-size:   13px;
    color:       var(--wtd-green);
    font-weight: 600;
    margin-bottom: 8px;
}

/* Dot row */
.wtdTut-dot-row {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             6px;
    padding:         8px 14px 4px;
    flex-wrap:       wrap;
}

.wtdTut-dot {
    width:         9px;
    height:        9px;
    border-radius: 50%;
    background:    var(--wtd-grey-mid);
    transition:    background 0.25s ease;
    flex-shrink:   0;
}

.wtdTut-dot.wtdTut-dot-visited {
    background: var(--wtd-blue);
}

.wtdTut-dot.wtdTut-dot-current {
    background: var(--wtd-orange);
    width:      11px;
    height:     11px;
}

/* Nav buttons */
.wtdTut-nav-row {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         10px 14px 14px;
    gap:             10px;
}

.wtdTut-btn-back {
    padding:       10px 18px;
    background:    var(--wtd-grey-light);
    color:         var(--wtd-text);
    border:        1px solid var(--wtd-grey-mid);
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     14px;
    font-weight:   600;
    cursor:        pointer;
    min-height:    44px;
    transition:    background 0.2s ease;
}

.wtdTut-btn-back:hover:not(:disabled) {
    background: #dde1e4;
}

.wtdTut-btn-back:disabled {
    opacity: 0.38;
    cursor:  default;
}

.wtdTut-btn-next {
    flex:          1;
    padding:       10px 18px;
    background:    var(--wtd-orange);
    color:         #fff;
    border:        none;
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     14px;
    font-weight:   600;
    cursor:        pointer;
    min-height:    44px;
    text-align:    center;
    transition:    background 0.2s ease;
}

.wtdTut-btn-next:hover {
    background: var(--wtd-orange-hover);
}

/* Done button variant (last step) */
.wtdTut-btn-next.wtdTut-btn-done {
    background: var(--wtd-green);
}

.wtdTut-btn-next.wtdTut-btn-done:hover {
    background: #1e8449;
}

/* ============================================================
   HIGHLIGHT RING
   ============================================================ */
#wtdTutRing {
    position:       fixed;
    z-index:        9350;
    pointer-events: none;
    border:         3px solid var(--wtd-orange);
    border-radius:  6px;
    visibility:     hidden;
    transition:     top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
    animation:      wtdTutRingPulse 1.2s ease-in-out infinite;
}

@keyframes wtdTutRingPulse {
    0%,100% {
        border-width: 3px;
        box-shadow:   0 0 4px 2px rgba(230,126,34,0.5);
    }
    50% {
        border-width: 5px;
        box-shadow:   0 0 12px 6px rgba(230,126,34,0.75);
    }
}

@media (prefers-reduced-motion: reduce) {
    #wtdTutRing {
        animation: none;
        transition: none;
    }
}

/* ============================================================
   MOBILE ≤600px
   ============================================================ */
@media screen and (max-width: 600px) {

    #wtdTutLaunchBtn {
        top:       108px;
        right:     50%;
        transform: translateX(50%);
    }

    #wtdTutCallout {
        top:       158px;
        right:     50%;
        transform: translateX(50%);
        width:     calc(100vw - 32px);
    }

    /* Hide the arrow on mobile (positioning is unreliable) */
    #wtdTutCallout::after {
        display: none;
    }

    #wtdTutOffPrompt {
        top:       158px;
        right:     50%;
        transform: translateX(50%);
        width:     calc(100vw - 32px);
    }

    #wtdTutPanel {
        top:           158px;
        right:         0;
        left:          0;
        width:         100%;
        border-radius: 0 0 var(--wtd-radius) var(--wtd-radius);
        max-height:    55vh;
        overflow-y:    auto;
    }

    #wtdTutChapterMenu {
        width:      calc(100vw - 16px);
        max-height: 85vh;
    }
}

/* ============================================================
   SCHEDULE PAGE — hint text centering
   The "Enter at least 2 characters..." message uses class
   .noEventMessage — confirmed via live browser inspection.
   Also centers the plain-text instruction line above it.
   TODO: migrate this rule to the schedule page's own stylesheet
   once that file is being edited.
   ============================================================ */
.noEventMessage {
    text-align: center !important;
}
#schedulesPage > p,
#eventSearchForm + p {
    text-align: center;
}

/* ============================================================
   RATING SLIDE  (June 2026 — Tutorial feedback feature)
   Appears inside #wtdTutPanel after a chapter is completed.
   Inherits all CSS variables from #wtdTutPanel above.
   ============================================================ */

/* Shared body wrapper for both rating and "What's Missing?" slides */
.wtdTut-rating-body {
    padding:     16px 14px 14px;
    font-family: var(--wtd-font);
}

.wtdTut-rating-prompt {
    font-size:   15px;
    font-weight: 600;
    color:       var(--wtd-text);
    margin:      0 0 14px;
    line-height: 1.4;
    text-align:  center;
}

/* ── Star row ── */
.wtdTut-stars {
    display:         flex;
    justify-content: center;
    gap:             8px;
    margin-bottom:   14px;
}

.wtdTut-star {
    background:  none;
    border:      none;
    font-size:   36px;      /* large enough for senior users */
    line-height: 1;
    color:       #d0d3d7;   /* unselected: grey */
    cursor:      pointer;
    padding:     4px;
    min-width:   44px;
    min-height:  44px;
    transition:  color 0.12s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.wtdTut-star:hover,
.wtdTut-star.wtdTut-star-hover {
    color:     var(--wtd-amber);
    transform: scale(1.15);
}

.wtdTut-star.wtdTut-star-active {
    color: var(--wtd-amber);
}

/* ── Comment area (slides in when rating < 5) ── */
.wtdTut-comment-area {
    margin-bottom: 14px;
}

.wtdTut-comment-label {
    display:     block;
    font-size:   13px;
    font-weight: 600;
    color:       var(--wtd-text);
    margin-bottom: 6px;
    line-height: 1.4;
}

.wtdTut-comment-box {
    width:       100%;
    box-sizing:  border-box;
    border:      1px solid var(--wtd-grey-mid);
    border-radius: 5px;
    padding:     8px 10px;
    font-family: var(--wtd-font);
    font-size:   14px;
    color:       var(--wtd-text);
    resize:      vertical;
    min-height:  90px;
    line-height: 1.5;
    transition:  border-color 0.15s ease;
}

.wtdTut-comment-box:focus {
    outline:    none;
    border-color: var(--wtd-blue);
    box-shadow: 0 0 0 2px rgba(36,113,163,0.2);
}

/* ── Footer row (Submit + Skip) ── */
.wtdTut-rating-footer {
    display:     flex;
    align-items: center;
    gap:         12px;
}

.wtdTut-rating-submit {
    flex:          1;
    padding:       11px 14px;
    background:    var(--wtd-blue);
    color:         #fff;
    border:        none;
    border-radius: 5px;
    font-family:   var(--wtd-font);
    font-size:     14px;
    font-weight:   600;
    cursor:        pointer;
    min-height:    44px;
    transition:    background 0.2s ease, opacity 0.2s ease;
    text-align:    center;
}

.wtdTut-rating-submit:hover:not(:disabled) {
    background: var(--wtd-blue-hover);
}

.wtdTut-rating-submit:disabled {
    opacity: 0.45;
    cursor:  default;
}

.wtdTut-rating-skip {
    background:      none;
    border:          none;
    color:           var(--wtd-grey-dark);
    font-family:     var(--wtd-font);
    font-size:       13px;
    cursor:          pointer;
    padding:         6px 4px;
    text-decoration: underline;
    min-height:      44px;
    transition:      color 0.15s ease;
    white-space:     nowrap;
}

.wtdTut-rating-skip:hover {
    color: var(--wtd-text);
}

/* ============================================================
   "WHAT'S MISSING?" chapter row — distinguished in chapter menu
   ============================================================ */
.wtdTut-chapter-missing {
    border-top:    2px dashed var(--wtd-grey-mid);
    margin-top:    4px;
    padding-top:   18px !important;
}

.wtdTut-chapter-missing .wtdTut-chapter-num {
    background: var(--wtd-orange);
}

.wtdTut-chapter-missing .wtdTut-chapter-title {
    font-style: italic;
}

.wtdTut-chapter-missing .wtdTut-chapter-meta {
    color:       var(--wtd-orange);
    font-weight: 600;
}
