/* ===========================
   Konfigurator — Husvagnen 5
   =========================== */

.konf-intro {
    padding: 4rem 0 2.5rem 0;
    text-align: center;
}

.konf-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.konf-intro h1 {
    font-size: 2.6rem;
    font-weight: 300;
    color: var(--primary-blue);
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.konf-lead {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

.konf-section {
    padding: 2rem 0 6rem 0;
}

.konf-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 3.5rem;
    align-items: start;
}

/* --- Steg --- */
.konf-step {
    margin-bottom: 3.5rem;
}

.konf-step-head {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 1.8rem;
}

.konf-step-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.konf-step-head h2 {
    font-size: 1.45rem;
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 0.3rem;
    letter-spacing: 0.3px;
}

.konf-step-head p {
    font-size: 0.92rem;
    color: #777;
    line-height: 1.6;
    max-width: 480px;
}

/* --- Enhetskort --- */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.unit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: left;
    padding: 1.3rem 1.2rem 1.2rem 1.2rem;
    background: white;
    border: 2px solid #e4e7ea;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.unit-card:hover:not(:disabled) {
    border-color: #c3cad1;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.unit-card.selected {
    border-color: var(--primary-green);
    box-shadow: 0 6px 22px rgba(40, 167, 69, 0.16);
}

.unit-card--taken {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f6f7f8;
}

.unit-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--dark-green);
    background: rgba(40, 167, 69, 0.1);
    padding: 0.22rem 0.55rem;
    border-radius: 3px;
    margin-bottom: 0.7rem;
}

.unit-card--taken .unit-badge {
    color: #7b848b;
    background: #e7eaec;
}

.unit-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.unit-size {
    font-size: 1.55rem;
    font-weight: 300;
    color: var(--primary-blue);
    line-height: 1.2;
}

.unit-dims {
    font-size: 0.78rem;
    color: #8b949b;
}

/* --- Notis om flexibel yta --- */
.konf-note {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 1.5rem;
    padding: 1.3rem 1.5rem;
    background: rgba(40, 167, 69, 0.06);
    border-left: 3px solid var(--primary-green);
    border-radius: 8px;
}

.konf-note-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--primary-green);
    margin-top: 0.15rem;
}

.konf-note strong {
    display: block;
    font-size: 0.98rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.konf-note p {
    font-size: 0.9rem;
    color: #5f686f;
    line-height: 1.65;
    margin: 0;
}

/* --- Tillval --- */
.option-group {
    margin-bottom: 1.8rem;
}

.option-group h4 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #9aa2a9;
    margin-bottom: 0.75rem;
}

.option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.option-chip {
    padding: 0.62rem 1.15rem;
    background: white;
    border: 2px solid #e4e7ea;
    border-radius: 30px;
    font-family: inherit;
    font-size: 0.88rem;
    color: #5a636a;
    cursor: pointer;
    transition: all 0.22s ease;
}

.option-chip:hover {
    border-color: #c3cad1;
    color: #333;
}

.option-chip.selected {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    font-weight: 500;
}

/* --- Formulärfält --- */
.konf-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    max-width: 620px;
}

.konf-field-wide {
    grid-column: 1 / -1;
}

.konf-fields label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.konf-fields span {
    font-size: 0.82rem;
    font-weight: 500;
    color: #5a636a;
}

.konf-fields em {
    font-style: normal;
    color: #a5adb3;
    font-weight: 400;
}

.konf-fields input,
.konf-fields textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: #333;
    padding: 0.8rem 1rem;
    border: 2px solid #e4e7ea;
    border-radius: 7px;
    background: white;
    transition: border-color 0.25s ease;
    resize: vertical;
}

.konf-fields input:focus,
.konf-fields textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* --- Sammanfattning --- */
.konf-summary-inner {
    position: sticky;
    top: 110px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef0f2 100%);
    border-radius: 12px;
    padding: 1.9rem 1.7rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
}

.konf-summary-inner h3 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #9aa2a9;
    margin-bottom: 1.1rem;
}

.summary-unit {
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #dee2e6;
}

.summary-unit-name {
    display: block;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--primary-blue);
    line-height: 1.2;
}

.summary-unit-size {
    display: block;
    font-size: 0.88rem;
    color: #7d858c;
    margin-top: 0.25rem;
}

.summary-unit-note {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--dark-green);
    background: rgba(40, 167, 69, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.7rem;
}

.summary-empty {
    font-size: 0.9rem;
    color: #9aa2a9;
    font-style: italic;
    line-height: 1.5;
}

.summary-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9aa2a9;
    margin-bottom: 0.6rem;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.6rem 0;
}

.summary-list li {
    font-size: 0.9rem;
    color: #4a525a;
    padding: 0.32rem 0 0.32rem 1.2rem;
    position: relative;
}

.summary-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-size: 0.8rem;
    font-weight: 700;
}

.summary-empty-item {
    color: #a5adb3 !important;
    font-style: italic;
    padding-left: 0 !important;
}

.summary-empty-item::before {
    content: "" !important;
}

.konf-send {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    padding: 1rem 1.2rem;
}

.konf-send.disabled {
    background: #c8ced3;
    box-shadow: none;
    cursor: not-allowed;
}

.konf-send.disabled:hover {
    background: #c8ced3;
    transform: none;
    box-shadow: none;
}

.konf-send-note {
    font-size: 0.78rem;
    color: #97a0a7;
    text-align: center;
    margin-top: 0.8rem;
    line-height: 1.5;
}

.konf-fallback {
    font-size: 0.82rem;
    color: #97a0a7;
    text-align: center;
    line-height: 1.7;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid #dee2e6;
}

.konf-fallback a {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(20, 58, 96, 0.25);
    transition: border-color 0.25s ease;
}

.konf-fallback a:hover {
    border-color: var(--primary-blue);
}

/* --- Responsivt --- */
@media (max-width: 1050px) {
    .konf-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .konf-summary-inner {
        position: static;
    }
}

@media (max-width: 768px) {
    .konf-intro {
        padding: 2.5rem 0 1.5rem 0;
    }

    .konf-intro h1 {
        font-size: 1.9rem;
    }

    .konf-step {
        margin-bottom: 2.5rem;
    }

    .konf-step-head h2 {
        font-size: 1.25rem;
    }

    .unit-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }

    .unit-card {
        padding: 1rem;
    }

    .unit-size {
        font-size: 1.3rem;
    }

    .konf-note {
        padding: 1.1rem 1.2rem;
    }

    .konf-fields {
        grid-template-columns: 1fr;
    }
}
