/**
 * Стили для модального окна обратной связи
 * =========================================
 */

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Контент модального окна */
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Кнопка закрытия */
.modal .close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal .close:hover {
    color: #333;
}

/* Заголовок */
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

/* Форма */
#callback-form input,
#callback-form select,
#callback-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

#callback-form input:focus,
#callback-form select:focus,
#callback-form textarea:focus {
    outline: none;
    border-color: #e63946;
}

/* Поле телефона с префиксом +7 */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px 10px;
    margin-bottom: 15px;
    background-color: white;
}

.phone-prefix {
    font-weight: bold;
    margin-right: 5px;
    color: #333;
    font-size: 16px;
}

.phone-input-wrapper input {
    border: none !important;
    flex: 1;
    outline: none;
    padding: 7px 5px !important;
    margin: 0 !important;
}

/* Кнопка отправки */
.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #d62839;
}

/* Кнопка "Заказать звонок" на десктопе */
.btn-callback {
    padding: 12px 24px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-callback:hover {
    background-color: #d62839;
}

/* Скрытие элементов на мобильных/десктопе */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
}

/* Плавающая кнопка "Заказать звонок" для мобильной версии */
.mobile-callback-btn {
    display: none;
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 998;
    background: linear-gradient(135deg, #e63946 0%, #ff6b35 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    opacity: 0;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mobile-callback-btn.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mobile-callback-btn:hover {
    background: linear-gradient(135deg, #d62839 0%, #e65a2a 100%);
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 768px) {
    .mobile-callback-btn {
        display: block;
    }
}

/* Красивые уведомления */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 99999;
    transform: translateX(calc(100% + 30px));
    transition: transform 0.3s ease;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #22c55e;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 14px;
    color: #666;
}

.notification-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: #333;
}

@media (max-width: 768px) {
    .notification-toast {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 10px;
    }
}
