﻿/* Файл wwwroot\css\checkout.css */

/* Стили для оформления заказа */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

    .checkout-container h1 {
        color: #333;
        font-size: 24px;
        margin-bottom: 30px;
        border-bottom: 2px solid #cc0000;
        padding-bottom: 10px;
    }

.checkout-content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.checkout-form {
    flex: 2;
    min-width: 300px;
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.order-summary {
    flex: 1;
    min-width: 250px;
    background: #f5f5f5;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ddd;
    height: fit-content;
}

    .order-summary h3 {
        color: #333;
        font-size: 18px;
        margin-top: 0;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid #ddd;
    }

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.total-amount {
    color: #cc0000;
    font-weight: bold;
    font-size: 24px;
}

.summary-note {
    color: black;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #333;
        font-size: 14px;
        font-weight: bold;
    }

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: #cc0000;
        box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.1);
    }

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Кнопки формы */
.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.submit-order-btn {
    background: #cc0000;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
    min-width: 200px;
}

    .submit-order-btn:hover {
        background: #990000;
    }

.back-to-cart {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 12px 20px;
    white-space: nowrap;
}

    .back-to-cart:hover {
        color: #cc0000;
        text-decoration: underline;
    }

/* Модальное окно успеха */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

    .modal-content h2 {
        color: #cc0000;
        font-size: 28px;
        margin-bottom: 20px;
    }

    .modal-content p {
        color: #666;
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 15px;
    }

    .modal-content strong {
        color: #333;
        font-size: 18px;
    }

.modal-btn {
    display: inline-block;
    background: #cc0000;
    color: white;
    text-decoration: none;
    padding: 12px 40px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 20px;
    transition: background 0.2s;
}

    .modal-btn:hover {
        background: #990000;
    }

/* Адаптивность */
@media (max-width: 768px) {
    .checkout-content {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .submit-order-btn {
        width: 100%;
    }

    .back-to-cart {
        text-align: center;
        width: 100%;
    }

    .modal-content {
        padding: 30px 20px;
    }

        .modal-content h2 {
            font-size: 24px;
        }
}

/* Стили для валидации */
.form-control.error {
    border-color: #cc0000;
}

.error-message {
    color: #cc0000;
    font-size: 12px;
    margin-top: 5px;
}

/* Стили для спиннера загрузки */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid #f3f3f3;
        border-top: 2px solid #cc0000;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
