/* How It Works Modal */
.how-it-works-content {
    width: min(860px, 95vw);
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px;
    gap: 16px;
}

.how-it-works-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.how-it-works-header h3 {
    margin: 0;
    text-align: left;
    color: #f8fafc;
    font-size: 1.95rem;
    line-height: 1.1;
}

.how-it-works-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.how-it-works-section h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--accent);
    font-weight: 600;
}

.how-factors-mode-toggle {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid #334155;
    width: fit-content;
    margin: 0;
}

.how-mode-btn {
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    padding: 8px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 9px;
    transition: background 0.25s ease, color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.how-mode-btn i {
    font-size: 0.85rem;
}

.how-mode-btn:hover:not(.active) {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

.how-mode-btn.active {
    background: rgba(6, 182, 212, 0.18);
    color: var(--accent);
}

.how-factors-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.how-factors-container[data-mode]:not([data-mode=""]) {
    display: flex;
}

.how-factors-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.how-factors-group + .how-factors-group {
    margin-top: 6px;
}

.how-factors-group-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
}

.how-factors-group-line {
    height: 1px;
    width: 100%;
    background: rgba(148, 163, 184, 0.35);
}

.how-items-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.how-item {
    border: 1px solid #334155;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.65);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.how-item:hover {
    border-color: rgba(6, 182, 212, 0.55);
    background: rgba(15, 23, 42, 0.82);
}

.how-item.active {
    border-color: rgba(6, 182, 212, 0.55);
    background: rgba(15, 23, 42, 0.78);
}

.how-item-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    padding: 10px 12px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    font-size: 0.94rem;
    font-weight: 600;
    text-align: left;
}

.how-item-toggle span {
    display: flex;
    align-items: center;
    gap: 0;
}

.how-item-toggle span i {
    display: none;
}

.how-item-toggle > i {
    display: none;
    color: #94a3b8;
    transform: rotate(-90deg);
    transition: color 0.25s ease;
}

.how-item.active .how-item-toggle > i {
    color: var(--accent);
}

.how-item-content {
    display: none;
}

.car-info-modal.how-item-info-modal {
    width: 640px;
    max-width: 92%;
    padding: 0;
    overflow: hidden;
}

.how-item-info-modal .car-info-header {
    padding: 22px 24px 0;
    align-items: flex-start;
    gap: 14px;
}

.how-item-info-modal .car-info-title {
    flex: 1;
    gap: 0;
}

.how-item-info-modal .car-info-title h3 {
    margin: 0;
    line-height: 1.1;
    padding-right: 8px;
}

.how-item-info-modal .info-car-brand-text {
    margin: 6px 0 0;
}

.how-item-info-icon-wrap {
    display: none;
}

.how-item-info-body {
    padding: 22px 24px 24px;
}

.how-item-info-body p {
    margin: 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.72;
}

@media (max-width: 900px) {
    .how-it-works-content {
        width: min(96vw, 720px);
        max-height: 90vh;
        padding: 16px;
    }

    .how-it-works-header h3 {
        font-size: 1.45rem;
    }

    .how-items-grid {
        grid-template-columns: 1fr;
    }

    .car-info-modal.how-item-info-modal {
        width: 95%;
    }

    .how-item-info-body {
        padding: 20px;
    }

    .how-item-info-modal .car-info-header {
        padding: 18px 20px 0;
    }
}
