:root {
    --tekst:   #814c4a;   /* tamna ruža - boja naslova sa slike */
    --ruza:    #b5777f;   /* boja dugmadi sa slike */
    --krem:    #f7ede1;
    --font:    'Source Serif 4', Georgia, 'Times New Roman', serif;
}

::-webkit-scrollbar { display: none; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    touch-action: pan-x pan-y;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    overflow-y: scroll;
    scrollbar-width: none;
    background-color: var(--krem);
    display: flex;
    justify-content: center;
    touch-action: pan-y;
}

.phone-container {
    width: 100vw;
    max-width: 450px;
    background-color: var(--krem);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}


/* =========================================================
   GLAVNA SLIKA + ZONE
   ---------------------------------------------------------
   Pozicije su u % VISINE slike (pozivnica.webp = 1021 x 8000 px).
   Otvori stranicu sa ?debug na kraju linka i pomjeraj brojeve
   dok crvene zone ne legnu tačno na dugmad sa slike.
   ========================================================= */
.section-1 {
    position: relative;
    width: 100%;
    container-type: inline-size;    /* veličine teksta u RSVP-u prate širinu slike */

    --kalendar-top:  46.96%;   /* "Dodaj u kalendar"   */
    --mapa-top:      64.16%;   /* "Otvori mapu"        */
    --potvrdi-top:   95.40%;   /* "Potvrdi dolazak"    */

    /* TAJMER - sredina cifara (po visini) i sredine 4 okvira (po širini) */
    --tajmer-top:    72.12%;
    --tajmer-x1:     19.2%;    /* dana    */
    --tajmer-x2:     39.2%;    /* sati    */
    --tajmer-x3:     59.2%;    /* minuta  */
    --tajmer-x4:     78.8%;    /* sekundi */

    /* RSVP: gdje počinje naslov (veći broj = niže) */
    --rsvp-top:      83.0%;
}

.glavna-slika { width: 100%; height: auto; display: block; }

.zona {
    position: absolute;
    display: block;
    border-radius: 50px;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    border: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}

.zona-kalendar { top: var(--kalendar-top); left: 19.6%; width: 60.8%; height: 1.50%; }
.zona-mapa     { top: var(--mapa-top);     left: 19.4%; width: 60.4%; height: 1.48%; }
.zona-potvrdi  { top: var(--potvrdi-top);  left: 19.6%; width: 59.8%; height: 1.50%; }

/* DEBUG - vidljive zone (index.html?debug) */
body.debug .zona   { background: rgba(255, 0, 0, 0.35); outline: 1px dashed red; }
body.debug .tajmer .broj { outline: 1px dashed red; background: rgba(255, 0, 0, 0.25); }


/* =========================================================
   KALENDAR MENI
   ========================================================= */
.calendar-options {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    z-index: 99999;
    overflow: hidden;
}
.calendar-options.show-menu { display: block; }
.calendar-options a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    -webkit-tap-highlight-color: transparent;
}
.calendar-options a img { width: 20px; height: auto; margin-right: 12px; }


/* =========================================================
   TAJMER - samo cifre preko okvira sa slike
   ========================================================= */
.tajmer {
    position: absolute;
    left: 0;
    width: 100%;
    top: var(--tajmer-top);
    height: 0;
    z-index: 8;
    pointer-events: none;
}
.tajmer .broj {
    position: absolute;
    top: 0;
    width: 16%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--tekst);
    font-weight: 700;
    font-size: 8.4cqw;
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}
#days    { left: var(--tajmer-x1); }
#hours   { left: var(--tajmer-x2); }
#minutes { left: var(--tajmer-x3); }
#seconds { left: var(--tajmer-x4); }


/* =========================================================
   RSVP - samo tekst, na roze oblaku sa slike
   ========================================================= */
.rsvp-forma {
    position: absolute;
    top: var(--rsvp-top);
    left: 13%;
    right: 13%;
    z-index: 9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* sve počinje od --rsvp-top i raste prema dugmetu */
    gap: 3.4cqw;
    color: var(--tekst);
}

.rsvp-naslov {
    text-align: center;
    font-size: 8.6cqw;
    font-weight: 700;
    line-height: 1.1;
    color: #a2656a;          /* ista porodica boja kao naslovi na slici (Proslava, Još samo...) */
    margin-bottom: 1cqw;
}

.rsvp-opis {
    text-align: center;
    font-size: 4.6cqw;
    line-height: 1.4;
    font-weight: 400;
}
.rsvp-opis b { font-weight: 700; }

.polje {
    width: 100%;
    border: 0;
    border-bottom: 1.5px solid rgba(129, 76, 74, 0.55);
    background: transparent;
    border-radius: 0;
    padding: 2.2cqw 1cqw;
    font-size: 4.6cqw;
    color: var(--tekst);
    text-align: center;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.polje::placeholder { color: rgba(129, 76, 74, 0.6); }
.polje:focus { border-bottom-color: var(--tekst); }
.polje:-webkit-autofill {
    -webkit-text-fill-color: var(--tekst) !important;
    transition: background-color 9999s ease-in-out 0s;
}

.rsvp-hint {
    text-align: center;
    font-size: 3.5cqw;
    line-height: 1.4;
    opacity: 0.85;
}

.pratilac-red { display: flex; align-items: center; gap: 3cqw; }
.pratilac-red .polje { flex: 1; text-align: left; }
#add-companion-btn {
    font-size: 4.2cqw;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    padding: 2cqw 0;
    -webkit-tap-highlight-color: transparent;
}

.companion-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5cqw 3cqw;
    justify-content: center;
}
.companion-list:empty { display: none; }
.companion-list li {
    font-size: 4cqw;
    font-style: italic;
}
.companion-list li::before { content: "• "; }

.potvrda-red {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5cqw;
    margin-top: 1cqw;
}
.potvrda-pitanje { font-size: 4.4cqw; }
.izbor { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.izbor input { position: absolute; opacity: 0; pointer-events: none; }
.izbor span {
    font-size: 5cqw;
    font-weight: 600;
    padding: 0 0.5cqw 0.6cqw;
    opacity: 0.55;
    border-bottom: 2px solid transparent;
}
.izbor input:checked + span {
    opacity: 1;
    border-bottom-color: var(--tekst);
}

.zona-potvrdi:disabled { cursor: default; }


/* =========================================================
   POPUP "uspješno"
   ========================================================= */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.popup-content {
    background: #fff7f1;
    border-radius: 20px;
    padding: 30px 26px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    color: var(--tekst);
}
.popup-content h3 { font-size: 20px; margin: 14px 0 6px; font-weight: 600; }
.popup-content p  { font-size: 15px; }
.success-icon { width: 64px; height: 64px; margin: 0 auto; }
.checkmark-svg { width: 100%; height: 100%; }
.checkmark__circle { stroke: var(--ruza); stroke-width: 2; stroke-dasharray: 166; stroke-dashoffset: 166; animation: crtaj 0.6s ease forwards; }
.checkmark__check  { stroke: var(--ruza); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: crtaj 0.4s 0.5s ease forwards; }
@keyframes crtaj { to { stroke-dashoffset: 0; } }


/* Zaštita slika: ne može se dugim pritiskom sačuvati/kopirati/dijeliti slika */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
body { -webkit-touch-callout: none; }
