/* Стили для калькулятора обмена */

.calculator-section {
    padding: 80px 0;
    background: var(--bg-color);
    position: relative;
    z-index: var(--z-index-sticky);
}

.calculator-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px var(--shadow-color);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.calculator-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

/* Сетка для полей ввода */
.exchange-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: end;
}

/* Группа ввода */
.input-group {
    display: flex;
    flex-direction: column;
}

.input-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

/* Контейнер для валютного ввода */
.currency-input {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
}

.amount-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Убираем стрелочки в number input */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-input[type=number] {
    -moz-appearance: textfield;
}

.currency-select {
    background: var(--surface-color);
    border: none;
    border-left: 1px solid var(--border-color);
    padding: 0.75rem;
    outline: none;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 60px;
    max-width: 80px;
}

/* Кнопка обмена местами */
.swap-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.5rem;
    width: 50px;
    flex-shrink: 0;
}

.swap-button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: var(--swap-button-size);
    height: var(--swap-button-size);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
    position: relative;
}

.swap-button:hover {
    background: var(--primary-color);
    transform: rotate(180deg) scale(1.1);
    filter: brightness(1.1);
}

.swap-button:active {
    transform: rotate(180deg) scale(0.95);
}

/* Информация об обмене */
.exchange-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.rate-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.rate-info p {
    margin: 0;
}

.exchange-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exchange-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

/* Уведомление об обмене */
.exchange-notice {
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    color: var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.exchange-notice i {
    margin-right: 0.5rem;
}

/* Дополнительные опции */
.additional-options {
    margin-bottom: 2rem;
}

.modern-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--bg-color);
    color: var(--text-primary);
    outline: none;
}

/* Кнопки контактов */
.contact-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.contact-btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    color: white;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-btn.telegram {
    background: var(--info-color);
}

.contact-btn.whatsapp {
    background: var(--success-color);
}

.contact-btn.phone {
    background: var(--primary-color);
}

.contact-btn.callback {
    background: var(--secondary-color);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    color: white;
    text-decoration: none;
}

/* Стили для обязательных полей */
.field-required {
    position: relative;
}

.field-required::after {
    content: " *";
    color: var(--danger-color);
    font-weight: bold;
    margin-left: 4px;
}

.required-asterisk {
    color: var(--danger-color);
    font-weight: bold;
}

/* Подсветка невалидных полей */
.field-invalid .currency-input,
.field-invalid .modern-select {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--danger-color-rgb), 0.25);
}

/* Стили для кнопки обратного звонка при наведении */
.contact-btn.callback:hover ~ .callback-requirements,
.contact-btn.callback:focus ~ .callback-requirements {
    display: block;
}

.callback-requirements {
    display: none;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Адаптивность */

/* Промежуточный размер экрана */
@media (max-width: 850px) {
    .exchange-inputs {
        grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
        gap: 0.5rem;
    }

    .swap-button-container {
        width: 40px;
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .calculator-card {
        padding: 1.5rem;
    }

    .exchange-inputs {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .swap-button-container {
        order: 2;
        margin: 0.5rem 0;
        width: auto;
        align-self: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .input-group:first-child {
        order: 1;
    }

    .input-group:last-child {
        order: 3;
    }

    .exchange-info {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Ошибки валидации полей */
.field-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    animation: fadeIn 0.3s ease;
}

.field-invalid {
    border-color: #dc3545 !important;
    animation: shake 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Убираем модальное уведомление в углу для ошибок валидации */
.notification.validation-error {
    display: none !important;
}

/* Стили для отключенного состояния селектора */
.modern-select:disabled {
    background-color: var(--surface-color);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Для темной темы */
[data-theme="dark"] .modern-select:disabled {
    background-color: var(--surface-color);
    color: var(--text-muted);
}

