/* Continuar sesión, pegado inteligente, arrastre global, compartir WA, modo escenario */

.continue-sessions {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 2px solid color-mix(in srgb, var(--accent-color) 42%, var(--border-color));
    background: color-mix(in srgb, var(--accent-color) 12%, var(--section-bg, #1c1c1e));
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.continue-sessions-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.continue-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.continue-session-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--input-bg, #2c2c2e);
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.continue-session-btn:hover {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 12%, var(--input-bg));
}

.continue-session-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.continue-session-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.smart-paste-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: color-mix(in srgb, #48dbfb 15%, var(--input-bg));
    border: 1px solid color-mix(in srgb, #48dbfb 45%, transparent);
    font-size: 0.88rem;
}

.smart-paste-banner[hidden] {
    display: none !important;
}

.smart-paste-banner button {
    border: none;
    background: var(--accent-color);
    color: #000;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

.smart-paste-dismiss {
    background: transparent !important;
    color: var(--text-dim) !important;
    font-weight: 400 !important;
    padding: 4px 8px !important;
}

.global-drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: none;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, #000 75%, transparent);
    pointer-events: none;
}

.global-drop-overlay.is-active {
    display: flex;
    pointer-events: auto;
}

.global-drop-inner {
    padding: 28px 36px;
    border-radius: 20px;
    border: 3px dashed var(--accent-color);
    background: color-mix(in srgb, var(--section-bg) 95%, transparent);
    text-align: center;
    max-width: 90vw;
}

.global-drop-inner i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.global-drop-inner p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-whatsapp-share {
    background: #25d366 !important;
    color: #fff !important;
    border: none;
}

.btn-whatsapp-share:hover {
    filter: brightness(1.08);
}

.share-wa-preview {
    margin: 12px 0 0;
    padding: 12px;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
    color: var(--text-dim);
}

/* Modo escenario — atril */
body.stage-mode-active .app-scroll,
body.stage-mode-active .practice-flow-strip,
body.stage-mode-active .stem-promo-banner,
body.stage-mode-active .onboarding-banner,
body.stage-mode-active .practice-dashboard,
body.stage-mode-active .practice-zone,
body.stage-mode-active .focus-session-bar {
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    opacity: 0;
}

body.stage-mode-active #stage-display {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    height: auto;
}

#stage-display {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5vh;
    padding: 24px;
    padding-top: max(72px, calc(12px + env(safe-area-inset-top, 0px)));
    background: #0a0a0a;
    color: #ffe600;
}

.stage-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 13002;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, #0a0a0a 85%, transparent);
}

.stage-top-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
}

.stage-theme-switch {
    display: flex;
    gap: 8px;
}

.stage-theme-btn {
    min-height: 44px;
    min-width: 88px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 2px solid #ffe600;
    background: transparent;
    color: #ffe600;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.stage-theme-btn:hover,
.stage-theme-btn:focus-visible {
    background: #ffe600;
    color: #0a0a0a;
    outline: none;
}

.stage-theme-btn:active {
    transform: scale(0.97);
}

#stage-display.is-hidden {
    display: none !important;
}

.stage-bpm-block {
    text-align: center;
}

.stage-bpm-label {
    display: block;
    font-size: clamp(1rem, 3vw, 1.4rem);
    letter-spacing: 0.2em;
    opacity: 0.85;
}

.stage-bpm-value {
    font-size: clamp(4rem, 18vw, 9rem);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stage-loop-name {
    font-size: clamp(2rem, 10vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: center;
    max-width: 95vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stage-countdown-wrap {
    position: relative;
    width: min(70vw, 320px);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-countdown-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        #ffe600 calc((1 - var(--stage-progress, 0)) * 360deg),
        #333 0
    );
    mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
    -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
}

.stage-countdown-ring.is-counting {
    animation: stage-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes stage-pulse {
    from { filter: brightness(1); }
    to { filter: brightness(1.25); }
}

.stage-countdown-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.stage-countdown-num {
    display: block;
    font-size: clamp(3rem, 14vw, 6rem);
    font-weight: 900;
    line-height: 1;
}

.stage-countdown-hint {
    display: block;
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    opacity: 0.8;
    margin-top: 6px;
}

[data-theme="escenario"] .stage-display-exit-hint {
    position: fixed;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    opacity: 0.65;
    z-index: 13001;
    max-width: 92vw;
    text-align: center;
    margin: 0;
}

[data-theme="escenario"] .stage-display-exit-hint strong {
    color: #ffe600;
    font-weight: 800;
}
