:root {
    --primary-color: #316CFF;
    --primary-light: #E8F0FF;
    --secondary-color: #E5E5EA;
    --success-color: #34C759;
    --text-color: #1C1C1E;
    --text-secondary: #8E8E93;
    --white: #ffffff;
    --bg-color: #eff3f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f7;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    height: 100dvh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background-color: white;
    height: 100dvh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background-color: #f7f8fa;
    padding: 12px 10px 10px;
    text-align: center;
    z-index: 10;
    width: 100%;
    border-bottom: 1px solid #ebebeb;
}

.logo {
    max-height: 40px;
}

.step {
    display: none;
    flex-direction: column;
    padding: 8px 20px 12px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

.step-content {
    flex-grow: 1;
}

.step.active {
    display: flex;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-align: center;
    color: var(--text-color);
}

.step-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
    padding: 0 10px;
}

.button-container {
    margin-top: auto;
    padding-top: 10px;
    padding-bottom: 12px;
    position: sticky;
    bottom: -20px;
    background: white;
    z-index: 10;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 5px;
}

.option-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.option-row+.option-row {
    margin-top: 12px;
}

#step-1 .options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

#step-1 .option-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

#step-1 .option-button {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
    height: 110px;
}

.option-button {
    flex: 1;
    min-width: 95px;
    max-width: 120px;
    height: 110px;
    background-color: #f6f6f9;
    border: 2px solid transparent;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

.option-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.option-button.selected {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(49, 108, 255, 0.12);
}

.option-button img,
.option-button svg {
    max-width: 44px;
    max-height: 44px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    transition: filter 0.3s;
}

.option-button.selected img,
.option-button.selected svg {
    filter: drop-shadow(0 2px 8px rgba(49, 108, 255, 0.3));
}

.nav-button {
    padding: 15px 28px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(49, 108, 255, 0.25);
    margin: 0;
    gap: 8px;
}

.nav-button:active {
    transform: scale(0.97);
}

.nav-button:disabled {
    background-color: #D1D1D6;
    color: #8E8E93;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--white);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    font-size: 0;
    transition: all 0.2s;
}

.back-link:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.back-link svg {
    margin-right: 2px;
    width: 20px;
    height: 20px;
    stroke: #1C1C1E;
}

.dropdown-container {
    margin: 20px 0;
}

.dropdown-container p {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 14px;
    padding-left: 5px;
}

select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    appearance: none;
    background: url("data:image/svg+xml;utf8,<svg fill='%238E8E93' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") no-repeat;
    background-position: right 15px top 50%;
    background-color: var(--white);
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
}

select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(49, 108, 255, 0.1);
}

.searchable-dropdown {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 16px;
    background: url("data:image/svg+xml;utf8,<svg fill='%238E8E93' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") no-repeat;
    background-position: right 18px top 50%;
    background-color: var(--white);
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(49, 108, 255, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
    font-weight: 500;
}

.dropdown-list {
    max-height: 240px;
    overflow-y: auto;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    display: block;
}

.dropdown-item {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:active,
.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.info-box {
    background-color: var(--white);
    border-radius: 20px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 17px;
    display: flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.info-box h3 svg {
    margin-right: 8px;
    stroke: var(--primary-color);
}

.info-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.info-title {
    font-weight: 600;
    margin-top: 15px;
    color: var(--text-color);
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.input-field::placeholder {
    color: #C7C7CC;
    font-weight: 500;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(49, 108, 255, 0.1);
}

.summary-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    gap: 14px;
    border-bottom: 1px solid #EEEFF2;
}

.summary-item:last-child {
    border-bottom: none;
}

/* Right-side container: value + Uredi link. */
.summary-item>div {
    margin-left: auto;
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
}

.summary-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
    flex-shrink: 0;
}

.summary-value {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    text-align: right;
    min-width: 0;
    word-break: break-word;
}

.summary-edit {
    color: var(--primary-color);
    cursor: pointer;
    margin-left: 12px;
    font-weight: 700;
    font-size: 12px;
    background: var(--primary-light);
    padding: 6px 12px;
    border-radius: 14px;
    border: none;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.summary-edit:active {
    transform: scale(0.95);
}

/* Sub-question summary rows — visually nested under their parent equipment row
   so the customer reads them as "Oblik senzora belongs to Senzor", not as a
   standalone field at the level of Marka/Model. Same vertical-line + indent
   pattern as the inline sub-question blocks on the equipment step. */
.summary-item.is-sub-question {
    margin-left: 22px;
    padding-left: 16px;
    border-left: 2px solid var(--primary-color);
    border-bottom: none;
    padding-top: 10px;
    padding-bottom: 10px;
}

.summary-item.is-sub-question .summary-item-icon {
    width: 28px;
    height: 28px;
    opacity: 0.7;
}

.summary-item.is-sub-question .summary-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === Summary screen redesign — hero + trust pills + list + reassurance === */

.summary-item-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    object-fit: contain;
}

.summary-hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #E6F7EC;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.08);
}

.summary-hero-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.summary-hero-text {
    flex: 1;
    min-width: 0;
}

.summary-hero-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.summary-hero-check {
    width: 36px;
    height: 42px;
    flex-shrink: 0;
    object-fit: contain;
}

.summary-hero-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.summary-hero-title-accent {
    color: #20AE4F;
    display: block;
}

.summary-hero-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.summary-hero-image {
    width: 110px;
    max-width: 35%;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 359px) {
    .summary-hero-image {
        display: none;
    }
}

@media (min-width: 414px) {
    .summary-hero-title {
        font-size: 18px;
    }

    .summary-hero-subtitle {
        font-size: 14px;
    }

    .summary-hero-image {
        width: 140px;
        max-width: 40%;
    }
}

.summary-trust-pills {
    display: flex;
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 14px 0 4px 0;
    border-top: 1px solid rgba(32, 174, 79, 0.18);
}

.trust-pill {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.trust-pill+.trust-pill {
    border-left: 1px solid rgba(32, 174, 79, 0.18);
}

.trust-pill img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    object-fit: contain;
}

.trust-pill span {
    min-width: 0;
}

@media (min-width: 375px) {
    .trust-pill {
        font-size: 12px;
        padding: 6px 6px;
        gap: 10px;
    }
}

@media (min-width: 414px) {
    .trust-pill {
        font-size: 13px;
        padding: 8px 8px;
        gap: 12px;
    }
}

.summary-list-card {
    background: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 18px 18px 4px 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.summary-list-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #EEEFF2;
    margin-bottom: 4px;
}

.summary-list-header-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
    margin-top: 0;
}

.summary-list-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 4px 0;
}

.summary-list-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.summary-list {
    /* rows handle their own padding + dividers */
}

.summary-reassurance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F2F7FD;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 6px;
}

.summary-reassurance img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    object-fit: contain;
}

.summary-reassurance-text {
    flex: 1;
    min-width: 0;
}

.summary-reassurance-primary {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.summary-reassurance-secondary {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.cta-paper-plane {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-paper-plane img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
}

#step-summary .button-container {
    margin-top: 0;
}

.summary-cta-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 10px 0 0 0;
}

.summary-cta-footer-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    margin-top: 10px;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

.success-container .contact-button {
    margin-top: auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.success-icon svg {
    stroke: var(--success-color);
    width: 40px;
    height: 40px;
}

.success-message {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.success-details {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 44px;
    line-height: 1.5;
}

.confirm-phone-block {
    width: 100%;
    margin-bottom: 15px;
}

.confirm-phone-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.confirm-phone-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-color);
}

.confirm-phone-row #confirm-phone {
    font-size: 20px;
    font-weight: 700;
}

.confirm-phone-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(49, 108, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.wait-estimate {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    margin-bottom: 24px;
    background-color: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.25);
    border-radius: 16px;
    text-align: left;
    box-sizing: border-box;
}

.wait-estimate-icon {
    color: #1f8a3a;
    flex-shrink: 0;
}

.wait-estimate-text {
    flex: 1;
    min-width: 0;
}

.wait-estimate-main {
    font-size: 13px;
    font-weight: 700;
    color: #1f8a3a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wait-estimate-sub {
    font-size: 12px;
    color: var(--text-color);
    margin-top: 3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.success-footer-note {
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 20px;
    background-color: var(--primary-color);
    border-radius: 30px;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    width: 100%;
    font-size: 17px;
    box-shadow: 0 10px 25px rgba(49, 108, 255, 0.25);
    transition: transform 0.2s;
}

.contact-button:active {
    transform: scale(0.97);
}

.contact-button svg {
    margin-right: 10px;
    stroke: var(--white);
}

.contact-button-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 20px;
    margin-top: 12px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.contact-button-outline:active {
    transform: scale(0.97);
    background-color: rgba(49, 108, 255, 0.05);
}

.contact-button-outline svg {
    margin-right: 10px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-container {
    width: calc(100% - 40px);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    margin: 6px 20px;
    padding: 12px 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 5;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
}

.progress-step {
    color: var(--text-color);
}

.progress-time {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
}

.progress-visual-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.progress-dots {
    display: flex;
    gap: 2px;
    flex: 1;
    align-items: center;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-dot.completed {
    background: var(--primary-color);
}

.progress-dot.current {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: scale(1.1);
}

.progress-dot.summary-dot {
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    z-index: 2;
    transform: none;
}

.progress-dot.summary-dot.completed,
.progress-dot.summary-dot.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.progress-connecting-line {
    flex: 1;
    height: 3px;
    background: var(--secondary-color);
    margin: 0 2px;
    border-radius: 2px;
    overflow: hidden;
    transition: background 0.4s ease;
}

.progress-connecting-line.completed {
    background: var(--primary-color);
}

.progress-percentage {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 16px;
    background: var(--primary-light);
    padding: 5px 10px;
    border-radius: 12px;
}

/* Desktop override for button position */
@media (min-width: 481px) {
    .container {
        height: 100vh;
    }

    .button-container {
        position: relative;
        bottom: 0;
        margin-top: 40px;
    }

    .step-content {
        flex-grow: 0;
    }

    /* Success screen — on desktop, don't pin CTAs to viewport bottom.
       Card sizes to content, with a moderate gap below the wait-estimate. */
    .success-container {
        flex-grow: 0;
    }

    .success-container .contact-button {
        margin-top: 60px;
    }
}


#model-selection-area,
#year-dropdown-area {
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 1200px;
    opacity: 1;
    transform: scale(1);
    transform-origin: top center;
    overflow: hidden;
}

#model-selection-area.collapsed,
#year-dropdown-area.collapsed {
    max-height: 0;
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.summary-pill-container {
    padding: 0 10px 20px 10px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.summary-pill {
    background: var(--primary-light);
    border: 1px solid rgba(49, 108, 255, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(49, 108, 255, 0.08);
}

.summary-pill .pill-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-pill .pill-value {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 700;
    margin-left: 8px;
    flex-grow: 1;
}

.pill-edit-btn {
    background: white;
    border: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}

.pill-edit-btn:active {
    transform: scale(0.95);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Native Custom Phone Input Design */
.native-phone-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    /* Ensure dropdown escapes container */
}

.native-phone-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.native-phone-wrapper.error-input {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.country-picker {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fdfdfd;
    border-right: 1px solid #ddd;
    cursor: pointer;
    border-radius: 12px 0 0 12px;
}

.country-picker:hover {
    background: #f5f5f5;
}

#ui-flag {
    display: block;
    object-fit: cover;
}

.dropdown-arrow {
    margin-left: 6px;
    opacity: 0.5;
}

/* Custom Dropdown List */
.country-dropdown-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    /* Matches input field width perfectly */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #eee;
    z-index: 1000;
    overflow: hidden;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.country-option:hover {
    background: #f8f9fa;
}

.country-option.active {
    background: var(--primary-light, #f0f7ff);
}

.country-option img {
    border-radius: 2px;
    margin-right: 12px;
}

.country-option span {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.country-option .country-code {
    margin-left: auto;
    color: #888;
    font-size: 14px;
    font-weight: 400;
}

.phone-number-field {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    background: transparent;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-color);
    width: 100%;
    outline: none;
}

.phone-number-field::placeholder {
    color: #999;
}

/* Phone row: input + inline send button, always visible above mobile keyboard */
.phone-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.phone-row .native-phone-wrapper {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    min-height: 56px;
}

/* Lock country picker during submission (same feel as disabled input) */
.country-picker.is-locked {
    pointer-events: none;
    opacity: 0.55;
}

/* Disabled input shown slightly muted */
.phone-number-field:disabled {
    color: #8E8E93;
    -webkit-text-fill-color: #8E8E93;
    /* Safari/iOS */
    opacity: 1;
}

.inline-send-button {
    flex-shrink: 0;
    min-height: 56px;
    padding: 0 18px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease;
    min-width: 96px;
}

.inline-send-button:active {
    transform: scale(0.97);
}

.inline-send-button:disabled {
    background-color: #D1D1D6;
    color: #8E8E93;
    cursor: not-allowed;
}

@media (max-width: 360px) {
    .inline-send-button {
        padding: 0 14px;
        font-size: 15px;
        min-width: 84px;
    }

    .phone-row {
        gap: 8px;
    }
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shakeError 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* Camera Upload Styles */
.camera-upload-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.camera-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--white);
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-button:active {
    transform: scale(0.98);
    background: var(--primary-light);
}

.camera-button svg {
    flex-shrink: 0;
}

.photo-preview-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 5px;
}

.thumbnail-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.thumbnail-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(98, 0, 238, 0.15);
}

.success-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.photo-success-text {
    color: #4CAF50;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-photo-btn {
    color: #ff3b30;
    font-size: 13px;
    font-weight: 600;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    text-decoration: underline;
}

#sensor-photo-input {
    display: none;
}

/* ── Visual glass-type picker (step 1) + damage-type picker ───── */
.glass-type-grid,
.damage-type-grid,
.bocno-side-grid,
.side-glass-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0 8px;
}

/* Step 1 has 3 cards: the 3rd (Zadnje) spans full width below the first two */
.glass-type-grid>.option-card-visual:nth-child(3) {
    grid-column: 1 / -1;
}

.glass-type-grid>.option-card-visual:nth-child(3) .damage-img {
    max-width: 223px;
}

/* Bočno-position grid: 5th card (rear-cargo) spans full width below the 2x2 set */
.side-glass-grid>.option-card-visual:nth-child(5) {
    grid-column: 1 / -1;
}

/* Mirror the 5 position images when the user selected the passenger side.
   The images are drawn for the driver-side view; flipping horizontally gives
   the correct orientation for the opposite side without needing duplicate art. */
.side-glass-grid[data-side="passenger"] .damage-img {
    transform: scaleX(-1);
}

/* Slightly more compact than Step 1 cards (~10% smaller) so all 5 fit better
   on a mobile screen — image and labels still clearly readable. */
.side-glass-grid>.option-card-visual {
    min-height: 108px;
    padding: 14px 10px;
    gap: 6px;
}

.side-glass-grid>.option-card-visual .damage-img {
    max-width: 99px;
}

.side-grid-cards>.option-card-visual {
    min-height: 168px;
    padding: 18px 12px;
    gap: 10px;
}

.side-grid-cards>.option-card-visual .damage-img {
    max-width: 150px;
    height: 90px;
    object-fit: contain;
}

.side-grid-cards>.option-card-visual>span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.side-grid-cards>.option-card-visual strong {
    font-size: 17px;
    font-weight: 600;
    color: #111;
}

.side-grid-cards>.option-card-visual small {
    font-size: 13px;
    font-weight: 500;
    color: #6b6b73;
    line-height: 1.35;
}

/* Text-only variant for Bočno side picker (no image — just label) */
.option-card-visual--text {
    min-height: 88px;
    font-size: 16px;
    padding: 22px 12px;
}

/* Hint text under the main label on Bočno-position cards */
.option-card-hint {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.25;
}

.option-card-visual.selected .option-card-hint {
    color: var(--primary-color, #007aff);
}

.option-card-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 10px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-color, #1d1d1f);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
    min-height: 120px;
}

.option-card-visual svg,
.option-card-visual .damage-img {
    width: 100%;
    max-width: 110px;
    height: auto;
    pointer-events: none;
}

.option-card-visual .damage-img {
    display: block;
    object-fit: contain;
}

.option-card-visual:hover {
    border-color: #c7c9ce;
}

.option-card-visual.selected {
    border-color: var(--primary-color, #007aff);
    background: rgba(0, 122, 255, 0.06);
}

.option-card-visual.selected svg path[fill^="var"],
.option-card-visual.selected svg rect[fill^="var"] {
    fill-opacity: 0.55;
}

.option-card-visual span {
    line-height: 1.2;
}

/* ── Damage-location step ───────────────────────────────────── */
.damage-location-illustration {
    display: flex;
    justify-content: center;
    padding: 4px 0 4px;
}

.damage-location-illustration svg,
.damage-location-illustration img {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
}

.option-row-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color, #1d1d1f);
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.option-row-item:hover {
    border-color: #c7c9ce;
}

.option-row-item.selected {
    border-color: var(--primary-color, #007aff);
    background: rgba(0, 122, 255, 0.06);
}

.option-row-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color, #007aff);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Service result hero (shared by repair + replacement) ───── */
.result-hero {
    padding: 14px 18px 14px;
    text-align: center;
    border-radius: 16px;
    margin-top: 4px;
    background: #f8fafd;
    border: 1px solid #e5e7eb;
}

.result-hero .result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.result-hero.result-positive .result-icon {
    background: rgba(52, 199, 89, 0.12);
    color: #2fb457;
}

.result-hero .step-title {
    font-size: 22px;
    margin-bottom: 6px;
}

.result-hero .result-body {
    font-size: 14px;
    line-height: 1.4;
    color: #444;
    margin: 0 auto;
    max-width: 440px;
}

/* Positive result: small green uppercase eyebrow (ODLIČNO),
   large body acting as the main hero message, optional subtitle below. */
.result-hero.result-positive .step-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #2fb457;
    margin-bottom: 10px;
}

.result-hero.result-positive .result-body {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
    letter-spacing: -0.2px;
}

.result-hero .result-subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: #444;
    margin: 8px auto 0;
    max-width: 440px;
}

.result-hero .result-subtitle:empty {
    display: none;
}

/* ── Result benefits list (shared by repair + replacement) ──── */
.result-benefits {
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
    display: flex;
    flex-direction: column;
}

.result-benefit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.result-benefit:first-child {
    padding-top: 4px;
}

.result-benefit:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-benefit-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 199, 89, 0.12);
    color: #2fb457;
    margin-top: 1px;
}

.result-benefit-icon svg {
    width: 14px;
    height: 14px;
}

.result-benefit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.result-benefit-headline {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
    letter-spacing: -0.2px;
}

.result-benefit-subtitle {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    color: #444;
}

.result-benefit-hint {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--text-secondary);
}

/* Pill-style hint that sits just above the CTA button (mockup-matched). */
.result-footer-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.25);
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.3;
    color: #444;
    text-align: left;
}

/* Hint lives inside .button-container, directly above the button. */
.result-footer-hint-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.result-footer-hint-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 199, 89, 0.18);
    color: #2fb457;
}

.result-footer-hint-icon svg {
    width: 10px;
    height: 10px;
}

/* ── Body-type step (Phase B2) ──────────────────────────────────────────── */
/* Vertical list of full-width rows: image (118×90 displayed, source PNG 250×190 for retina)
   on the left, label + hint on the right. Pattern is custom — option-card-visual is centred,
   but body-type is row-aligned for easier scanning of 7 buttons in one viewport. */
.body-type-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.body-type-button {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #f6f6f9;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.body-type-button img {
    width: 118px;
    height: 90px;
    flex-shrink: 0;
    object-fit: contain;
}

.body-type-button>span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.body-type-button strong {
    font-size: 17px;
    font-weight: 600;
    color: #111;
}

.body-type-button small {
    font-size: 13px;
    color: #6b6b73;
    line-height: 1.35;
}

.body-type-button.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.body-type-button.selected strong,
.body-type-button.selected small {
    color: var(--primary-color);
}

/* Equipment step (B3a) — kamera / senzor / grejač / HUD */
.equipment-questions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.equipment-block {
    background: var(--white);
    border-radius: 18px;
    padding: 16px 18px 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.equipment-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.equipment-question-title {
    margin: 0 0 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.2px;
    flex: 1;
    line-height: 1.3;
}

/* Answer chip (visible only when block is collapsed/answered) */
.equipment-answer-chip {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.equipment-answer-value {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.equipment-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
}

.equipment-edit-btn:active {
    background: rgba(0, 122, 255, 0.08);
}

.equipment-edit-btn svg {
    flex-shrink: 0;
}

/* Block body — vertical stack: subtitle → image → helper. Animated open/close
   as a single unit so collapse is one motion. */
.equipment-block-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    max-height: 1200px;
    opacity: 1;
    margin: 8px 0 14px 0;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        margin 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease;
}

/* Short location hint shown between the title and the image */
.equipment-subtitle {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* Full-width horizontal illustration (3:1 aspect, source 1200×400). The card
   already has padding, so the image fills the inner card width. */
.equipment-block-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    background: #f6f6f9;
    aspect-ratio: 3 / 1;
    object-fit: cover;
}

.equipment-question-helper {
    width: 100%;
}

.equipment-helper-lead,
.equipment-helper-closing {
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.equipment-helper-lead {
    font-weight: 600;
    color: var(--text-color);
}

.equipment-helper-closing {
    margin-top: 10px;
}

/* Bullet list with green checkmark badge — reuses the same visual language as
   .result-benefit-icon on the recommendation screen. */
ul.equipment-helper-bullets {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
}

ul.equipment-helper-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.equipment-helper-bullet-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 199, 89, 0.12);
    color: #2fb457;
    margin-top: 1px;
}

.equipment-helper-bullet-icon svg {
    width: 12px;
    height: 12px;
}

.equipment-helper-bullet-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* Options wrapper (animated open/close) */
.equipment-options-wrapper {
    overflow: hidden;
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease,
        margin 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pill-shape option buttons inside equipment blocks — full-width row, taller
   and rounder than the slim default. Default .option-button is 110px column-layout
   with icon, intended for icon-above-label cards; here we want clean 3-up pills. */
.equipment-block .option-button {
    height: auto;
    min-height: 64px;
    max-width: none;
    flex: 1;
    flex-direction: row;
    padding: 14px 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border-radius: 32px;
}

.equipment-block .option-button span {
    display: inline-block;
    width: 100%;
    text-align: center;
}

.equipment-block .option-row {
    gap: 10px;
}

/* Collapsed state (accordion: only one block expanded at a time) — body (image+helper)
   and options collapse together. Chip appears only when also answered. */
.equipment-block.is-collapsed .equipment-block-body,
.equipment-block.is-collapsed .equipment-options-wrapper {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.equipment-block.is-answered.is-collapsed .equipment-answer-chip {
    display: inline-flex;
}

.equipment-block.is-collapsed {
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Whole header is clickable when block is collapsed — click anywhere to expand */
.equipment-block.is-collapsed .equipment-block-header {
    cursor: pointer;
}

/* ── Sub-questions (sensor shape / camera holes / camera position) ──────────
   Render INLINE inside the parent equipment block (.equipment-sub-questions
   child div). Visually nested via indent + left border so the customer reads
   them as belonging to the parent question, not as standalone items.

   A parent that has unanswered sub-pitanja gets .has-active-subquestions:
   chip stays visible (DA pill), body+options hide, sub-pitanja open below.
   The next main equipment block stays display:none until all sub-pitanja
   here are resolved — strict sequential reveal. */
.equipment-sub-questions {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin: 14px 0 0 14px;
    padding-left: 18px;
    border-left: 2px solid var(--primary-color);
}

.equipment-block.has-active-subquestions .equipment-sub-questions,
.equipment-block.is-collapsed .equipment-sub-questions:not(:empty) {
    display: flex;
}

/* Partial state — chip + sub-pitanja visible, body + main options hidden. */
.equipment-block.has-active-subquestions .equipment-block-body,
.equipment-block.has-active-subquestions .equipment-options-wrapper {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.equipment-block.has-active-subquestions .equipment-answer-chip {
    display: inline-flex;
}

/* Implied-present state — the catalogue records this equipment on EVERY surviving
   variant, so there is nothing to discriminate: we don't ask DA/NE (a wrong "NE"
   would wipe the whole result — the CLS bug). The block keeps only its header,
   whose title is repurposed as a positive note ("Vaše vozilo ima senzor…"), and
   surfaces its discriminating sub-question inline below. No DA/NE options, no
   Izmeni chip, no helper body, and the header is not clickable. */
.equipment-block.is-implied .equipment-block-body,
.equipment-block.is-implied .equipment-options-wrapper {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.equipment-block.is-implied .equipment-answer-chip {
    display: none;
}

.equipment-block.is-implied .equipment-sub-questions:not(:empty) {
    display: flex;
}

.equipment-block.is-implied .equipment-block-header {
    cursor: default;
}

.sub-question-block {
    background: var(--white);
    border-radius: 14px;
    padding: 14px 16px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sub-question-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.sub-question-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.2px;
    flex: 1;
    line-height: 1.3;
}

.sub-question-answer-chip {
    display: none;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sub-question-answer-value {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.sub-question-options-wrapper {
    overflow: hidden;
    max-height: 4000px;
    opacity: 1;
    margin: 12px 0 4px 0;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease,
        margin 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sub-question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* One option card — image left, label right. Big touch target, generous gap. */
.sub-question-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    background: var(--white);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 150ms ease, transform 100ms ease, background 150ms ease;
}

.sub-question-option:active {
    transform: scale(0.99);
}

.sub-question-option .option-image {
    width: 160px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sub-question-option .option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sub-question-option .option-image .placeholder-label {
    font-size: 10px;
    color: #888;
    text-align: center;
    padding: 4px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sub-question-option .option-label {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.sub-question-option .option-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.sub-question-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.sub-question-option.selected .option-check {
    display: flex;
}

/* Image-less options (Više-glava senzor, Drugi oblik / Drugačije) — rare cases
   with no illustration. The whole button is the centered label in a larger font. */
.sub-question-option.is-text-only {
    justify-content: center;
    text-align: center;
    min-height: 84px;
    padding: 20px 44px;
}

.sub-question-option.is-text-only .option-label {
    flex: 0 1 auto;
    font-size: 20px;
}

/* Scroll hint — visible only when option list overflows viewport (>4 options).
   Toggled in JS by IntersectionObserver on the last option. */
.sub-question-scroll-hint {
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.85;
}

.sub-question-scroll-hint[hidden] {
    display: none;
}

/* Collapsed accordion state — same semantics as .equipment-block */
.sub-question-block.is-collapsed .sub-question-options-wrapper {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.sub-question-block.is-answered.is-collapsed .sub-question-answer-chip {
    display: inline-flex;
}

.sub-question-block.is-collapsed {
    padding-top: 14px;
    padding-bottom: 14px;
}

.sub-question-block.is-collapsed .sub-question-block-header {
    cursor: pointer;
}

/* Highlight pulse — used after edit-from-summary to draw the customer's eye to
   where they need to make a change. Triggered by adding .is-highlighting; the JS
   removes it after the animation completes. */
@keyframes equipment-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.55); background-color: var(--primary-light); }
    50%  { box-shadow: 0 0 0 14px rgba(0, 122, 255, 0); background-color: var(--primary-light); }
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); background-color: transparent; }
}

.equipment-block.is-highlighting,
.sub-question-block.is-highlighting {
    animation: equipment-highlight-pulse 1s ease-out;
}

/* Resolution section (NISAM SIGURAN follow-up) */
#equipment-unsure-resolution {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.equipment-unsure-intro {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

#equipment-unsure-resolution .options-container .option-button {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    height: auto;
    min-height: 56px;
    flex-direction: row;
    padding: 12px 14px;
    max-width: none;
}

/* Roof step — secondary "Nisam siguran" button + inline measurement panel */
.roof-uncertain-button {
    width: 100%;
    padding: 14px 16px;
    margin-top: 4px;
    background: #f6f6f9;
    border: 2px solid transparent;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.roof-uncertain-button.selected {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.roof-measure-panel {
    margin-top: 14px;
    padding: 16px;
    background: #f6f6f9;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.roof-measure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.roof-measure-question {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.2px;
    line-height: 1.3;
    flex: 1;
}

.roof-measure-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.roof-measure-answer-value {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.roof-measure-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.roof-measure-edit-btn:hover,
.roof-measure-edit-btn:active {
    background: rgba(0, 122, 255, 0.08);
}

.roof-measure-edit-btn svg {
    flex-shrink: 0;
}

.roof-measure-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

.roof-measure-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.roof-measure-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.roof-measure-instruction {
    margin: 0;
    font-size: 15px;
    color: #6a6a72;
    line-height: 1.45;
}

.roof-measure-inputs {
    display: flex;
    gap: 12px;
}

.roof-measure-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.roof-measure-field span {
    font-size: 13px;
    font-weight: 600;
    color: #4a4a52;
}

.roof-measure-field input {
    padding: 12px 14px;
    border: 1.5px solid #d1d1d6;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    color: #111;
    width: 100%;
    box-sizing: border-box;
}

.roof-measure-field input:focus {
    outline: none;
    border-color: var(--primary-color);
}