/* ============================================
   BOOKING FORM STYLES
   ============================================ */

/* Nút Đặt Tour */
.dtb-book-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b35 0%, #f7c948 100%);
    color: #fff;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.dtb-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

/* Modal Overlay */
.dtb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

/* Modal Content */
.dtb-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: dtb-slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes dtb-slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button */
.dtb-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    z-index: 10;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
}

.dtb-modal-close:hover {
    color: #333;
}

/* Modal Header */
.dtb-modal-header {
    background: #fff;
    color: #2B2D42;
    padding: 22px 30px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e8e8e8;
}

.dtb-modal-header h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.dtb-tour-summary h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 400;
    color: #5C6378;
}

.dtb-tour-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #888;
}

.dtb-tour-meta strong {
    color: #2B2D42;
}

/* Form */
.dtb-form {
    padding: 25px 30px 30px;
}

.dtb-fieldset {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    margin: 0 0 20px;
}

.dtb-fieldset legend {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    padding: 0 10px;
}

.dtb-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.dtb-col-4 { flex: 0 0 calc(33.333% - 10px); }
.dtb-col-6 { flex: 0 0 calc(50% - 7.5px); }
.dtb-col-12 { flex: 0 0 100%; }

.dtb-form-group {
    margin-bottom: 10px;
}

.dtb-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    color: #444;
}

.dtb-form-group label small {
    font-weight: 400;
    color: #888;
}

.dtb-form-group .required {
    color: #DD0303;
}

.dtb-form-group input[type="text"],
.dtb-form-group input[type="email"],
.dtb-form-group input[type="tel"],
.dtb-form-group select,
.dtb-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dtb-form-group input:focus,
.dtb-form-group select:focus,
.dtb-form-group textarea:focus {
    border-color: #DD0303;
    outline: none;
    box-shadow: 0 0 0 3px rgba(221, 3, 3, 0.1);
}

/* Quantity buttons */
.dtb-quantity {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.dtb-qty-btn {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 38px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtb-qty-btn:hover {
    background: #e0e0e0;
}

.dtb-quantity input[type="number"] {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 0;
    -moz-appearance: textfield;
}

.dtb-quantity input[type="number"]::-webkit-inner-spin-button,
.dtb-quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.dtb-price-label {
    display: block;
    font-size: 12px;
    color: #DD0303;
    margin-top: 4px;
    font-weight: 600;
}

/* Total Section */
.dtb-total-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

.dtb-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.dtb-grand-total {
    border-top: 2px solid #DD0303;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    color: #333;
}

.dtb-grand-total strong {
    color: #DD0303;
}

/* Submit Button */
.dtb-submit-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #FAB12F, #FEF3E2);
    color: #2B2D42;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dtb-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(250,177,47,0.45);
    background: linear-gradient(135deg, #FA812F, #FAB12F);
}

.dtb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.dtb-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.dtb-message-success {
    background: #FEF3E2;
    color: #2B2D42;
    border: 1px solid #FAB12F;
}

.dtb-message-error {
    background: #FEECD2;
    color: #B50202;
    border: 1px solid #FDDCB5;
}

/* Responsive */
@media (max-width: 768px) {
    .dtb-modal-content {
        max-height: 95vh;
        border-radius: 8px;
    }

    .dtb-form {
        padding: 15px 20px 20px;
    }

    .dtb-form-row {
        flex-direction: column;
        gap: 0;
    }

    .dtb-col-4,
    .dtb-col-6 {
        flex: 0 0 100%;
    }

    .dtb-tour-meta {
        flex-direction: column;
        gap: 5px;
    }

    .dtb-guests-row {
        flex-direction: column !important;
    }
}

/* ============================================
   CALENDAR PICKER — Dual Month Compact
   ============================================ */
.dtb-calendar-picker {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    user-select: none;
    position: relative;
}

/* Nav arrows — absolute positioned */
.dtb-cal-nav {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 2;
    pointer-events: none;
}

.dtb-cal-prev,
.dtb-cal-next {
    background: #fff;
    border: 1px solid #ddd;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s;
    pointer-events: auto;
}

.dtb-cal-prev:hover,
.dtb-cal-next:hover {
    background: #E06A1A;
    border-color: #E06A1A;
    color: #fff;
}

.dtb-cal-prev:disabled,
.dtb-cal-next:disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Two-month grid */
.dtb-cal-months {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.dtb-cal-month {
    padding: 8px 10px 6px;
}

.dtb-cal-month:first-child {
    border-right: 1px solid #f0f0f0;
}

.dtb-cal-month-title {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #2B2D42;
    padding: 4px 0 6px;
}

.dtb-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 0 0 3px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 3px;
}

.dtb-cal-weekdays span {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
}

.dtb-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dtb-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    cursor: default;
    position: relative;
    transition: all 0.15s;
    border: 1.5px solid transparent;
}

.dtb-cal-day.dtb-day-empty {
    visibility: hidden;
}

.dtb-cal-day.dtb-day-past,
.dtb-cal-day.dtb-day-disabled {
    color: #ccc;
}

.dtb-cal-day.dtb-day-available {
    cursor: pointer;
    color: #2B2D42;
    background: #e8f8ef;
}

.dtb-cal-day.dtb-day-available:hover {
    background: #c8f0d8;
    border-color: #E06A1A;
}

.dtb-cal-day.dtb-day-almost {
    cursor: pointer;
    color: #2B2D42;
    background: #fff3e0;
}

.dtb-cal-day.dtb-day-almost:hover {
    background: #ffe0b2;
    border-color: #FA812F;
}

.dtb-cal-day.dtb-day-full {
    color: #bbb;
    background: #f5f5f5;
    text-decoration: line-through;
}

.dtb-cal-day.dtb-day-selected {
    background: #E06A1A !important;
    color: #fff !important;
    border-color: #B50202 !important;
    font-weight: 700;
    text-decoration: none !important;
}

.dtb-cal-day .dtb-day-num {
    font-weight: 500;
    line-height: 1;
}

.dtb-cal-day .dtb-day-slots {
    font-size: 7px;
    margin-top: 1px;
    line-height: 1;
    white-space: nowrap;
}

.dtb-cal-day.dtb-day-available .dtb-day-slots {
    color: #27ae60;
}

.dtb-cal-day.dtb-day-almost .dtb-day-slots {
    color: #e67e22;
    font-weight: 600;
}

.dtb-cal-day.dtb-day-selected .dtb-day-slots {
    color: rgba(255,255,255,0.85);
}

/* Legend */
.dtb-cal-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 6px 10px 8px;
    border-top: 1px solid #f0f0f0;
}

.dtb-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #888;
}

.dtb-cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

.dtb-dot-available { background: #e8f8ef; border: 1px solid #27ae60; }
.dtb-dot-almost { background: #fff3e0; border: 1px solid #e67e22; }
.dtb-dot-full { background: #f5f5f5; border: 1px solid #ccc; }

/* Selected date display */
.dtb-selected-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-top: 6px;
    background: #FEF3E2;
    border: 1px solid #E06A1A;
    border-radius: 8px;
    color: #2B2D42;
}

.dtb-selected-date-text {
    font-size: 13px;
    font-weight: 600;
}

.dtb-selected-date-clear {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.dtb-selected-date-clear:hover {
    color: #DD0303;
}

/* Departure type badge */
.dtb-departure-type-badge {
    display: inline-block;
    background: #FEF3E2;
    color: #DD0303;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Recurring badge on tour cards */
.dtb-info-recurring {
    color: #DD0303;
    font-weight: 500;
}

/* Mobile: stack months vertically */
@media (max-width: 480px) {
    .dtb-cal-months {
        grid-template-columns: 1fr;
    }

    .dtb-cal-month:first-child {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .dtb-cal-day {
        font-size: 11px;
    }

    .dtb-cal-day .dtb-day-slots {
        font-size: 7px;
    }

    .dtb-cal-legend {
        gap: 8px;
    }

    .dtb-cal-legend-item {
        font-size: 9px;
    }
}

/* ============================================
   PREVIEW CONFIRMATION PANEL
   ============================================ */
.dtb-preview-panel {
    padding: 0;
}

.dtb-preview-header {
    background: #fff;
    color: #2B2D42;
    padding: 22px 30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
}

.dtb-preview-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
    font-weight: 700;
}

.dtb-preview-header p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.dtb-preview-body {
    padding: 20px 25px;
}

.dtb-preview-section {
    margin-bottom: 20px;
}

.dtb-preview-section h4 {
    font-size: 15px;
    font-weight: 700;
    color: #2B2D42;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.dtb-preview-table {
    width: 100%;
    border-collapse: collapse;
}

.dtb-preview-table td {
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.dtb-preview-table td:first-child {
    color: #777;
    width: 40%;
    font-weight: 500;
}

.dtb-preview-table td:last-child {
    color: #2B2D42;
}

.dtb-pv-highlight {
    color: #DD0303 !important;
    font-weight: 700 !important;
}

.dtb-pv-total-row {
    background: #FEF3E2;
}

.dtb-pv-total-row td {
    border-bottom: none;
    padding: 12px;
}

.dtb-pv-total {
    color: #DD0303 !important;
    font-size: 18px !important;
}

.dtb-pv-notes {
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    color: #555;
    margin: 0;
    white-space: pre-wrap;
}

.dtb-preview-actions {
    display: flex;
    gap: 12px;
    padding: 0 25px 20px;
}

.dtb-preview-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #FAB12F, #FEF3E2);
    color: #2B2D42;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dtb-preview-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #FA812F, #FAB12F);
    box-shadow: 0 4px 15px rgba(250, 177, 47, 0.45);
}

.dtb-back-btn {
    flex: 0 0 auto;
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dtb-back-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.dtb-confirm-btn {
    flex: 1;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dtb-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.dtb-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#dtb-preview-message {
    padding: 0 25px 15px;
}

@media (max-width: 768px) {
    .dtb-preview-body {
        padding: 15px 18px;
    }

    .dtb-preview-actions {
        flex-direction: column;
        padding: 0 18px 15px;
    }

    .dtb-preview-table td:first-child {
        width: 35%;
    }

    .dtb-preview-header {
        padding: 20px;
    }
}
