:root {
    --primary: #4caf50;
    --secondary: #2196f3;
    --accent: #ff9800;
    --dark: #333;
    --border: #ddd;
    --moscow: #d4e6ff;
}

h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

.calculator-container {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.city-input-container {
    position: relative;
    flex: 1;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

.moscow {
    background: var(--moscow);
}

.suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    z-index: 120;
    max-height: 220px;
    overflow: auto;
    display: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f0f0f0;
}

.swap-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f0f8ff;
    color: var(--secondary);
    font-size: 18px;
}

.swap-icon:hover {
    background: var(--secondary);
    color: #fff;
    transform: rotate(180deg);
}

.vehicle-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.vehicle-card {
    width: calc(33.333% - 8px);
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.18s;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

.vehicle-card.selected {
    border-color: var(--primary);
    background: #f0fff0;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

.vehicle-card strong {
    display: block;
    color: var(--primary);
    margin-bottom: 6px;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-accent {
    background: var(--accent);
    color: #2b1f00;
}

.info {
    font-size: 14px;
    color: #666;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    margin: 12px 0;
}

.request-message {
    background: #fff8e1;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.result {
    margin-top: 18px;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
    display: none;
}

.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.modal {
    display: none;
    width: 100%;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 400;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 92%;
    max-width: 520px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

@media (max-width: 760px) {
    .vehicle-card {
        width: calc(50% - 8px);
    }

    .input-group {
        flex-direction: column;
    }

    .swap-icon {
        transform: rotate(90deg);
    }
}
