/* Стили для страницы корзины */
.header {
    border-bottom: none;
}

.promo {
    display: none !important;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: left;
}

/* Пустая корзина */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 1px solid #e9ecef;
}

/* Контейнер услуг внутри бронирования */
.services-container {
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* Информация о дополнительных услугах */
.services-info {
    padding: 0 15px;
}

.services-info p {
    margin: 0;
    color: #383a3f;
    font-size: 14px;
}

.services-info a {
    color: #228B22;
    text-decoration: underline;
    font-weight: 500;
}

.services-info a:hover {
    color: #666;
}

.services-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
}

.empty-cart-icon {
    font-size: 64px;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.empty-cart p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 30px;
}

/* Таймер резервирования */
.reservation-timer {
    color: #666;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.reservation-timer i {
    margin-right: 8px;
    font-size: 18px;
}

/* Контейнер для каждого резервирования с обводкой */
.reservation-wrapper {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    margin-bottom: 25px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.reservation-wrapper:last-child {
    margin-bottom: 30px;
}


/* Карточка информации о бронировании */
.booking-info-card {
    background: #fff;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: none;
}

.booking-info-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.booking-info-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.booking-info-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.property-image {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-details {
    flex: 1;
}

.property-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.booking-dates {
    margin-bottom: 15px;
}

.date-item {
    display: flex;
    margin-bottom: 5px;
}

.date-label {
    font-weight: 500;
    color: #666;
    margin-right: 10px;
    min-width: 120px;
}

.date-value {
    color: #333;
}

.booking-actions {
    display: flex;
    gap: 10px;
}

.property-price {
    font-size: 20px;
    font-weight: 600;
    color: #228B22;
    text-align: right;
    min-width: 100px;
}

/* Карточка услуги */
.service-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.service-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.service-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.service-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.service-image {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
}

.service-details {
    flex: 1;
}

.service-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.service-dates {
    margin-bottom: 15px;
}

.service-actions {
    display: flex;
    gap: 10px;
}

.service-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.qty-btn:hover {
    background: #f8f9fa;
    border-color: #228B22;
}

.qty-input {
    width: 60px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    background: #f8f9fa;
}

.quantity-message {
    margin-top: 5px;
    font-size: 14px;
    color: #c7c7c7;
    text-align: center;
    width: 100%;
}

.unavailable-price {
    color: #c7c7c7 !important;
}

.unavailable-message {
    margin-top: 5px;
    font-size: 14px;
    color: #c7c7c7;
    text-align: center;
    width: 100%;
    font-style: italic;
}

.service-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 100px;
}

.service-price {
    font-size: 18px;
    font-weight: 600;
    color: #228B22;
    text-align: right;
}

/* Секция опций */
.options-section {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.options-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.option-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    gap: 15px;
}

.option-image {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-details {
    flex: 1;
}

.option-details h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.option-details p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.option-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
}

.option-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 80px;
    margin-right: 15px;
}

.option-price {
    font-size: 16px;
    font-weight: 600;
    color: #228B22;
    text-align: right;
}

.option-actions {
    display: flex;
    align-items: center;
}

/* Итого */
.order-summary {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Кнопки действий внутри блока итого */
.order-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 600;
    color: #228B22;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
}

/* Кнопки действий */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.edit-button, .delete-button, .details-button, .restore-button {
    background: none;
    border: none;
    color: #383a3f;
    font-size: 16px;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 0;
    margin-right: 18px;
    padding: 0;
}

.delete-button {
    color: #c7c7c7;
    margin-right: 0;
    text-decoration: none;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .cart-container {
        padding: 5px;
        margin: 0;
    }

    .module.cart-container {
        margin: 0;
    }
    
    .cart-title {
        font-size: 20px;
        margin-bottom: 10px;
        padding: 0 5px;
    }
    
    .booking-info-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .reservation-wrapper {
        margin: 10px 0;
        border-radius: 12px;
    }
    
    .booking-info-card {
        margin: 0;
        padding: 0;
    }
    
    .property-image {
        width: 100%;
        height: 200px;
    }
    
    .property-price {
        text-align: left;
        margin-top: 15px;
    }
    
    /* Уменьшаем расстояние между кнопками на мобильном */
    .booking-actions {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .edit-button, .delete-button, .details-button, .restore-button {
        margin-right: 8px;
        font-size: 14px;
    }
    
    .delete-button {
        margin-right: 0;
    }
    
    .service-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .service-card {
        margin: 5px 0;
        padding: 10px;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .service-header {
        background: transparent;
        border-bottom: none;
        padding: 0 0 10px 0;
    }
    
    .services-container {
        margin: 5px 0;
        padding: 5px;
        border: none;
        background: transparent;
    }
    
    .service-image {
        width: 100%;
        height: 200px;
    }
    
    .service-quantity {
        margin: 15px 0;
    }
    
    .service-price {
        text-align: left;
        margin-top: 15px;
    }

    .services-title {
        margin: 0 10px;
        font-size: 18px;
    }

    .options-section {
        border-radius: 12px;
    }
    
    .option-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-image {
        width: 100%;
        height: 150px;
    }
    
    .option-quantity,
    .option-price,
    .option-actions {
        margin: 10px 0;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .order-summary {
        margin: 10px 0;
        padding: 15px 10px;
    }
    
    .summary-row {
        margin: 8px 0;
    }
}

/* Стили для модального окна удаления резервирования (точно как на ad_detail_guest.html) */
.cancel-reservation-modal {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cancel-modal-header {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 24px 16px 24px;
}

.cancel-modal-title {
    color: #dc3545;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.cancel-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999999;
    opacity: 1;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.cancel-modal-close:hover {
    color: #666666;
}

.cancel-modal-body {
    background: #ffffff;
    padding: 16px 24px 20px 24px;
}

.cancel-modal-question {
    color: #333333;
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.cancel-modal-hint {
    color: #666666;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.cancel-modal-footer {
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    padding: 16px 24px 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cancel-btn-secondary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cancel-btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #5a6268;
}

.cancel-btn-danger {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cancel-btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    color: #ffffff;
}

/* Блок общей стоимости резервирования с чекбоксом */
.reservation-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    margin-top: 15px;
    margin-bottom: 20px; /* отступ ниже, чтобы отделить от следующего бронирования */
    border-top: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.reservation-checkbox {
    display: flex;
    align-items: center;
}

.reservation-checkbox-input {
    display: none;
}

.reservation-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    user-select: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #228B22;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    background: #fff;
    transition: all 0.2s ease;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox-text {
    font-size: 18px;
    font-weight: 600;
    color: #228B22;
}

.reservation-checkbox-input:checked + .reservation-checkbox-label .checkbox-custom {
    background: #228B22;
}

.reservation-checkbox-input:checked + .reservation-checkbox-label .checkbox-custom::after {
    opacity: 1;
}

.reservation-total-price {
    font-size: 18px;
    font-weight: 700;
    color: #228B22;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .reservation-total-section {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 10px 15px;
        gap: 0;
    }
    
    .reservation-checkbox {
        width: 100%;
    }
    
    /* Мобильные стили для таймера резервирования */
    .reservation-timer {
        font-size: 12px;
        padding: 6px 8px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.3;
        margin: 5px 0;
    }
    
    .reservation-timer i {
        font-size: 14px;
        margin-right: 4px;
    }
    
    .reservation-total-price {
        align-self: flex-end;
        font-size: 16px;
    }
}

/* Стили для модального окна с неактуальными услугами */
.outdated-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.outdated-item-info {
    flex: 1;
    margin-right: 1rem;
}

.outdated-item-info strong {
    display: block;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 16px;
}

.outdated-service-name {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 0.5rem;
}

.outdated-issues {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    color: #dc3545;
    font-size: 14px;
}

.outdated-issues li {
    margin-bottom: 0.25rem;
}

.outdated-item .edit-button {
    white-space: nowrap;
    margin-left: 1rem;
}
