/* WOD Generator - additive styling on top of blog.css's dark-glassmorphism system.
   Reuses --blog-blue/--blog-green and the .blog-card/.blog-chip/.blog-btn-* tokens
   rather than redeclaring the color system. */

.wod-hero {
    text-align: center;
    padding: 32px 12px 20px;
}

.wod-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--blog-green);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .12em;
    margin-bottom: 10px;
}

.wod-hero-title {
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #edf3ff, var(--blog-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wod-hero-sub {
    color: rgba(237, 243, 255, .68);
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Config card ---------- */

.wod-config-card {
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 28px;
}

.wod-config-sub {
    color: rgba(237, 243, 255, .6);
    margin-bottom: 22px;
    font-size: .95rem;
}

.wod-filter-group {
    margin-bottom: 20px;
}

.wod-filter-group:last-of-type {
    margin-bottom: 0;
}

/* .blog-chip is styled for <a> by default in blog.css - reset native <button> chrome so it matches exactly. */
button.blog-chip {
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

button.blog-chip:hover {
    border-color: rgba(0, 183, 254, .4);
}

button.blog-chip.is-active {
    background: linear-gradient(135deg, var(--blog-blue), var(--blog-green));
}

button.blog-chip:focus-visible {
    outline: 2px solid var(--blog-green);
    outline-offset: 2px;
}

.wod-format-explainer {
    margin-top: 10px;
    font-size: .85rem;
    color: rgba(237, 243, 255, .68);
    min-height: 1.2em;
}

/* ---------- Duration - the primary, most prominent control ---------- */

.wod-duration-block {
    margin-bottom: 20px;
}

.wod-duration-label {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: #edf3ff;
}

.wod-duration-chips {
    gap: 12px;
}

.wod-duration-chip {
    min-height: 56px;
    min-width: 84px;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 10px 20px;
    flex: 1 1 84px;
}

.wod-duration-chip.is-active {
    box-shadow: 0 0 22px rgba(0, 255, 200, .28);
}

@media (max-width: 639px) {
    .wod-duration-chips {
        gap: 10px;
    }

    .wod-duration-chip {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 0;
    }
}

/* ---------- Advanced Options toggle + panel ---------- */

.wod-advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: rgba(237, 243, 255, .85);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.wod-advanced-toggle:hover {
    border-color: rgba(0, 183, 254, .4);
}

.wod-advanced-toggle:focus-visible {
    outline: 2px solid var(--blog-green);
    outline-offset: 2px;
}

.wod-advanced-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wod-advanced-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(0, 255, 200, .12);
    border: 1px solid rgba(0, 255, 200, .35);
    color: var(--blog-green);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.wod-advanced-chevron {
    transition: transform .2s ease;
    color: rgba(237, 243, 255, .55);
}

.wod-advanced-toggle[aria-expanded="true"] .wod-advanced-chevron {
    transform: rotate(180deg);
}

.wod-advanced-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .3s ease, opacity .25s ease, margin-top .3s ease;
}

.wod-advanced-panel.is-open {
    opacity: 1;
    margin-top: 18px;
}

.wod-advanced-panel-inner {
    padding: 4px 2px 2px;
}

.wod-reset-btn {
    background: none;
    border: none;
    color: rgba(237, 243, 255, .55);
    font-size: .82rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 6px 2px;
    min-height: 32px;
}

.wod-reset-btn:hover {
    color: var(--blog-green);
}

.wod-reset-btn:focus-visible {
    outline: 2px solid var(--blog-green);
    outline-offset: 2px;
}

.wod-error-msg {
    color: #ff8a8a;
    text-align: center;
    font-size: .85rem;
    margin: 12px 0 0;
}

.wod-generate-sticky {
    margin-top: 24px;
}

.wod-generate-btn {
    width: 100%;
    min-height: 52px;
    font-size: 1.05rem;
}

@media (max-width: 639px) {
    .wod-generate-sticky {
        position: sticky;
        bottom: 12px;
        z-index: 5;
        padding-top: 6px;
    }
}

/* ---------- Skeleton loading state ---------- */

.wod-skeleton {
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 28px;
}

.wod-skeleton-title {
    height: 22px;
    width: 55%;
    border-radius: 6px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.14) 37%, rgba(255,255,255,.06) 63%);
    background-size: 400% 100%;
    animation: wod-shimmer 1.4s ease infinite;
}

.wod-skeleton-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wod-skeleton-steps li {
    position: relative;
    padding-left: 26px;
    color: rgba(237, 243, 255, .55);
    font-size: .9rem;
    opacity: .4;
    transition: opacity .25s ease, color .25s ease;
}

.wod-skeleton-steps li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
}

.wod-skeleton-steps li.is-active {
    opacity: 1;
    color: var(--blog-green);
}

.wod-skeleton-steps li.is-active::before {
    border-color: var(--blog-green);
    box-shadow: 0 0 8px rgba(0, 255, 200, .5);
}

@keyframes wod-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* ---------- Result card ---------- */

.wod-result-card {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(0, 183, 254, .25);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 40px;
    box-shadow: 0 0 40px rgba(0, 183, 254, .06);
    animation: wod-reveal .35s ease;
}

@keyframes wod-reveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wod-result-eyebrow {
    color: var(--blog-green);
    font-weight: 700;
    letter-spacing: .12em;
    font-size: .8rem;
    text-align: center;
}

.wod-result-name {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin: 4px 0 8px;
}

.wod-result-format {
    text-align: center;
    display: block;
    margin: 0 auto 6px;
    width: fit-content;
    padding: 6px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blog-blue), var(--blog-green));
    color: #05131a;
    font-weight: 700;
    letter-spacing: .04em;
}

.wod-result-lead {
    text-align: center;
    color: rgba(237, 243, 255, .68);
    margin-bottom: 20px;
}

.wod-exercise-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wod-exercise-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .08);
}

.wod-exercise-image {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .06);
}

.wod-exercise-body {
    flex: 1;
    min-width: 0;
}

.wod-exercise-name {
    font-weight: 600;
    font-size: .95rem;
}

.wod-exercise-meta {
    color: rgba(237, 243, 255, .55);
    font-size: .78rem;
}

.wod-exercise-prescription {
    font-weight: 700;
    color: var(--blog-green);
    font-size: .95rem;
    white-space: nowrap;
}

.wod-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 18px;
    text-align: center;
}

.wod-result-meta-label {
    display: block;
    font-size: .7rem;
    letter-spacing: .08em;
    color: rgba(237, 243, 255, .5);
}

.wod-result-meta-value {
    display: block;
    font-weight: 700;
}

.wod-scaling-note {
    font-size: .82rem;
    color: rgba(237, 243, 255, .6);
    text-align: center;
    margin-bottom: 18px;
}

.wod-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.wod-saved-panel {
    text-align: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.wod-anon-cta {
    text-align: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed rgba(255, 255, 255, .12);
    color: rgba(237, 243, 255, .68);
}

.wod-resume-banner {
    background: rgba(0, 255, 200, .08);
    border: 1px solid rgba(0, 255, 200, .3);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: .9rem;
    text-align: center;
}

@media (max-width: 639px) {
    .wod-config-card,
    .wod-result-card {
        padding: 18px 16px;
    }

    .wod-exercise-row {
        flex-wrap: wrap;
    }
}
