/*
 * Стили для модального окна заказа Wallmann
 * Современный дизайн с адаптивностью
 */

/* Основные стили модального окна */
.wallmann-order-modal .modal-dialog {
    max-width: 600px;
    margin: 30px auto;
    z-index: 1050;
}

.wallmann-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Заголовок модального окна */
.wallmann-modal-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 25px 30px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.wallmann-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.wallmann-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.wallmann-close:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #007cba;
    transform: rotate(90deg);
}

.wallmann-modal-title-section {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wallmann-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallmann-modal-title i {
    font-size: 26px;
}

.wallmann-product-info {
    margin-top: 10px;
}

.wallmann-product-info .product-name {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px 0;
    opacity: 0.95;
}

.product-price-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-label {
    font-size: 14px;
    opacity: 0.8;
}

.price-value {
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Тело модального окна */
.wallmann-modal-body {
    padding: 30px;
    background: white;
}

.wallmann-form-container {
    max-width: 100%;
}

.wallmann-form-header {
    margin-bottom: 25px;
    text-align: center;
}

.wallmann-form-description {
    font-size: 16px;
    color: #6c757d !important;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* Сообщения */
.wallmann-messages {
    margin-bottom: 20px;
    padding: 0;
}

.wallmann-messages .alert {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallmann-messages .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.wallmann-messages .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Форма */
.wallmann-order-form {
    margin: 0;
}

.wallmann-form-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.wallmann-form-group {
    flex: 1;
    position: relative;
}

.wallmann-form-group.wallmann-full-width {
    flex: none;
    /* width: 100%; */
}

.wallmann-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 8px;
}

.wallmann-label i {
    color: #007cba;
    width: 16px;
}

.wallmann-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wallmann-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    background: #ffffff;
}

.wallmann-input::placeholder {
    color: #adb5bd;
    font-size: 14px;
}

.wallmann-input[readonly] {
    background: #f8f9fa;
    color: #6c757d;
    cursor: default;
}

/* Сообщения об ошибках */
.wallmann-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.wallmann-error-message.show {
    display: block;
}

.wallmann-input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

/* Действия формы */
.wallmann-form-actions {
    margin-top: 30px;
    text-align: center;
}

.wallmann-submit-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallmann-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
    background: linear-gradient(135deg, #0086cc 0%, #006094 100%);
}

.wallmann-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.3);
}

.wallmann-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wallmann-submit-btn .btn-loading {
    color: rgba(255, 255, 255, 0.8);
}

.wallmann-form-note {
    margin-top: 15px;
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wallmann-form-note i {
    color: #007cba;
}

/* Адаптивность */
@media (max-width: 768px) {
    .wallmann-order-modal .modal-dialog {
        margin: 15px;
        max-width: none;
    }
    
    .wallmann-modal-header {
        padding: 20px 25px;
    }
    
    .wallmann-modal-title {
        font-size: 20px;
    }
    
    .wallmann-product-info .product-name {
        font-size: 16px;
    }
    
    .wallmann-modal-body {
        padding: 25px 20px;
    }
    
    .wallmann-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .wallmann-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .wallmann-submit-btn {
        padding: 14px 30px;
        font-size: 14px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .wallmann-order-modal .modal-dialog {
        margin: 10px;
    }
    
    .wallmann-modal-header {
        padding: 18px 20px;
    }
    
    .wallmann-modal-title {
        font-size: 18px;
    }
    
    .wallmann-modal-body {
        padding: 20px 15px;
    }
    
    .wallmann-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .wallmann-submit-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Анимации загрузки */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.wallmann-messages .alert {
    animation: slideDown 0.3s ease-out;
}

/* Валидация в реальном времени */
.wallmann-input.valid {
    border-color: #28a745;
    background: #f8fff8;
}

.wallmann-input.valid + .wallmann-validation-icon {
    color: #28a745;
}

.wallmann-validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
}

.wallmann-validation-icon.show {
    opacity: 1;
}