/* ---------------------------------------------------
   WIDGET LAYOUT
--------------------------------------------------- */

#breathe-widget {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Only ONE screen visible at a time */
.breathe-screen {
    display: none;
}

.breathe-screen.active {
    display: block;
}

/* Select screen should be flex ONLY when active */
#breathe-screen-select.breathe-screen.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 10px;
}

/* ---------------------------------------------------
   ACCORDION
--------------------------------------------------- */

.breathe-accordion {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.accordion-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.accordion-item.open {
    opacity: 1;
    border-color: #8b5cf6;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.2);
}

.accordion-header {
    padding: 8px 12px;
    cursor: pointer;
    background: #fff;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    background: #fafafa;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.accordion-item.open .accordion-body {
    max-height: 140px;
    padding: 8px 12px;
}

.accordion-body p {
    margin: 0 0 6px 0;
    color: #444;
    line-height: 1.4;
}

.tags span {
    display: inline-block;
    background: #eee;
    padding: 3px 8px;
    margin: 2px 4px 0 0;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #555;
}

/* ---------------------------------------------------
   SLIDER + BUTTON
--------------------------------------------------- */

#duration-display {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1f7fa3;
}

.breathe-duration {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#duration-slider {
    width: 100%;
    -webkit-appearance: none;
    background: transparent;
}

#duration-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: linear-gradient(90deg, #6ec9e8, #3bafda);
    border-radius: 6px;
}

#duration-slider::-moz-range-track {
    height: 6px;
    background: linear-gradient(90deg, #6ec9e8, #3bafda);
    border-radius: 6px;
}

#duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background: #ffffff;
    border: 3px solid #3bafda;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59,175,218,0.4);
    cursor: pointer;
    margin-top: -7px;
}

#duration-slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    background: #ffffff;
    border: 3px solid #3bafda;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59,175,218,0.4);
    cursor: pointer;
}

#start-breathing {
    background: #3bafda;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59,175,218,0.25);
    transition: background 0.2s ease, transform 0.1s ease;
}

#start-breathing:hover {
    background: #1f7fa3;
}

#start-breathing:active {
    transform: scale(0.97);
}

/* ---------------------------------------------------
   BREATHING CIRCLE
--------------------------------------------------- */

#breathing-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 260px;
}

#breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    transform: scale(0.4);
    transition: none;

    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.28), rgba(255,255,255,0) 40%),
        radial-gradient(circle at 70% 70%, #6ec9e8, #3bafda 70%, #1f7fa3);

    box-shadow:
        0 0 40px rgba(59,175,218,0.45),
        inset 0 0 25px rgba(255,255,255,0.25);

    display: flex;
    justify-content: center;
    align-items: center;
}

#breathing-circle::after {
    content: "";
    position: absolute;
    inset: -25px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(110,201,232,0.35), rgba(59,175,218,0));
    filter: blur(40px);
    opacity: 0.7;
}

#breathing-text {
    position: absolute;
    text-align: center;
    color: white;
    font-weight: 600;
    pointer-events: none;
}

#breathing-method {
    font-size: 0.9rem;
    margin-bottom: 4px;
    opacity: 0.8;
}

#breathing-phase {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

#breathing-timer {
    font-size: 1.6rem;
}

#end-session {
    margin-top: 20px;
    display: block;
    margin: 20px auto 0 auto; /* centers horizontally */
    background: #3bafda;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59,175,218,0.25);
}



.breath-pattern {
    font-size: 0.85rem;
    color: #666;
    margin: 4px 0 8px 0;
    font-style: italic;
}



#session-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

#session-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f7fa3;
    margin: 0 0 6px 0;
}

#session-description {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 6px 0;
}

#session-pattern {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin: 0 0 10px 0;
}

#session-tags span {
    display: inline-block;
    background: #eee;
    padding: 3px 8px;
    margin: 2px 4px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #555;
}



#session-countdown {
    margin-top: 1rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #333; /* dark grey for light backgrounds */
    letter-spacing: 0.05em;
    opacity: 1;
    font-family: "Inter", "Segoe UI", sans-serif;
}



.breathe-safety {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555; /* soft grey for readability */
    opacity: 0.9;
    font-family: "Inter", "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
}



#breathe-footer {
    text-align: center;
    margin-top: 2rem;
    font-family: "Inter", "Segoe UI", sans-serif;
}

#breathe-footer a {
    color: #444;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

#breathe-footer a:hover {
    opacity: 1;
}

#breathe-footer .version {
    margin-left: 0.4rem;
    font-size: 0.85rem;
    color: #777;
}
