/* hero-demo.css */

/* --- CSS Variables (Light & Dark Mode) --- */
:root {
    --demo-bg-primary: #ffffff;
    --demo-bg-secondary: #f5f5f7;
    --demo-bg-secondary50: #f5f5f788;
    --demo-bg-tertiary: #fafafa;
    --demo-text-primary: #1d1d1f;
    --demo-text-secondary: #86868b;
    --demo-accent-primary: #0071e3;
    --demo-accent-subtle: #bbddff;
    --demo-border-default: rgba(0, 0, 0, 0.2);
    --demo-timer-track: #e5e5e7;
    --demo-timer-progress: #0071e3;
    --demo-shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --demo-bg-primary: #000000;
        --demo-bg-secondary: #1c1c1e;
        --demo-bg-secondary50: #1c1c1e88;
        --demo-bg-tertiary: #2c2c2e;
        --demo-text-primary: #f5f5f7;
        --demo-text-secondary: #98989d;
        --demo-accent-primary: #0a84ff;
        --demo-accent-subtle: #021a32;
        --demo-border-default: rgba(255, 255, 255, 0.15);
        --demo-timer-track: #3a3a3c;
        --demo-timer-progress: #0a84ff;
        --demo-shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
    }
}

/* --- Main Widget Container --- */
#hero-demo-widget {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 20px;
    background: var(--demo-bg-secondary50);
    border: 1px solid var(--demo-border-default);
    box-shadow: var(--demo-bg-secondary) 0 0 32px -4px inset, var(--shadow-xl);
    backdrop-filter: blur(2px);
    position: relative;
}

/* --- Rerun Button --- */
#demo-rerun-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--demo-bg-tertiary);
    border: 1px solid var(--demo-border-default);
    color: var(--demo-text-secondary);
    border-radius: 99px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 150ms ease;
}
#demo-rerun-btn:hover {
    color: var(--demo-text-primary);
    transform: scale(1.1) rotate(90deg);
}
#demo-rerun-btn svg {
    width: 18px;
    height: 18px;
}

/* --- Timer --- */
.timer-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 48px;
}
.timer {
    transform: rotate(-90deg);
    filter: drop-shadow(var(--demo-shadow-lg));
}
.timer-track, .timer-progress {
    fill: none;
    stroke-width: 14;
}
.timer-track {
    stroke: var(--demo-timer-track);
}
.timer-progress {
    stroke: var(--demo-timer-progress);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}
.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
}
.timer-seconds {
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    color: var(--demo-text-primary);
}
.timer-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--demo-text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
}

/* --- Nudge Text & Animation --- */
.pause-message {
    margin-bottom: 48px;
}
.pause-headline {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--demo-text-primary);
}
.nudge-container {
    position: relative;
    height: 26px;
    overflow: hidden;
    cursor: pointer;
}
.nudge-text {
    font-size: 17px;
    color: var(--demo-text-secondary);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nudge-text.is-active {
    opacity: 1;
}
.animate-in {
    animation: slide-in-from-bottom 0.3s ease-out forwards;
}
.animate-out {
    animation: slide-out-to-top 0.3s ease-out forwards;
}

@keyframes slide-in-from-bottom {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes slide-out-to-top {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

/* --- Buttons --- */
.pause-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 150ms ease-out;
    text-decoration: none;
    min-width: 200px;
    border: none;
}
.btn-primary {
    background: radial-gradient(100% 100% at 50% -10%, white -30%, var(--demo-accent-primary) 80%);
    box-shadow: inset var(--demo-accent-subtle) 0 1px 17px -2px;
    color: white;
}
.btn-primary:hover {
    transform: scale(1.03);
}
.btn-subtle {
    background-color: var(--demo-bg-tertiary);
    color: var(--demo-text-primary);
    border: 1px solid var(--demo-border-default);
}
.btn-subtle:not([data-disabled="true"]):hover {
    transform: scale(1.03);
}
.btn[data-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none; /* Make it unclickable */
}

/* Logic for hiding/showing the arrow icon on the continue button */
.btn-subtle .btn-icon {
    opacity: 1;
    max-width: 18px;
    transition: all .5s ease;
    display: flex;
    flex-direction: column;
}
.btn-subtle[data-disabled="true"] .btn-icon {
    opacity: 0;
    max-width: 0px;
}
.btn-icon-svg {
    width: 20px;
    height: 20px;
}