/**
 * Beauty Swap - BOOKING MODAL REDESIGN
 * Add this to the END of swap-board.css
 * 
 * PROFESSIONAL BOOKING MODAL STYLING
 */

/* ===========================
   MODAL CONTAINER - FIXED
   =========================== */

.bs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bs-modal.active {
    display: flex !important;
}

.bs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
    backdrop-filter: blur(4px);
}

/* MODAL CONTENT - PERFECT SIZE */
.bs-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===========================
   MODAL HEADER - BEAUTIFUL
   =========================== */

.bs-modal-header {
    background: linear-gradient(135deg, #DE2049, #FF6B9D);
    color: white;
    padding: 35px 40px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.bs-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: white;
}

.bs-modal-header p {
    font-size: 15px;
    margin: 0;
    opacity: 0.95;
}

/* CLOSE BUTTON - TOP RIGHT */
.bs-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 3;
}

.bs-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ===========================
   MODAL BODY - CLEAN SPACING
   =========================== */

#bs-modal-body {
    padding: 0;
}

/* POINTS DISPLAY - CENTERED CARD */
.bs-modal-points-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    margin: 30px 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.points-label {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.points-amount {
    display: block;
    font-size: 48px;
    font-weight: 900;
    margin: 10px 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* BALANCE DISPLAY - INFO BOX */
.bs-points-balance {
    background: #f8f9fa;
    padding: 20px;
    margin: 0 40px 25px 40px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.bs-points-balance p {
    margin: 8px 0;
    font-size: 15px;
    color: #495057;
}

.balance-after {
    color: #28a745 !important;
    font-weight: 700;
    font-size: 18px;
}

/* ===========================
   BOOKING SECTION - HIGHLIGHTED
   =========================== */

#bs-booking-fields-container {
    margin: 0 40px 25px 40px;
}

.bs-booking-section,
.bs-booking-fields-section {
    background: #f0f8ff;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #2196F3;
    margin-bottom: 25px;
}

.bs-booking-section h4,
.bs-booking-fields-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1976D2;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e3f2fd;
}

/* SERVICE DURATION BADGE */
.bs-booking-section > div:first-of-type,
.bs-booking-fields-section > div:first-of-type {
    background: #e8f5e9;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #4CAF50;
}

/* DATE/TIME INPUTS - MODERN */
.bs-booking-section input[type="date"],
.bs-booking-section select,
.bs-booking-fields-section input[type="date"],
.bs-booking-fields-section select,
#booking_date,
#booking_time {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: #333 !important;
    background: white !important;
    transition: all 0.3s !important;
    margin-bottom: 15px !important;
}

.bs-booking-section input[type="date"]:focus,
.bs-booking-section select:focus,
.bs-booking-fields-section input[type="date"]:focus,
.bs-booking-fields-section select:focus,
#booking_date:focus,
#booking_time:focus {
    outline: none !important;
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1) !important;
}

.bs-booking-section label,
.bs-booking-fields-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

/* INFO NOTE - YELLOW */
.bs-booking-section > div:last-of-type,
.bs-booking-fields-section > div:last-of-type {
    background: #fff3cd;
    padding: 12px 15px;
    border-radius: 10px;
    border-left: 4px solid #FFA500;
}

/* ===========================
   MESSAGE TEXTAREA - CLEAN
   =========================== */

.bs-modal-form {
    padding: 0 40px;
    margin-bottom: 25px;
}

.bs-form-group {
    margin-bottom: 0;
}

.bs-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
}

.bs-form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s;
}

.bs-form-group textarea:focus {
    outline: none;
    border-color: #DE2049;
    box-shadow: 0 0 0 4px rgba(222, 32, 73, 0.1);
}

/* ===========================
   TERMS SECTION - IMPORTANT
   =========================== */

.bs-terms-section {
    margin: 0 40px 25px 40px;
    padding: 18px;
    background: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.bs-terms-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.bs-terms-label input[type="checkbox"] {
    margin: 4px 12px 0 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #DE2049;
}

.bs-terms-label span {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.bs-terms-label a {
    color: #DE2049;
    text-decoration: underline;
    font-weight: 600;
}

.bs-terms-note {
    margin: 10px 0 0 32px;
    font-size: 12px;
    color: #856404;
    font-style: italic;
}

.bs-terms-section.bs-terms-error {
    background: #ffebee;
    border-color: #DE2049;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===========================
   INFO TEXT - CENTERED
   =========================== */

#bs-modal-body > p {
    padding: 0 40px;
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.8;
}

/* ===========================
   STATUS MESSAGES
   =========================== */

#bs-modal-status {
    padding: 0 40px;
    margin-bottom: 25px;
}

.bs-modal-success {
    background: #d4edda;
    color: #155724;
    padding: 18px;
    border-radius: 12px;
    border-left: 4px solid #28a745;
    font-size: 15px;
}

.bs-modal-error {
    background: #f8d7da;
    color: #721c24;
    padding: 18px;
    border-radius: 12px;
    border-left: 4px solid #dc3545;
    font-size: 15px;
}

/* ===========================
   BUTTONS - PROFESSIONAL
   =========================== */

.bs-modal-buttons {
    display: flex;
    gap: 15px;
    padding: 0 40px 40px 40px;
}

.bs-btn-primary {
    flex: 1;
    padding: 16px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #DE2049, #FF6B9D);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(222, 32, 73, 0.3);
}

.bs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 32, 73, 0.4);
}

.bs-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bs-btn-secondary {
    flex: 1;
    padding: 16px 30px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #666;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.bs-btn-secondary:hover {
    border-color: #DE2049;
    color: #DE2049;
    background: #fff5f7;
}

/* ===========================
   INSUFFICIENT POINTS - SPECIAL
   =========================== */

.bs-modal-insufficient {
    background: #fff3cd;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #ffc107;
    margin: 30px 40px;
    text-align: center;
    font-size: 16px;
    line-height: 2;
}

.bs-modal-insufficient strong {
    color: #856404;
    font-weight: 700;
}

/* ===========================
   MOBILE RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .bs-modal {
        padding: 10px;
    }
    
    .bs-modal-content {
        max-height: 95vh;
    }
    
    .bs-modal-header {
        padding: 25px 20px;
    }
    
    .bs-modal-header h2 {
        font-size: 22px;
    }
    
    .bs-modal-points-display,
    .bs-points-balance,
    #bs-booking-fields-container,
    .bs-modal-form,
    .bs-terms-section,
    #bs-modal-status {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    #bs-modal-body > p {
        padding: 0 20px;
    }
    
    .bs-modal-buttons {
        flex-direction: column;
        padding: 0 20px 25px 20px;
    }
    
    .points-amount {
        font-size: 36px;
    }
    
    .bs-booking-section,
    .bs-booking-fields-section {
        padding: 20px;
    }
}

/* ===========================
   SMOOTH SCROLLBAR
   =========================== */

.bs-modal-content::-webkit-scrollbar {
    width: 8px;
}

.bs-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.bs-modal-content::-webkit-scrollbar-thumb {
    background: #DE2049;
    border-radius: 10px;
}

.bs-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a01535;
}