/* Стили для страницы истории заказов */

.orders-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.orders-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #8B4513;
    text-align: center;
    margin-bottom: 40px;
}

.loading-message,
.empty-message {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    font-family: 'Open Sans', sans-serif;
}

.empty-message a {
    color: #8B4513;
    text-decoration: underline;
}

.empty-message a:hover {
    color: #A0522D;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

.orders-table thead {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: #fff;
}

.orders-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

.orders-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: #2c2c2c;
}

.orders-table tbody tr:hover {
    background-color: #f9f9f9;
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

.actions-cell {
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #8B4513;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background-color: #f5f5f5;
    color: #A0522D;
    transform: scale(1.1);
}

.action-btn.view {
    color: #007bff;
}

.action-btn.view:hover {
    color: #0056b3;
    background-color: #e7f3ff;
}

.action-btn.edit {
    color: #28a745;
}

.action-btn.edit:hover {
    color: #1e7e34;
    background-color: #e7f5e7;
}

.action-btn.delete {
    color: #dc3545;
}

.action-btn.delete:hover {
    color: #c82333;
    background-color: #ffe7e7;
}

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

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: #8B4513;
    margin-bottom: 25px;
    margin-right: 30px;
}

.modal-body {
    margin-bottom: 25px;
}

.modal-body p {
    font-size: 16px;
    color: #2c2c2c;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
}

.modal-info-group {
    margin-bottom: 20px;
}

.modal-info-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-family: 'Open Sans', sans-serif;
}

.modal-info-group .value {
    font-size: 16px;
    color: #2c2c2c;
    font-family: 'Open Sans', sans-serif;
}

.modal-info-group input[type="text"],
.modal-info-group input[type="email"],
.modal-info-group input[type="tel"],
.modal-info-group input[type="time"],
.modal-info-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    color: #2c2c2c;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal-info-group input:focus,
.modal-info-group textarea:focus {
    outline: none;
    border-color: #8B4513;
}

.modal-info-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-info-group .readonly {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.radio-group-modal {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-label-modal {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label-modal input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8B4513;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-ok,
.btn-cancel,
.btn-save,
.btn-delete {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.btn-ok {
    background-color: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

.btn-ok:hover {
    background-color: #A0522D;
    border-color: #A0522D;
}

.btn-cancel {
    background-color: #fff;
    color: #666;
    border-color: #ddd;
}

.btn-cancel:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.btn-save {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}

.btn-save:hover {
    background-color: #218838;
    border-color: #218838;
}

.btn-delete {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* Адаптивность */
@media (max-width: 800px) {
    .orders-table {
        font-size: 14px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 10px 8px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .orders-section {
        padding: 20px 15px;
    }
    
    .orders-table {
        display: block;
        overflow-x: auto;
    }
    
    .actions-cell {
        flex-direction: column;
        gap: 5px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn-ok,
    .btn-cancel,
    .btn-save,
    .btn-delete {
        width: 100%;
    }
}
