/* style.css */

/* ——— Import “Anta” font ——— */
@import url('https://fonts.googleapis.com/css2?family=Anta&display=swap');

/* ——— Prevent any element from overflowing its own box ——— */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ——— Global ——— */
html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Anta', sans-serif;
    background: #F5EBDC;
    overflow-x: hidden;
    /* hide any accidental horizontal overflow */
    width: 100%;
    /* ensure we never grow past the viewport */
    height: 100%;
}

/* Frosted background */
.background-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(30px);
    background: rgba(242, 242, 245, 0.6);
    z-index: -1;
}

/* ——— Container ——— */
.container {
    /* make it slightly wider */
    max-width: 900px;
    /* up from 400px */
    width: 95%;
    /* up from 90% */
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ——— Panel ——— */
.panel {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 24px;
}

/* ——— Titles ——— */
.title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 16px;
}

.title-small {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1c1c1e;
    margin-bottom: 12px;
}

/* ——— Forms ——— */
.form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    width: 100%;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

label {
    color: #3c3c4399;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

/* Apply “Anta” to textboxes */
input,
select {
    width: 90%;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Anta', sans-serif;
    border: 1px solid #d1d1d6;
    border-radius: 12px;
    background: #fff;
    color: #1c1c1e;
    margin: 0 auto;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

/* ——— Inline guest form ——— */
.form-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    width: 100%;
}

.form-inline input {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 0;
}

/* ——— Buttons ——— */
.button {
    width: 200px;
    padding: 18px;
    margin: 8px auto;
    font-size: 1rem;
    font-family: 'Anta', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.primary {
    background: #4AAE9B;
    color: #fff;
}

.primary:hover {
    background: #3A8A7C;
}

.secondary {
    background: #1E1E1E;
    color: #fff;
}

.secondary:hover {
    background: #000000;
}

.destructive {
    background: #ff3b30;
    color: #fff;
}

.destructive:hover {
    background: #c1271e;
}

/* admin pristup */
.admin-toggle {
    background: #1E1E1E;
    color: #fff;
}

.admin-toggle:hover {
    background: #000000;
}

/* ——— Modal ——— */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 90%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1c1c1e;
    cursor: pointer;
}

.close-btn:hover {
    color: #ff3b30;
}

/* ——— Guest list ——— */
.guest-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
}

.guest-list li {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #1c1c1e;
}

.guest-index {
    margin-right: 12px;
    font-weight: 500;
    color: #3c3c4399;
}

.guest-info {
    flex: 1;
    text-align: left;
}

.guest-actions {
    display: flex;
    gap: 8px;
}

.btn-edit {
    background: #ffd60a;
    color: #1c1c1e;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-family: 'Anta', sans-serif;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 60px;
}

.btn-edit:hover {
    background: #ffdf52;
}

.btn-delete {
    background: #ff3b30;
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-family: 'Anta', sans-serif;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 60px;
}

.btn-delete:hover {
    background: #ff6b6b;
}

.btn-save {
    background: #4AAE9B;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-family: 'Anta', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 8px;
}

.btn-save:hover {
    background: #30b158;
}

.btn-cancel {
    background: #ff3b30;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-family: 'Anta', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #e63934;
}

/* ——— Result & Error ——— */
.result {
    width: 90%;
    margin: 0 auto 16px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #1c1c1e;
}

.error-message,
#login-error {
    font-size: 0.9rem;
    color: #ff3b30;
    margin-top: 8px;
    text-align: center;
}

/* ——— Select styling ——— */
select {
    width: 90%;
    margin: 0 auto 16px;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Anta', sans-serif;
    border: 1px solid #d1d1d6;
    border-radius: 12px;
    background: #fff;
    color: #1c1c1e;
}

/* — Logo sekcija — */
.logo-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 120px;
    height: auto;
    display: inline-block;
}

/* — Wavy gradient header — */
.hero-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #007aff, #00c6ff);
    clip-path: polygon(0 0, 100% 0, 100% 65%, 0 100%);
    z-index: -2;
}

/* ——— Suggestions dropdown ——— */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 100;
}

.suggestions-list {
    background: #fff;
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f2f2f5;
}

.suggestion-item button {
    background: none;
    border: none;
    color: #007aff;
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: 8px;
}

/* ——— Responsive prilagođavanje ——— */
@media (max-width: 420px) {
    .footer {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    body {
        padding-bottom: 40px;
    }
}


/* ——— Result Modal ——— */
#result-modal {
    z-index: 40;
    /* overlay above main content */
}

#result-modal .modal-content {
    width: 90%;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

#result-content {
    font-size: 1rem;
    color: #1c1c1e;
    margin-bottom: 16px;
}

/* ——— Full‑screen loader ——— */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loader img {
    width: 100px;
    height: auto;
    animation: spin 1s linear infinite;
}

/* ——— Animations ——— */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ——— Responsive ——— */
@media (max-width: 420px) {
    .container {
        padding: 12px;
    }

    .panel {
        padding: 16px;
    }

    .title {
        font-size: 1.25rem;
    }

    .button {
        font-size: 0.95rem;
        padding: 12px;
    }
}