/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Tokens ── */
:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface2: #f4f4f9;
    --border: #d3d3f4;
    --text: #000000;
    --muted: #6b6b80;
    --radius: 12px;
    --font-body: 'DM Sans', sans-serif;
    --font-disp: 'Forum', serif;
    --font-scr: 'Forum', cursive;
    --scheme-bg: #fdf8f0;
    --scheme-accent: #c9a84c;
    --scheme-text: #000000;
    --scheme-muted: #8a7040;
    --scheme-btn: #c9a84c;
    --scheme-grid: #e8dfc8;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.header {
    padding: 28px 48px 18px;
    display: flex;
    align-items: baseline;
    gap: 16px;
    border-bottom: 1px dotted var(--muted);
}

.header-logo {
    font-family: var(--font-disp);
    font-size: 1.1rem;
    letter-spacing: 0;
    font-weight: bold;
    color: #8a6f3e;
}

.header-logo span {
    color: var(--text);
}

.header-tag {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Layout ── */
.stage {
    flex: 1;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    padding: 36px 48px 48px;
    align-items: start;
}

/* ── Controls ── */
.controls {
    padding-right: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 36px;
}

.section-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

/* ── Inputs ── */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.field input[type="text"],
.field input[type="date"] {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.field input:focus {
    border-color: #5a5a70;
}

.field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
}

/* ── Scheme picker ── */
.schemes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.scheme-btn {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 14px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface2);
    transition: border-color 0.2s, transform 0.15s;
    text-align: left;
}

.scheme-btn:hover {
    transform: translateY(-1px);
}

.scheme-btn.active {
    border-color: var(--text);
}

.scheme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.scheme-name {
    font-size: 12px;
    color: var(--text);
    line-height: 1.3;
}

.scheme-sub {
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

/* ── Font picker ── */
.fonts,
.brojGostiju {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
}

.qrKuci {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.font-btn,
.brojGostiju-btn,
.qrKuci-btn {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    background: var(--surface2);
    transition: border-color 0.2s, transform 0.15s;
    text-align: center;
    color: var(--text);
    overflow: hidden;
}

.qrKuci-btn {
    overflow: visible;
    position: relative;
}

.qrKuci1:after,
.qrKuci2:after {
    content: "Besplatno";
    position: absolute;
    top: -10px;
    right: 3px;
    background: white;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    padding: 2px 5px;
    font-size: 0.7rem;
    letter-spacing: -0.3px;
}

.qrKuci1.active:after,
.qrKuci2.active:after {
    border-color: #696969;
    background: #f5f5f5;
    color: #000000;
    transition: all 0.5s ease;
}

.qrKuci2:after {
    content: "+30 eur";
}

.font-btn:hover,
.brojGostiju-btn:hover {
    transform: translateY(-1px);
}

.font-btn.active,
.brojGostiju-btn.active,
.qrKuci-btn.active {
    border-color: var(--text);
}

.font-btn-preview {
    font-size: 22px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.font-btn-label {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 4px;
    font-family: var(--font-body);
}

/* ── Grid selector ── */
.grid-options {
    display: flex;
    gap: 8px;
}

.grid-btn {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface2);
    color: var(--muted);
    cursor: pointer;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: border-color 0.2s, color 0.2s;
    font-family: var(--font-body);
}

.grid-btn:hover {
    border-color: #5a5a70;
    color: var(--text);
}

.grid-btn.active {
    border-color: var(--text);
    color: var(--text);
}

.grid-icon {
    display: grid;
    gap: 2px;
    width: 32px;
    height: 22px;
}

.grid-icon span {
    background: currentColor;
    border-radius: 2px;
    opacity: 0.5;
}

.grid-btn.active .grid-icon span {
    opacity: 1;
}

.grid-label {
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* ── CTA ── */
.cta {
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
    margin-top: 4px;
}

.cta:hover {
    opacity: 0.88;
}

.cta-note {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-top: 8px;
}

/* ── Phone mockup ── */
.preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preview-label {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.phone {
    width: 300px;
    background: #1a1a22;
    border-radius: 44px;
    padding: 12px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 40px 80px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
}

/* Notch */
.phone::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #1a1a22;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen {
    background: var(--scheme-bg);
    border-radius: 34px;
    overflow: hidden;
    height: 580px;
    display: flex;
    flex-direction: column;
    transition: background 0.4s;
    position: relative;
}

/* Status bar */
.phone-status {
    padding: 13px 20px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phone-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--scheme-text);
    opacity: 0.7;
}

.phone-icons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.phone-icons span {
    display: block;
    background: var(--scheme-text);
    opacity: 0.6;
    border-radius: 1px;
}

/* Gallery header in phone */
.phone-gallery-header {
    padding: 10px 20px 16px;
    text-align: center;
    transition: all 0.3s;
}

.phone-gallery-title {
    font-family: var(--font-scr);
    font-size: 26px;
    transition: color 0.4s;
    min-height: 32px;
    font-weight: normal;
    margin: 10px 0px;
    color: #685940;
    line-height: 2rem;
}

.phone-gallery-date {
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--scheme-muted);
    margin-top: 3px;
    transition: color 0.4s;
    min-height: 14px;
}

/* Photo grid */
.phone-grid {
    flex: 1;
    padding: 1px;
    display: grid;
    gap: 4px;
    align-content: start;
    transition: grid-template-columns 0.3s;
    margin-top: 10px;
}

.phone-grid-cell {
    background: var(--scheme-grid);
    border-radius: 4px;
    aspect-ratio: 1;
    transition: background 0.4s;
    position: relative;
    overflow: hidden;
}

/* Simulated photo content */
.phone-grid-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
}

/* Vary cell backgrounds slightly for realism */
.phone-grid-cell:nth-child(3n+1) {
    filter: brightness(0.95);
}

.phone-grid-cell:nth-child(3n+2) {
    filter: brightness(1.05);
}

.phone-grid-cell:nth-child(5n) {
    filter: brightness(0.9) saturate(1.1);
}

/* Upload button in phone */
.phone-upload-btn {
    margin: 10px 16px 20px;
    border-radius: 50px;
    padding: 13px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    background: var(--scheme-btn);
    color: #fff;
    transition: background 0.4s;
    flex-shrink: 0;
}

/* ── Scheme colors ── */
[data-scheme="gold"] {
    --s-accent: #685940;
    --s-bg: #ffffff;
    --s-text: #2a1f0a;
    --s-muted: #8a7040;
    --s-grid: #e8dfc8;
}

[data-scheme="silver"] {
    --s-accent: #7b8899;
    --s-bg: #f5f6f8;
    --s-text: #1a1d24;
    --s-muted: #6a7080;
    --s-grid: #d8dbe4;
}

[data-scheme="emerald"] {
    --s-accent: #2d8a6e;
    --s-bg: #f0f8f5;
    --s-text: #0a1f18;
    --s-muted: #3d7060;
    --s-grid: #c4dfd8;
}

[data-scheme="rose"] {
    --s-accent: #c4607a;
    --s-bg: #fffafb;
    --s-text: #1f0a10;
    --s-muted: #8a4055;
    --s-grid: #e8c8d0;
}

/* ── Responsive ── */
@media (max-width: 820px) {

    .stage {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .controls {
        padding-right: 0;
        position: static;
    }

    .preview-wrap {
        margin-top: 25px;
    }

    .header {
        padding: 20px 24px 10px;
    }
}

/* Osnovni zajednički stil */
.uploadbotun,
.pregled a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.15em;
    font-size: 7px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    margin: 0 !important;
    margin-top: 20px;
}

.uploadbotun {
    background: linear-gradient(135deg, #d4a853 0%, #a37d37 100%);
    box-shadow: 0 4px 15px rgba(163, 125, 55, 0.2);
    border: none;
    color: white;
}

.col-6 {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
}

.pregled a {
    color: #d4a853 !important;
    background: transparent !important;
    border: 1px solid rgba(212, 168, 83, 0.4);
    margin-left: 10px !important;
}

.labelsKutija {
    display: flex;
    align-items: center;
    padding: 10px 0 !important;
    background: transparent;
    margin: 0px !important;
}

h2 {
    font-family: "Forum", serif;
    font-size: 13px;
    color: #8a6f3e;
    font-weight: normal;
    margin-bottom: 10px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 5px 0px;
}


.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a6f3e, transparent);
}

.divider-ornament {
    color: #8a6f3e;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.header-desno {
    margin-left: auto;
}

.header-desno a {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    transition: ease 0.2s all;
}

.header-desno a:hover {
    opacity: 0.75;
}

span.alert.alert-danger {
    color: darkred;
    background: #ffecec;
    border: 1px solid rgb(184, 84, 84);
    border-radius: 5px;
}

/* ── Fullscreen loader ── */
#loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 22px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#loader-overlay.show {
    display: flex;
    opacity: 1;
}

.loader-text {
    font-family: var(--font-disp);
    font-size: 1.2rem;
    letter-spacing: 0em;
    color: var(--scheme-text);
}

.ball-grid-pulse>div {
    background-color: #a37d37;
    width: 15px;
    height: 15px;
    border-radius: 100%;
    margin: 2px;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    display: inline-block;
    float: left;
    -webkit-animation-name: ball-grid-pulse;
    animation-name: ball-grid-pulse;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-delay: 0;
    animation-delay: 0;
}

.ball-grid-pulse>div:nth-child(1) {
    -webkit-animation-delay: 0.22s;
    animation-delay: 0.22s;
    -webkit-animation-duration: 0.9s;
    animation-duration: 0.9s;
}

.ball-grid-pulse>div:nth-child(2) {
    -webkit-animation-delay: 0.64s;
    animation-delay: 0.64s;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
}

.ball-grid-pulse>div:nth-child(3) {
    -webkit-animation-delay: -0.15s;
    animation-delay: -0.15s;
    -webkit-animation-duration: 0.63s;
    animation-duration: 0.63s;
}

.ball-grid-pulse>div:nth-child(4) {
    -webkit-animation-delay: -0.03s;
    animation-delay: -0.03s;
    -webkit-animation-duration: 1.24s;
    animation-duration: 1.24s;
}

.ball-grid-pulse>div:nth-child(5) {
    -webkit-animation-delay: 0.08s;
    animation-delay: 0.08s;
    -webkit-animation-duration: 1.37s;
    animation-duration: 1.37s;
}

.ball-grid-pulse>div:nth-child(6) {
    -webkit-animation-delay: 0.43s;
    animation-delay: 0.43s;
    -webkit-animation-duration: 1.55s;
    animation-duration: 1.55s;
}

.ball-grid-pulse>div:nth-child(7) {
    -webkit-animation-delay: 0.05s;
    animation-delay: 0.05s;
    -webkit-animation-duration: 0.7s;
    animation-duration: 0.7s;
}

.ball-grid-pulse>div:nth-child(8) {
    -webkit-animation-delay: 0.05s;
    animation-delay: 0.05s;
    -webkit-animation-duration: 0.97s;
    animation-duration: 0.97s;
}

.ball-grid-pulse>div:nth-child(9) {
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
    -webkit-animation-duration: 0.63s;
    animation-duration: 0.63s;
}

@-webkit-keyframes ball-grid-pulse {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        opacity: 0.7;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ball-grid-pulse {
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        opacity: 0.7;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }
}

.ball-grid-pulse {
    width: 57px;
}

.ball-grid-pulse>div:nth-child(1) {
    -webkit-animation-delay: 0.22s;
    animation-delay: 0.22s;
    -webkit-animation-duration: 0.9s;
    animation-duration: 0.9s;
}

.ball-grid-pulse>div:nth-child(2) {
    -webkit-animation-delay: 0.64s;
    animation-delay: 0.64s;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
}

.ball-grid-pulse>div:nth-child(3) {
    -webkit-animation-delay: -0.15s;
    animation-delay: -0.15s;
    -webkit-animation-duration: 0.63s;
    animation-duration: 0.63s;
}

.ball-grid-pulse>div:nth-child(4) {
    -webkit-animation-delay: -0.03s;
    animation-delay: -0.03s;
    -webkit-animation-duration: 1.24s;
    animation-duration: 1.24s;
}

.ball-grid-pulse>div:nth-child(5) {
    -webkit-animation-delay: 0.08s;
    animation-delay: 0.08s;
    -webkit-animation-duration: 1.37s;
    animation-duration: 1.37s;
}

.ball-grid-pulse>div:nth-child(6) {
    -webkit-animation-delay: 0.43s;
    animation-delay: 0.43s;
    -webkit-animation-duration: 1.55s;
    animation-duration: 1.55s;
}

.ball-grid-pulse>div:nth-child(7) {
    -webkit-animation-delay: 0.05s;
    animation-delay: 0.05s;
    -webkit-animation-duration: 0.7s;
    animation-duration: 0.7s;
}

.ball-grid-pulse>div:nth-child(8) {
    -webkit-animation-delay: 0.05s;
    animation-delay: 0.05s;
    -webkit-animation-duration: 0.97s;
    animation-duration: 0.97s;
}

.ball-grid-pulse>div:nth-child(9) {
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
    -webkit-animation-duration: 0.63s;
    animation-duration: 0.63s;
}

.ball-grid-pulse>div {
    background-color: #323232;
    width: 15px;
    height: 15px;
    border-radius: 100%;
    margin: 2px;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    display: inline-block;
    float: left;
    -webkit-animation-name: ball-grid-pulse;
    animation-name: ball-grid-pulse;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-delay: 0;
    animation-delay: 0;
}

.korak2,
.korak3,
.sakrij {
    transition: opacity 1s ease;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.korak1.sakrij {
    margin-top: -32px;
}

.korak2,
.korak3 {
    margin-top: -32px !important;
}

.korak2.otkrij {
    margin-top: 0 !important;
}

.korak3.otkrij {
    margin-top: 0 !important;
}

.kojiKorak span {
    background: silver;
    width: 12px;
    height: 3px;
    display: inline-block;
    margin-right: 0px;
    margin-left: 2px;
    vertical-align: middle;
    margin-bottom: 2px;
}

.kojiKorak span.green {
    background: #09d609;
}

.otkrij {
    opacity: 1;
    height: auto;
    transition: opacity 1s ease;
}

.kojiKorak {
    font-size: 0.7rem;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    text-align: right;
    padding-right: 5px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

.footer a {
    color: var(--scheme-muted);
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer a:hover {
    color: black;
}

.disclaimer {
    text-align: left;
    margin-top: 20px;
    background: #eefdee;
    border: 1px solid lightgreen;
    padding: 15px;
    border-radius: 5px;
}

.samoRezerviraj {
    text-align: right;
    margin-top: 10px;
    font-size: 0.8rem;
}

.samoRezerviraj a {
    color: var(--scheme-muted);
    transition: color 0.3s ease;
    text-decoration: none;
    display: block;
    padding: 5px 0px 10px 0px;
}

.samoRezerviraj a:hover {
    color: black;
}