/* =============================================================
   SAJT Offertformulär – sajt-offert.css
   ============================================================= */

/* ── Nav button ───────────────────────────────────────────── */

.sajt-offert-nav-item {
    display: flex !important;
    align-items: center;
    padding: 0 !important;
    margin-left: 12px;
}

.sajt-offert-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle;
    padding: 9px 22px;
    border-radius: 30px;
    background-color: #7B3535; /* overridden inline from settings */
    color: #fff !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none !important;
    line-height: 1 !important;
    transition: opacity 0.18s ease;
    white-space: nowrap;
    cursor: pointer;
}

.sajt-offert-btn:hover,
.sajt-offert-btn:focus {
    opacity: 0.82;
    color: #fff !important;
    text-decoration: none !important;
}


/* ── Modal overlay & dialog ───────────────────────────────── */

.sajt-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.54);
    z-index: 99998;
}

.sajt-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.sajt-modal-overlay.is-open {
    display: flex;
}

.sajt-modal-backdrop.is-open {
    display: block;
}

/* Prevent body scroll when open */
body.sajt-modal-open {
    overflow: hidden;
}

.sajt-offert-dialog {
    position: relative;
    width: 920px;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    background: #fff;
    margin: auto;
}

/* Close button */
.sajt-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,.85);
    color: #444;
    font-size: 15px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.sajt-modal-close:hover {
    background: #fff;
    color: #111;
}

.sajt-offert-inner {
    display: flex;
    min-height: 540px;
}


/* ── Left image column ────────────────────────────────────── */

.sajt-offert-image-col {
    flex: 0 0 44%;
    background-color: #b89080; /* warm fallback when no image set */
    background-size: cover;
    background-position: center;
}


/* ── Right content column ────────────────────────────────── */

.sajt-offert-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 44px 36px;
    background: #fff;
}


/* ── Typography ───────────────────────────────────────────── */

.sajt-offert-heading {
    margin: 0 0 14px;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: #1a1a1a;
    line-height: 1.3;
}

.sajt-offert-lead {
    margin: 0 0 28px;
    font-size: 13px !important;
    line-height: 1.65;
    text-align: center;
    color: #666;
}


/* ── Form fields ──────────────────────────────────────────── */

.sajt-offert-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sajt-offert-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.sajt-offert-row--full {
    grid-template-columns: 1fr;
}

.sajt-offert-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sajt-offert-col label {
    display: block;
    font-size: 12px !important;
    font-weight: 500;
    color: #444;
    letter-spacing: 0.02em;
}

.sajt-offert-col label abbr {
    text-decoration: none;
    color: #b00;
    margin-left: 2px;
}

.sajt-offert-col input[type="text"],
.sajt-offert-col input[type="email"],
.sajt-offert-col input[type="tel"] {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #f7f7f7;
    outline: none;
    transition: border-color 0.18s, background 0.18s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.sajt-offert-col input:focus {
    border-color: #aaa;
    background: #fff;
}

/* Select */
.sajt-offert-select-wrap {
    position: relative;
}

.sajt-offert-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #888;
    pointer-events: none;
}

.sajt-offert-select-wrap select {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 36px 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #f7f7f7;
    outline: none;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.sajt-offert-select-wrap select:focus {
    border-color: #aaa;
    background: #fff;
}


/* ── Submit button ────────────────────────────────────────── */

.sajt-offert-actions {
    margin-top: 26px;
    text-align: center;
}

.sajt-offert-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 52px;
    border: none;
    border-radius: 4px;
    background-color: #7B3535;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.18s ease;
    line-height: 1;
}

.sajt-offert-cta-btn:hover {
    opacity: 0.84;
}

.sajt-offert-cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sajt-btn-spinner {
    display: inline-block;
    animation: sajt-spin 0.7s linear infinite;
    font-size: 16px;
}

@keyframes sajt-spin {
    to { transform: rotate(360deg); }
}


/* ── Error message ────────────────────────────────────────── */

.sajt-offert-error {
    padding: 10px 14px;
    margin-bottom: 16px;
    background: #fde8e8;
    border-left: 3px solid #c00;
    border-radius: 3px;
    font-size: 13px;
    color: #b00;
    line-height: 1.5;
}


/* ── Success state ────────────────────────────────────────── */

#sajt-offert-success-state {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#sajt-offert-success-state .sajt-offert-heading {
    margin-bottom: 16px;
}


/* ── Logo mark ────────────────────────────────────────────── */

.sajt-offert-logo-mark {
    margin: 28px 0 0;
    text-align: center;
    font-size: 10px !important;
    letter-spacing: 0.2em;
    color: #aaa;
    font-weight: 500;
}

.sajt-offert-logo-mark span {
    font-size: 14px;
    color: #555;
    letter-spacing: 0;
    vertical-align: middle;
    position: relative;
    top: -1px;
}


/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 680px) {
    .sajt-offert-image-col {
        display: none;
    }

    .sajt-offert-inner {
        min-height: unset;
    }

    .sajt-offert-form-col {
        padding: 36px 24px 28px;
    }

    .sajt-offert-row {
        grid-template-columns: 1fr;
    }
}
