﻿/* order-button.css — стили для кнопки заказа и модального окна */

/* Контейнер для кнопки внутри price-block */
.order-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

/* Кнопка заказа */
.order-button {
    background: #ff9f4a;
    color: #1e4663;
    border: none;
    padding: 10px 28px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: inherit;
}

.order-button:hover {
    background: #ff8c2a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.order-button:active {
    transform: translateY(0);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 25px 30px;
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease;
}

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

.close {
    position: absolute;
    right: 20px;
    top: 12px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.close:hover {
    color: #1e4663;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e4663;
    font-size: 22px;
    border-bottom: 2px solid #ff9f4a;
    padding-bottom: 10px;
}

.modal-content label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 8px 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #ff9f4a;
    box-shadow: 0 0 0 2px rgba(255,159,74,0.2);
}

.modal-content button[type="submit"] {
    background: #2c5f8a;
    color: #fff;
    border: none;
    padding: 12px 20px;
    margin-top: 20px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-content button[type="submit"]:hover {
    background: #1e4663;
}

#formMessage {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

/* Блок цены — цена слева, кнопка справа */
.price-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

#product-price {
    font-size: 24px;
    font-weight: bold;
    color: #1e4663;
    margin: 0;
    flex: 1;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
    .price-block {
        flex-direction: column;
        align-items: stretch;
    }
    .order-button-container {
        justify-content: center;
    }
    .modal-content {
        margin: 15% auto;
        padding: 20px;
    }
}