/* =========================================================
   TIMER – KLEUREN EN VORMGEVING
   Pas vooral de variabelen hieronder aan.
   ========================================================= */

:root {
    --background: #f6eee4;
	--background-image: url("IMG_2557.JPEG");

    --timer-color: #ffffff24;
    --timer-empty: #0000;
    --timer-ring: rgba(255, 255, 255, 0);

    --time-color: #3b211d;

    --button-background: #fffaf4;
    --button-color: #5a463f;
    --button-shadow: rgba(72, 47, 35, 0.16);

    --dialog-background: #fffaf4;
    --dialog-text: #3b2a25;
    --dialog-accent: #ff665b;

    --timer-size: min(68vw, 68vh, 620px);
    --button-size: 92px;
}

/* ========================================================= */

* {
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--background);
	background-image: var(--background-image);
	background-size: cover;
    color: var(--time-color);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

button,
input {
    font: inherit;
}

.timer-app {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    padding:
        max(28px, env(safe-area-inset-top))
        max(28px, env(safe-area-inset-right))
        max(30px, env(safe-area-inset-bottom))
        max(28px, env(safe-area-inset-left));
}

.timer-wrap {
    display: grid;
    place-items: center;
    min-height: 0;
}

.timer-circle {
    --progress: 100%;
    width: var(--timer-size);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;

    background:
        conic-gradient(
            from 0deg,
            var(--timer-color) 0 var(--progress),
            var(--timer-empty) var(--progress) 100%
        );

    box-shadow:
        0 16px 42px rgba(90, 55, 45, 0.10),
        0 0 0 10px var(--timer-ring);
}

.timer-face {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.time {
    font-size: clamp(58px, 10vw, 116px);
    font-weight: 600;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 24px;
    padding-top: 24px;
}

.control-button {
    width: var(--button-size);
    height: var(--button-size);
    border: 0;
    border-radius: 50%;
    background: var(--button-background);
    color: var(--button-color);
    box-shadow:
        0 8px 20px var(--button-shadow),
        inset 0 0 0 1px rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}

.control-button:first-child {
    justify-self: start;
}

.control-button:last-child {
    justify-self: end;
}

.control-button.small {
    width: calc(var(--button-size) * 0.68);
    height: calc(var(--button-size) * 0.68);
    opacity: 0.88;
}

.control-button:active {
    transform: scale(0.96);
}


.button-icon {
    width: 42%;
    height: 42%;
    display: block;
    flex: 0 0 auto;
}

.control-button.small .button-icon {
    width: 40%;
    height: 40%;
}



.sound-icon {
    font-weight: 500;
}

/* Tijd instellen */

.dialog-backdrop {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(65, 45, 38, 0.28);
    backdrop-filter: blur(8px);
}

.dialog-backdrop.hidden {
    display: none;
}

.dialog {
    width: min(440px, 100%);
    padding: 30px;
    border-radius: 28px;
    background: var(--dialog-background);
    color: var(--dialog-text);
    box-shadow: 0 28px 80px rgba(65, 45, 38, 0.22);
}

.dialog h1 {
    margin: 0 0 26px;
    font-size: 28px;
    font-weight: 600;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.time-inputs label {
    display: grid;
    gap: 8px;
}

.time-inputs span {
    font-size: 14px;
    opacity: 0.72;
}

.time-inputs input {
    width: 100%;
    border: 1px solid rgba(60, 40, 35, 0.16);
    border-radius: 16px;
    padding: 14px 12px;
    background: white;
    color: var(--dialog-text);
    font-size: 30px;
    text-align: center;
    outline: none;
}

.time-inputs input:focus {
    border-color: var(--dialog-accent);
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.text-button {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    cursor: pointer;
}

.text-button.secondary {
    background: transparent;
    color: var(--dialog-text);
}

.text-button.primary {
    background: var(--dialog-accent);
    color: white;
}

/* Kleine schermen / staande iPad */

@media (max-width: 700px) {
    :root {
        --timer-size: min(82vw, 54vh);
        --button-size: 76px;
    }

    .timer-app {
        padding-left: 22px;
        padding-right: 22px;
    }

    .icon {
        font-size: 36px;
    }
}

/* =========================================================
   ACHTERGRONDGELUID AAN / UIT
   ========================================================= */

.control-button.small {
    position: relative;
}

.sound-status {
    position: absolute;
    bottom: 11px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.control-button.sound-on {
    opacity: 1;
    box-shadow:
        0 8px 20px var(--button-shadow),
        inset 0 0 0 3px var(--timer-color);
}

.control-button.sound-off {
    opacity: 0.55;
}
