/* color variables */
:root {
    --primary-color: #e24660;
    --secondary-color: #46e2c8;
    --tertiary-color: #587b7f;
    --dark-color: #333;
    --light-color: #394032;
    touch-action: manipulation;
}

body {
    font-family: Arial, sans-serif;
    color: white;
    margin: 0 auto;
    font-size: 3em;
    padding: 1em;
    max-width: 850px;
    background-color: var(--dark-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5em;
}

h1 {
    font-weight: normal;
}

h2 {
    font-weight: normal;
    font-size: 1em;
}

pre {
    font-weight: normal;
    font-size: 0.5em;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5em;
}

.alarm-form {
    background-color: var(--tertiary-color);
    padding: 1em;
    border-radius: 1em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.alarm-form:has(#enabledInput[type="checkbox"]:not(:checked)) {
    background-color: var(--light-color);
}

.snooze-row {
    font-size: 0.6em;
    margin: 0.4em 0;
}

#snoozeInput {
    font-size: 1em;
    background: none;
    border: none;
    filter: invert(100%);
    text-align: right;
    width: 2em;
}

.time-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    gap: 0.5em;
    align-items: center;
}

#timeInput {
    font-size: 2.5em;
    width: 100%;
    background: none;
    color: black;
    border: none;
    filter: invert(100%);
}

.week-day-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.round {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0.2em solid white;
    text-align: center;
    line-height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.round label {
    display: block;
    cursor: pointer;
}

.round input[type="checkbox"] {
    display: none;
}

.round:has(input[type="checkbox"]:checked) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.postpone-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

.postpone-row > label {
    font-size: 0.8em;
}

#postponeDateInput {
    font-size: 1em;
    background: none;
    color: black;
    border: none;
    filter: invert(100%);
}

#removeAlarmButton {
    background: none;
    font-size: 1.5em;
    border: none;
    border-radius: 50%;
}

#addPostponeDateButton,
#removePostponeDateButton {
    font-size: 1em;
    background: none;
}

/* only if it's the only one */

.alarm-form:only-child #removeAlarmButton {
    display: none;
}

button {
    background-color: var(--tertiary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#addAlarmButton {
    background-color: var(--primary-color);
    aspect-ratio: 1;
    border-radius: 50%;
    color: white;
    font-size: 2em;
    margin: 0 auto;
    padding: 0;
}

button:hover {
    background-color: var(--secondary-color);
}

#status {
    margin-top: 10px;
    color: var(--primary-color)
}

.hidden {
    display: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 2em;
    height: 1em;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 1em;
    -webkit-transition: .2s;
    transition: .2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 0.9em;
    width: 0.9em;
    left: 0.05em;
    top: 0.05em;
    border-radius: 1em;
    background-color: white;
    -webkit-transition: .2s;
    transition: .2s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
    -webkit-transform: translateX(1em);
    -ms-transform: translateX(1em);
    transform: translateX(1em);
}

.base {
    display: none;
}