@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font: "Inter", "Roboto", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --text-col: #1d2530;
    --container-bg-col: rgba(255, 255, 255, 0.55);
    --container-border-col: rgba(255, 255, 255, 0.65);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body {
    font-family: var(--font);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    color: var(--text-col);
}

h1 {
    font-size: 30px;
    font-weight: 700;
    padding-bottom: 5px;
    margin: 0;
    padding: 0 0 0.5rem;
    color: var(--text-col);
}

.timerContainer {
    text-align: center;
    background: var(--container-bg-col); 
    border: 1px solid var(--container-border-col);
    padding: 2.2rem;
    padding-top: 45px;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    overflow-y: auto;
    scrollbar-width: none;
    max-height: 75vh;
    
    /* position: sticky; 
    top: -45px;  */
    background-color: rgba(240, 240, 240, 0.8);
    backdrop-filter: blur(5px);
    padding-top: 10px;
    /* z-index: 10; */
}

.content {
    padding-top: 10px;
    padding-bottom: 10px;
}

.toggleContainer {
    display: flex;
    justify-content: center;
    gap: 30px;
}


/* Deprecated */
/* .toggleAudio {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.toggleAudio input {
    position: absolute;
    opacity: 0;
    width: 20;
    height: 20;
}

.toggleAudio img {
    width: 35px;
    height: 45px;
    cursor: pointer;
}

#audioOn {
    position: absolute;
    opacity: 0;
}

#audioMute {
    opacity: 1;
}

.toggleAudio input:not(:checked) ~ #audioOff {
    opacity: 1;
}

.toggleAudio input:not(:checked) ~ #audioOn {
    opacity: 0;
}

.toggleAudio input:checked ~ #audioOff {
    opacity: 0;
}

.toggleAudio input:checked ~ #audioOn {
    opacity: 1;
} */

.copyButton {
    position: relative;
    display: inline-block;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 35px;
    height: 45px;
}

.copyButton img {
    width: 35px;
    height: 45px;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

#copiedString {
    opacity: 0;
}

#copyString {
    opacity: 1;
}

.switch {
    position: relative;
    display: inline-block;
}

#timingData {
    border: rgba(202, 202, 202, 0.8);
    border-radius: 15px;
    margin-top: 30px;
    margin-bottom: 30px; 
    border-right-style: ridge;
    border-left-style: groove;

    /* position: sticky; 
    top: 80px;  */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding-top: 10px;
    border-radius: 15px 15px 15px 15px;
    /* z-index: 2; */
    /* box-shadow: 0 -100px 0 white; */
    background-color: rgba(255, 255, 255, 0.8);
}


/* Button Container Styles */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}


/* Button Styles */
#switchReset {
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    min-height: 40px;
    align-self: center;
    background-color: rgb(255, 80, 80);
    color: white;
    min-width: 100px;
}

#noRSIMeds {
    display: block;
    font-size: 13px;
    cursor: pointer;
    border: none;
    border-left: 3px grey solid;
    border-radius: 0px 5px 5px 0px;
    background-color: #e7e7e7;
}

#noRSIMeds:disabled {
    margin-left: auto;
    margin-right: auto;
    opacity: 80%;
    background-color: #cccccc;
    cursor: not-allowed;
}

#firstRSIPush, #switchButton1, #switchButtonTube, 
#switchButton2, #switchButton3 {
    display: block;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    min-height: 40px;
    padding: 10px;
    background-color: #e7e7e7;
}

#firstRSIPush {
    border-radius: 5px 0px 0px 5px;
    background-color: #e7e7e7;
}

#firstRSIPush:disabled, #switchButton1:disabled, #switchButtonTube:disabled, 
#switchButton2:disabled, #switchButton3:disabled {
    margin-left: auto;
    margin-right: auto;
    opacity: 80%;
    background-color: #cccccc;
    cursor: not-allowed;
}

#firstRSIPush:disabled span, #switchButton1:disabled span, #switchButtonTube:disabled span,
#switchButton2:disabled span, #switchButton3:disabled span {
    display: block;
    margin-left: auto;
    margin-right: auto;
    color: rgb(196, 25, 25);
    font-size: 18px;

    /* timestamp reveal anim */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    animation: revealStamp 0.32s ease forwards;
}

@keyframes revealStamp {
    0%   { max-height: 0;    opacity: 0; margin-top: 0; }
    100% { max-height: 2rem; opacity: 1; margin-top: 4px; }
}


/* Progress Bar Styles */
/* #dataProgressBar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
} */

/* .progressBox {
    width: 30px;
    height: 30px;
    color: white;
    background-color: white;
    display: flex;
    border-radius: 18px;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
} */


/* Timer Text Styles */
p span {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

#elapsedTime, #startTime {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}


/* Border Glow Effect */
.borderGlow {
    position: relative;
    padding: 5px;
    z-index: 999;
}

.borderGlow::before {
    content: '';
    position: absolute;
    border: 6px solid rgba(255,82,82,0.5);
    background-color: rgba(236, 48, 48, 0.342);
    border-radius: 25px;
    box-shadow: 
        0 0 10px rgba(209, 13, 13, 0.7),
        0 0 10px rgba(170, 42, 42, 0.7),
        0 0 15px rgba(255,82,82,0.3),
        0 0 20px rgba(255,82,82,0.2);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

.borderGlow.glow-active::before {
    opacity: 1;
    animation: pulseGlow 1.1s infinite;
    z-index: 999;
}

@keyframes pulseGlow {
    0% {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        opacity: 0.1;
        z-index: 999;
    }
    50% {
        top: -10px;
        right: -10px;
        bottom: -10px;
        left: -10px;
        opacity: 1;
        z-index: 999;
    }
    100% {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        opacity: 0;
        z-index: 999;
    }
}



/* Screen Variations */

/* Baseline -> iPhone SE */
@media (min-width: 35px) and (min-height: 35px) {

    .timerContainer {
        padding-bottom: 50px;
        background-color: white;
    }

    h1 {
        padding-top: 20px;
        /* position: sticky;
        top: 15px; */
        font-size: 25px;
        /* z-index: 3; */
    }

    .content {
        font-size: 5px;
    }
    
    .toggleContainer {
        padding-bottom: 50px;
    }

    #startTime, #elapsedTime {
        font-size: 17px;
        margin: 0; 
        padding: 4px 0;
    }

    #switchReset {
        min-height: 30px;
        min-width: 100px;
    }

    .button-container {
        gap: 10px;
        width: 98%;
    }

    #firstRSIPush, #switchButton1, #switchButtonTube, 
    #switchButton2, #switchButton3 {
        font-size: 14px;
        min-height: 30px;
    }

    #firstRSIPush:disabled span, #switchButton1:disabled span, #switchButtonTube:disabled span,
    #switchButton2:disabled span, #switchButton3:disabled span {
        font-size: 15px;
    }

    .copyButton {
        width: 25px;
        height: 35px;
    }
    
    .copyButton img {
        width: 25px;
        height: 35px;
    }

    .toggleHandoff {
        display: flex; 
        align-items: center;
        width: 40%;
    }

    #shareText {
        width: 60%;
    }

}


@media (min-width: 400px) {

    h1 {
        padding-top: 60px;
    }

    .content {
        font-size: 10px;
    }

    .timerContainer {
        height: 70vh;
        width: 300px;
    }


/* PC / Laptop / iPad */
@media (min-width: 720px) {

    h1 {
        padding-top: 60px;
    }

    .timerContainer {
        max-height: 70vh;
        height: auto;
        width: 350px;
    }

    .toggleContainer {
        padding-bottom: 100px;
    }

}

@media (min-width: 2560px) {

    .timerContainer {
        max-height: 50vh;
        height: auto;
        width: 350px;
    }

    .toggleContainer {
        padding-bottom: 100px;
    }

}