/* Основные стили для страниц заказов */
.orders-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #f5f5f5;
    padding: 30px 0;
    box-sizing: border-box;
}

.orders-container {
    max-width: 1280px;
    width: 100%;
    padding: 0 15px;
}

/* Заголовки */
.orders-title {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: left;
}

.orders-subtitle {
    color: #555;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Хлебные крошки */
.orders-breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 25px;
    border-radius: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.orders-breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #777;
}

.orders-breadcrumb-item + .orders-breadcrumb-item::before {
    content: ">";
    color: #777;
    margin: 0 10px;
    font-weight: 600;
}

.orders-breadcrumb-item a {
    color: #e72630;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.orders-breadcrumb-item a:hover {
    color: #c51e26;
    text-decoration: underline;
}

.orders-breadcrumb-item.active {
    color: #777;
    font-size: 14px;
}

/* Карточки */
.orders-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.orders-card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.orders-card-title {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

/* Формы */
.orders-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.orders-form-section {
    margin-bottom: 7px;
    background: #f3f4f6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    padding: 14px 12px 8px 12px;
}

.orders-form-section:last-child {
    margin-bottom: 0;
}

.orders-form-section-title {
    margin-top: 0;
    margin-bottom: 22px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.orders-form-group {
    margin-bottom: 20px;
}

.orders-form-label {
    display: block;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
}

.orders-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.orders-form-control:focus {
    border-color: #e72630;
    outline: none;
    box-shadow: 0 0 0 2px rgba(231, 38, 48, 0.2);
}

.orders-form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Стили для select элементов */
.orders-form-control select,
.orders-form-control option {
    background-color: #fff;
    color: #333;
    font-size: 16px;
}

.orders-form-control select:focus {
    border-color: #e72630;
    outline: none;
    box-shadow: 0 0 0 2px rgba(231, 38, 48, 0.2);
}

.orders-form-control option {
    padding: 8px 12px;
    background-color: #fff;
    color: #333;
}

/* Стили для textarea и input (убираем стрелку) */
.orders-form-control:not(select) {
    background-image: none;
    padding-right: 15px;
}

/* Радио кнопки и чекбоксы */
.orders-form-check {
    margin-bottom: 12px;
}

.orders-form-check-input {
    margin-right: 10px;
    transform: scale(1.2);
}

.orders-form-check-label {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Кнопки */
.orders-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-width: 120px;
}

.orders-btn-primary {
    background-color: #e72630;
    color: white;
}

.orders-btn-primary:hover {
    background-color: #c51e26;
    color: white;
}

.orders-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.orders-btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

.orders-btn-outline-primary {
    background-color: transparent;
    color: #e72630;
    border: 2px solid #e72630;
}

.orders-btn-outline-primary:hover {
    background-color: #e72630;
    color: white;
}

.orders-btn-outline-danger {
    background-color: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.orders-btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.orders-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-width: 80px;
}

.orders-btn-lg {
    padding: 16px 32px;
    font-size: 18px;
    min-width: 160px;
}

/* Бейджи статусов */
.orders-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-bg-warning {
    background-color: #ffc107;
    color: #212529;
}

.orders-bg-info {
    background-color: #17a2b8;
    color: white;
}

.orders-bg-primary {
    background-color: #007bff;
    color: white;
}

.orders-bg-success {
    background-color: #28a745;
    color: white;
}

.orders-bg-danger {
    background-color: #dc3545;
    color: white;
}

.orders-bg-secondary {
    background-color: #6c757d;
    color: white;
}

/* Таблицы */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.orders-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.orders-table td {
    color: #555;
    font-size: 14px;
}

.orders-table-responsive {
    overflow-x: auto;
}

/* Пагинация */
.orders-pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.orders-page-item {
    margin: 0 5px;
}

.orders-page-link {
    display: block;
    padding: 10px 15px;
    color: #e72630;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s;
}

.orders-page-link:hover {
    background-color: #e72630;
    color: white;
    border-color: #e72630;
}

.orders-page-item.active .orders-page-link {
    background-color: #e72630;
    color: white;
    border-color: #e72630;
}

/* Алерты */
.orders-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.orders-alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.orders-alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.orders-alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.orders-alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-color: rgba(23, 162, 184, 0.2);
    color: #0c5460;
}

/* Timeline для истории заказов */
.orders-timeline {
    position: relative;
    padding-left: 30px;
}

.orders-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.orders-timeline-marker {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e72630;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e72630;
}

.orders-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 17px;
    width: 2px;
    height: calc(100% + 10px);
    background-color: #e9ecef;
}

.orders-timeline-content {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #e72630;
}

/* Макет для создания заказа */
.orders-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.orders-card,
.orders-summary {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.orders-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    height: fit-content;
}

.orders-summary-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.orders-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.orders-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.orders-item-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex-grow: 1;
}

.orders-item-price {
    font-size: 14px;
    color: #e72630;
    font-weight: 400;
}

.orders-item-note {
    font-size: 14px;
    color: #777;
    margin-top: 2px;
}

.orders-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Адаптивность */
@media (max-width: 900px) {
    .orders-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .orders-page {
        padding: 20px 0;
    }
    
    .orders-container {
        padding: 0 10px;
    }
    
    .orders-title {
        font-size: 24px;
    }
    
    .orders-card {
        padding: 15px;
    }
    
    .orders-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .orders-breadcrumb {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .orders-breadcrumb-item + .orders-breadcrumb-item::before {
        display: none;
    }
    
    /* Адаптивность для формы поиска */
    .orders-card form > div {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .orders-card form .orders-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .orders-page {
        padding: 15px 0;
    }
    
    .orders-container {
        padding: 0 5px;
    }
    
    .orders-card {
        padding: 10px;
    }
    
    .orders-table-responsive {
        font-size: 12px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 8px 6px;
    }
}

/* Компактная сетка для формы заказа */
.orders-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.orders-form-block {
    background: #fafbfc;
    border-radius: 10px;
    padding: 24px 20px 18px 20px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.orders-form-block .orders-form-section-title {
    margin-bottom: 16px;
    font-size: 17px;
    font-weight: 600;
    color: #222;
}

.orders-form-block .orders-form-group {
    margin-bottom: 12px;
}

@media (max-width: 992px) {
    .orders-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .orders-form-block {
        padding: 16px 10px 12px 10px;
    }
}

@media (max-width: 576px) {
    .orders-form-block {
        padding: 8px 2px 6px 2px;
    }
    .orders-form-grid {
        gap: 10px;
    }
}

.orders-form-control[type="textarea"],
.orders-form-control textarea {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    min-height: 60px;
    max-height: 200px;
    height: auto;
    resize: none;
    transition: height 0.2s;
}

.orders-form textarea {
    resize: none !important;
    min-width: 100%;
    max-width: 100%;
    min-height: 60px;
    max-height: 200px;
    height: auto;
    box-sizing: border-box;
}

/* Стандартные стили для select - без попыток стилизовать option */
.orders-form select:focus {
    outline: 2px solid #e72630;
    border-color: #e72630;
}

/* Замена синего цвета выделения на красный в select */
.orders-form select {
    accent-color: #e72630;
}

/* Для Firefox */
.orders-form select {
    color-scheme: light;
}

/* Для WebKit браузеров (Chrome, Safari) */
.orders-form select::-webkit-select-placeholder {
    color: #e72630;
}

/* Замена стандартного синего выделения на красное */
.orders-form select:focus {
    outline: 2px solid #e72630;
    border-color: #e72630;
    box-shadow: 0 0 0 2px rgba(231, 38, 48, 0.2);
}

/* Кастомный select для orders */
.orders-custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}
.orders-custom-select-button {
    position: relative;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.orders-custom-select-button:focus,
.orders-custom-select-button.open {
    outline: none;
    border-color: #e72630;
    box-shadow: none;
    border-width: 1px;
}
.orders-custom-select-button::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #222;
    pointer-events: none;
    transition: transform 0.2s;
}
.orders-custom-select-button.open::after {
    content: '▲';
}
.orders-custom-select-dropdown {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #fff;
    border: 1.5px solid #e72630;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
}
.orders-custom-select-dropdown.open {
    display: block;
}
.orders-custom-select-option {
    border: 1px solid transparent;
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    background: #fff;
    transition: background 0.15s, color 0.15s, border 0.15s;
}
.orders-custom-select-option.selected {
    border: 1px solid #e72630;
    background: #fff;
    color: #333;
}
.orders-custom-select-option:hover:not(.disabled) {
    background: #e72630;
    color: #fff;
    border: 1px solid #e72630;
}
.orders-custom-select-option.disabled {
    color: #aaa;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Кастомный select без префикса orders- для работы с JavaScript */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}
.custom-select-button {
    position: relative;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.custom-select-button:focus,
.custom-select-button.open {
    outline: none;
    border-color: #e72630;
    box-shadow: none;
    border-width: 1px;
}
.custom-select-button::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #222;
    pointer-events: none;
    transition: transform 0.2s;
}
.custom-select-button.open::after {
    content: '▲';
}
.custom-select-dropdown {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #fff;
    border: 1.5px solid #e72630;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
}
.custom-select-dropdown.open {
    display: block;
}
.custom-select-option {
    border: 1px solid transparent;
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    background: #fff;
    transition: background 0.15s, color 0.15s, border 0.15s;
}
.custom-select-option.selected {
    border: 1px solid #e72630;
    background: #fff;
    color: #333;
}
.custom-select-option:hover:not(.disabled) {
    background: #e72630;
    color: #fff;
    border: 1px solid #e72630;
}
.custom-select-option.disabled {
    color: #aaa;
    cursor: not-allowed;
    background: #f5f5f5;
}

.orders-agree-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
}
.orders-agree-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    z-index: 1;
}
.orders-agree-checkbox label {
    position: relative;
    padding-left: 25px;
    font-size: 15px;
    color: #555;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    display: block;
    line-height: 1.4;
}
.orders-agree-checkbox label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 1.5px solid #cacaca;
    border-radius: 3px;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
}
.orders-agree-checkbox input[type="checkbox"]:checked + label::before {
    background: #999;
    border-color: #999;
}
.orders-agree-checkbox label::after {
    content: "✓";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.orders-agree-checkbox input[type="checkbox"]:checked + label::after {
    opacity: 1;
}

/* Стили для ссылок в чекбоксе согласия */
.orders-agree-checkbox label a {
    color: #e72630;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-decoration 0.3s;
}

.orders-agree-checkbox label a:hover {
    color: #c51e26;
    text-decoration: underline;
}

.orders-agree-checkbox label a:focus {
    outline: 2px solid rgba(231, 38, 48, 0.3);
    outline-offset: 2px;
    border-radius: 2px;
}

.orders-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    background: none;
}
.orders-info-table th, .orders-info-table td {
    padding: 8px 12px;
    font-size: 15px;
    text-align: left;
    border: none;
    vertical-align: top;
}
.orders-info-table th {
    color: #888;
    font-weight: 500;
    width: 180px;
    white-space: nowrap;
}
.orders-info-table td {
    color: #222;
    font-weight: 400;
}
.orders-info-table tr + tr th, .orders-info-table tr + tr td {
    border-top: 1px solid #f0f0f0;
}

.orders-summary-with-comment .orders-summary-flex {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.orders-customer-comment {
    flex: 1 1 40%;
    max-width: 320px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px 16px 16px 16px;
    margin-right: 0;
    border-left: 3px solid #e72630;
}
.orders-summary-content {
    flex: 1 1 60%;
    min-width: 220px;
}
@media (max-width: 900px) {
    .orders-summary-with-comment .orders-summary-flex {
        flex-direction: column;
        gap: 18px;
    }
    .orders-customer-comment, .orders-summary-content {
        max-width: none;
        width: 100%;
    }
}

.orders-table-summary {
    max-width: 400px;
    margin-left: auto;
    margin-top: 18px;
}
.orders-table-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}
.orders-table-summary-total {
    font-size: 18px;
    font-weight: 600;
    border-bottom: none;
    margin-top: 10px;
    padding-bottom: 0;
}

.orders-table-summary-row.orders-table-summary-normal {
    font-size: 15px;
    font-weight: 400;
    border-bottom: 1px solid #eee;
    margin-top: 0;
    padding-bottom: 8px;
}

/* Стили для адреса в деталях заказа */
.orders-address-text {
    font-weight: 600;
    color: #333;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6c757d;
}

/* Стили для комментария в деталях заказа */
.orders-comment-text {
    font-weight: 600;
    color: #333;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6c757d;
} 