/**
 * Breath Pacer CSS
 * Breathflow Connection
 */

/* Pacer circle */
.pacer-circle-wrap {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

@media (min-width: 400px) {
    .pacer-circle-wrap {
        width: 280px;
        height: 280px;
    }
}

@media (min-width: 640px) {
    .pacer-circle-wrap {
        width: 320px;
        height: 320px;
    }
}

.pacer-circle {
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    background: radial-gradient(circle at 40% 35%, rgba(86, 196, 224, 0.18), rgba(86, 196, 224, 0.04) 70%);
    border: 2px solid rgba(86, 196, 224, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    transform: scale(0.55);
    box-shadow: 0 0 30px rgba(86, 196, 224, 0.08), inset 0 0 40px rgba(86, 196, 224, 0.04);
    will-change: transform, box-shadow;
}

/* Phase specific styles */
.pacer-circle.phase-inhale {
    border-color: rgba(86, 196, 224, 0.5);
    box-shadow: 0 0 50px rgba(86, 196, 224, 0.25), 0 0 100px rgba(86, 196, 224, 0.1), inset 0 0 40px rgba(86, 196, 224, 0.08);
}

.pacer-circle.phase-hold1 {
    border-color: rgba(86, 196, 224, 0.45);
    box-shadow: 0 0 50px rgba(86, 196, 224, 0.22), 0 0 80px rgba(86, 196, 224, 0.08), inset 0 0 35px rgba(86, 196, 224, 0.06);
}

.pacer-circle.phase-exhale {
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.12), 0 0 60px rgba(96, 165, 250, 0.05), inset 0 0 30px rgba(96, 165, 250, 0.04);
}

.pacer-circle.phase-hold2 {
    border-color: rgba(96, 165, 250, 0.25);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.08), inset 0 0 25px rgba(96, 165, 250, 0.03);
}

/* Prompt text inside circle */
.pacer-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 2;
    width: 80%;
}

.pacer-prompt-text {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(232, 237, 243, 0.9);
    transition: color 0.4s ease;
}

@media (min-width: 640px) {
    .pacer-prompt-text {
        font-size: 1.5rem;
    }
}

.pacer-prompt-timer {
    font-size: 0.875rem;
    color: rgba(232, 237, 243, 0.5);
    margin-top: 0.25rem;
}

/* Mode selector tabs */
.pacer-mode-btn {
    padding: 0.625rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 237, 243, 0.5);
    background: transparent;
    border: 1px solid rgba(86, 196, 224, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
}

@media (max-width: 399px) {
    .pacer-mode-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.625rem;
    }
}

.pacer-mode-btn:hover {
    color: rgba(232, 237, 243, 0.8);
    border-color: rgba(86, 196, 224, 0.3);
}

.pacer-mode-btn:focus-visible {
    outline: 2px solid #56C4E0;
    outline-offset: 2px;
}

.pacer-mode-btn.active {
    color: #56C4E0;
    border-color: #56C4E0;
    background: rgba(86, 196, 224, 0.08);
}

/* Control buttons */
.pacer-ctrl-btn {
    padding: 0.75rem 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-height: 48px;
    min-width: 100px;
}

.pacer-ctrl-btn:focus-visible {
    outline: 2px solid #56C4E0;
    outline-offset: 2px;
}

.pacer-ctrl-btn.primary {
    background: #56C4E0;
    color: #0A0E17;
}

.pacer-ctrl-btn.primary:hover {
    background: #7DD4EC;
}

.pacer-ctrl-btn.secondary {
    background: transparent;
    color: rgba(232, 237, 243, 0.6);
    border: 1px solid rgba(232, 237, 243, 0.15);
}

.pacer-ctrl-btn.secondary:hover {
    color: rgba(232, 237, 243, 0.9);
    border-color: rgba(232, 237, 243, 0.3);
}

/* Custom inputs */
.pacer-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.pacer-input-group label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(232, 237, 243, 0.45);
}

.pacer-input-group input[type="number"] {
    width: 4.5rem;
    text-align: center;
    padding: 0.5rem 0.5rem;
    font-size: 1rem;
    color: #E8EDF3;
    background: rgba(86, 196, 224, 0.06);
    border: 1px solid rgba(86, 196, 224, 0.2);
    outline: none;
    transition: border-color 0.2s ease;
    -moz-appearance: textfield;
    min-height: 44px;
}

.pacer-input-group input[type="number"]::-webkit-outer-spin-button,
.pacer-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pacer-input-group input[type="number"]:focus {
    border-color: #56C4E0;
}

/* Session timer */
.pacer-session-time {
    font-variant-numeric: tabular-nums;
}

/* Outer ring pulse for active state */
.pacer-circle-wrap.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50% !important;
    border: 1px solid rgba(86, 196, 224, 0.08);
    animation: pacer-ring-pulse 4s ease-in-out infinite;
}

@keyframes pacer-ring-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.03); }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .pacer-circle {
        transition: none;
    }
    .pacer-circle-wrap.active::before {
        animation: none;
    }
    @keyframes pacer-ring-pulse {
        0%, 100% { opacity: 0.5; transform: none; }
    }
}
