.quote-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    overflow-y: auto;
}
.quote-modal.is-open {
    display: block;
}
.quote-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 14, 0.55);
    backdrop-filter: blur(2px);
}
.quote-modal__dialog {
    position: relative;
    max-width: 1040px;
    margin: 3vh auto;
    padding: 0 16px;
}
.quote-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.quote-modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #04080e;
    z-index: 2;
}
.quote-modal__close:hover { opacity: .7; }

.quote-modal__header {
    padding: 18px 28px 14px;
    border-bottom: 1px solid #eee;
}
.quote-modal__sub {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #00bd67;
    margin: 0 0 6px;
}
.quote-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #04080e;
    margin: 0 0 8px;
}
.quote-modal__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 14px;
    color: #495057;
}
.quote-modal__summary > div::before { content: "•"; color: #adb5bd; margin-right: 8px; }
.quote-modal__summary > div:first-child::before { content: ""; margin: 0; }

.quote-modal__body { padding: 16px 28px 22px; }

.quote-section {
    padding: 18px 20px 20px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #fcfcfd;
}

.quote-section:last-of-type {
    margin-bottom: 0;
}

.quote-section__title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #1c2f49;
}

.quote-form .quote-grid {
    display: grid;
    /* broj kolona se racuna iz raspolozive sirine - ne ovisi o tome koliko je
       polja vidljivo, pa skrivanje modula/paketa ne ostavlja rupu u rasporedu */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 18px;
}
.quote-field {
    display: flex;
    flex-direction: column;
    min-width: 0; /* bez ovoga dugacak sadrzaj (npr. nazivi drzava) siri kolonu */
}
.quote-field--full { grid-column: 1 / -1; }

.quote-field label {
    font-size: 12px;
    font-weight: 600;
    color: #04080e;
    margin-bottom: 4px;
}
.quote-field .req { color: #dc3545; }

.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form input[type="number"],
.quote-form select,
.quote-form textarea {
    width: 100%;
    height: 44px;
    padding: 8px 14px;
    font-size: 14px;
    color: #04080e;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 6px;
    outline: none;
    transition: border-color .15s ease;
    font-family: inherit;
}
.quote-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%231b8b6d' d='M5 6L0 0h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
    cursor: pointer;
}
.quote-form textarea { height: auto; padding-top: 10px; resize: vertical; }
.quote-form select { text-overflow: ellipsis; }
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
    border-color: #1b8b6d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(27, 139, 109, 0.12);
}
.quote-form input.is-locked,
.quote-form input[readonly] {
    background: #e9ecef;
    color: #495057;
    cursor: not-allowed;
}

.quote-error { display: none; font-size: 12px; color: #dc3545; margin-top: 4px; }
.quote-validation.was-validated input:invalid + .quote-error,
.quote-validation.was-validated select:invalid + .quote-error,
.quote-validation.was-validated textarea:invalid + .quote-error { display: block; }
.quote-validation.was-validated input:invalid,
.quote-validation.was-validated select:invalid,
.quote-validation.was-validated textarea:invalid { border-color: #dc3545; }

.quote-alert {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
}
.quote-alert.is-success { display: block; background: #d1e7dd; color: #0f5132; }
.quote-alert.is-error   { display: block; background: #f8d7da; color: #842029; }

.quote-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}
.quote-submit-btn {
    display: inline-block;
    padding: 14px 46px;
    font-family: var(--link-font-family, inherit);
    font-size: 15px;
    font-weight: 700;
    line-height: 18px;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    background-color: transparent;
    background-image: linear-gradient(97deg, #2d415b 0%, #1b8b6d 100%);
    transition: all .4s ease-in-out;
    min-width: 200px;
    letter-spacing: .01em;
}
.quote-submit-btn:hover {
    background-image: none;
    background-color: #00bd67;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 189, 103, 0.25);
}
.quote-submit-btn:active { transform: translateY(0); }
.quote-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.quote-modal-open { overflow: hidden; }

@media (max-width: 1100px) {
    .quote-modal__dialog { margin: 2vh auto; }
}

@media (max-width: 640px) {
    .quote-modal__dialog { margin: 0; padding: 0; }
    .quote-modal__content {
        border-radius: 0;
        min-height: 100vh;
        min-height: 100dvh; /* bez skoka kad se sakrije adresna traka na mobitelu */
    }
    .quote-modal__header { padding: 18px 44px 12px 20px; }
    .quote-modal__title { font-size: 18px; }
    .quote-modal__body { padding: 14px 20px 20px; }
    .quote-modal__close { top: 10px; right: 12px; }
    .quote-footer { flex-direction: column; align-items: stretch; }
    .quote-submit-btn { width: 100%; min-width: 0; padding: 14px 20px; }
}

/* Niski ekrani (mobitel u vodoravnom polozaju) - modal se ne siri preko ekrana */
@media (max-height: 560px) and (min-width: 641px) {
    .quote-modal__dialog { margin: 1vh auto; }
    .quote-modal__header { padding: 12px 28px 10px; }
    .quote-modal__title { font-size: 18px; margin-bottom: 4px; }
    .quote-modal__body { padding: 12px 28px 18px; }
}
