/* =========================================================================
   HORECA CTA WIDGET - Diskretni floating tab + modal forma
   Boje/fontovi usaglašeni sa horeca-proizvod-premium.css:
   #2b2420 (tamna), #b88645 (zlatna), #eae3da (border), #faf8f5 (krem pozadina)
   ========================================================================= */

:root {
    --hcta-dark: #2b2420;
    --hcta-gold: #b88645;
    --hcta-border: #eae3da;
    --hcta-cream: #faf8f5;
}

/* -------------------------------------------------------------------------
   1. FLOATING TAB (kolabovano stanje) - viri sa desne ivice ekrana
   ------------------------------------------------------------------------- */
#hcta-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9500;
    display: flex;
    align-items: center;
    background-color: var(--hcta-dark);
    color: #fff;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.25s ease;
    max-width: 44px;
}

#hcta-tab:hover {
    box-shadow: -4px 3px 16px rgba(0, 0, 0, 0.25);
}

#hcta-tab.hcta-open {
    max-width: 320px;
}

#hcta-tab .hcta-tab-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 18px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
    flex-shrink: 0;
}

#hcta-tab.hcta-open .hcta-tab-label {
    display: none;
}

/* -------------------------------------------------------------------------
   2. PROŠIRENA KARTICA (kad korisnik klikne/otvori tab)
   ------------------------------------------------------------------------- */
.hcta-card {
    display: none;
    padding: 20px 18px 18px 20px;
    width: 280px;
}

#hcta-tab.hcta-open .hcta-card {
    display: block;
}

.hcta-card-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.hcta-card-close:hover {
    color: #fff;
}

.hcta-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    line-height: 1.3;
    margin: 0 0 8px 0;
    color: #fff;
    padding-right: 20px;
}

.hcta-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 14px 0;
}

.hcta-card-btn {
    display: inline-block;
    background-color: var(--hcta-gold);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.hcta-card-btn:hover {
    background-color: #a0742e;
}

/* -------------------------------------------------------------------------
   3. MODAL SA FORMOM
   ------------------------------------------------------------------------- */
#hcta-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(43, 36, 32, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#hcta-modal-overlay.hcta-show {
    display: flex;
}

#hcta-modal {
    background-color: #fff;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 36px 32px;
    position: relative;
    font-family: 'Nunito Sans', sans-serif;
}

#hcta-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
}

#hcta-modal-close:hover {
    color: var(--hcta-dark);
}

#hcta-modal h2 {
    font-family: 'Playfair Display', serif;
    color: var(--hcta-dark);
    font-size: 1.6rem;
    margin: 0 0 8px 0;
    padding-right: 20px;
}

#hcta-modal .hcta-modal-intro {
    color: #555;
    font-size: 0.98rem;
    line-height: 1.5;
    margin-bottom: 22px;
}

.hcta-form-group {
    margin-bottom: 16px;
}

.hcta-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--hcta-dark);
    margin-bottom: 5px;
}

.hcta-form-group .hcta-optional-tag {
    font-weight: 400;
    color: #999;
    font-size: 0.82rem;
}

.hcta-form-group input,
.hcta-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hcta-border);
    border-radius: 4px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--hcta-dark);
    box-sizing: border-box;
    background-color: #fff;
}

.hcta-form-group input:focus,
.hcta-form-group select:focus {
    outline: none;
    border-color: var(--hcta-gold);
}

.hcta-hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

.hcta-error {
    font-size: 0.82rem;
    color: #b03a2e;
    margin-top: 5px;
    font-weight: 600;
}

.hcta-form-group input.hcta-input-error {
    border-color: #b03a2e;
}

.hcta-note-box {
    background-color: var(--hcta-cream);
    border: 1px solid var(--hcta-border);
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 18px 0 20px 0;
}

.hcta-submit-btn {
    background-color: var(--hcta-dark);
    color: #fff;
    border: none;
    padding: 13px 24px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
    font-family: 'Nunito Sans', sans-serif;
}

.hcta-submit-btn:hover {
    background-color: var(--hcta-gold);
}

.hcta-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hcta-privacy-notice {
    font-size: 0.78rem;
    color: #999;
    margin-top: 12px;
    text-align: center;
}

.hcta-privacy-notice a {
    color: #888;
}

/* -------------------------------------------------------------------------
   4. MOBILNA OPTIMIZACIJA
   ------------------------------------------------------------------------- */
@media (max-width: 600px) {

    /* Kolabovano stanje postaje mali diskretan kružni "dugme", donji desni
       ugao - iznad thumb-zone i iznad eventualnih mobilnih traka pretraživača. */
    #hcta-tab {
        top: auto;
        bottom: 20px;
        right: 14px;
        left: auto;
        transform: none;
        max-width: 52px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        justify-content: center;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    }

    #hcta-tab .hcta-tab-label {
        display: none;
    }

    /* Malo "cf" ikonica umesto vertikalnog teksta na mobilnom */
    #hcta-tab::before {
        content: "\f086";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: #fff;
        font-size: 1.3rem;
    }

    #hcta-tab.hcta-open::before {
        display: none;
    }

    /* Kad se otvori, karta "izrasta" iznad dugmeta, ne preko cele širine */
    #hcta-tab.hcta-open {
        width: auto;
        max-width: min(280px, calc(100vw - 28px));
        height: auto;
        border-radius: 10px;
        position: fixed;
        bottom: 20px;
        right: 14px;
    }

    .hcta-card {
        width: 260px;
        max-width: calc(100vw - 40px);
        padding: 18px 16px 16px 16px;
    }

    .hcta-card h3 {
        font-size: 1.05rem;
    }

    /* Modal preko celog ekrana na mobilnom - lakše popunjavanje forme */
    #hcta-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    #hcta-modal {
        max-width: 100%;
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        padding: 24px 18px 28px 18px;
    }

    #hcta-modal h2 {
        font-size: 1.35rem;
    }

    /* font-size 16px sprečava automatski zoom na iOS-u pri fokusiranju polja */
    .hcta-form-group input,
    .hcta-form-group select {
        font-size: 16px;
        padding: 12px 12px;
    }

    .hcta-submit-btn {
        padding: 14px 24px;
        font-size: 1.05rem;
    }
}
