/* --- WHBS Booking System - v4.3 (UI Fix) --- */

/* Wrapper to scope all styles */
.whbs-shortcode-wrapper h2, .whbs-shortcode-wrapper h4, .whbs-shortcode-wrapper p, .whbs-shortcode-wrapper div,
.whbs-shortcode-wrapper button, .whbs-shortcode-wrapper select, .whbs-shortcode-wrapper input {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    box-sizing: border-box;
}

/* --- Trigger Button --- */
.whbs-button-container { text-align: left; margin: 20px 0; }
.whbs-schedule-button { display: inline-flex; align-items: center; gap: 10px; background-color: transparent; color: var(--whbs-accent, #3b82f6); padding: 0; font-weight: 600; font-size: 16px; border: none; text-decoration: none; transition: color 0.3s ease; }
.whbs-schedule-button:hover { color: #334155; }

/* --- Modal Styles --- */
.whbs-modal { display: none; position: fixed; z-index: 100000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; }
.whbs-modal.is-visible { display: flex; }
.whbs-modal-content { position: relative; margin: auto; border: none; max-width: 900px; width: 95%; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); animation: fadeIn 0.3s; }

/* --- THIS IS THE FIX for the Close Button --- */
.whbs-modal-close {
    position: absolute;
    top: 15px; /* Position from the top of the white content box */
    right: 111px; /* Position from the right of the white content box */
    color: #FFFFFF;
    background-color: #1e293b;
    border: none;
    border-radius: 27%;
    width: 40px;
    height: 40px;
    font-size: 15px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}
.whbs-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
    transform: rotate(90deg);
}
/* --- End of Fix --- */


/* --- Booking Form Layout --- */
.booking-container { display: flex; max-width: 800px; min-height: 550px; border-radius: 8px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); overflow: hidden; margin: 0; width: 100%; }
.booking-sidebar { background-color: var(--whbs-left-bg); color: #f8fafc; padding: 32px 24px; width: 280px; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar-steps { list-style: none; padding: 0; margin: 0 0 40px 0; }
.step-item { display: flex; align-items: center; padding: 12px; border-radius: 8px; margin-bottom: 8px; transition: all 0.3s; opacity: 0.6; }
.step-item.active { background-color: rgba(255,255,255,0.1); opacity: 1; }
.step-item-icon { width: 40px; height: 40px; border: 1px solid #475569; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 16px; transition: all 0.3s; }
.step-item.completed .step-item-icon { background-color: #22c55e; border-color: #22c55e; color: white; }
.step-item-info h4 { font-size: 1.4rem; font-weight: 600 !important; margin: 0 0 2px 0; color: #f8fafc; }
.step-item-info p { font-size: 1.4rem !important;; margin: 0; color: #FFFFFF; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #334155; padding-top: 24px; }
.sidebar-footer p { font-size: 1.4rem; margin: 8px 0; color: #FFFFFF; }

.booking-content { background-color: #f8fafc; padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.content-wrapper { background-color: #ffffff; border-radius: 8px; padding: 32px 40px; box-shadow: none; display: flex; flex-direction: column; flex-grow: 1; }
.content-header { margin-bottom: 24px; display: flex; align-items: center; gap: 16px; }
.content-header h2 { font-size: 2rem; font-weight: 600; margin: 0; }
.content-body { flex-grow: 1; }
.content-footer { display: flex; justify-content: flex-end; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.btn-continue { background-color: var(--whbs-accent); color: white; padding: 5px 15px; border: none; border-radius: 8px; font-size: 1.4rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-continue:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.2); transform: translateY(-2px); }
.btn-continue:disabled { background-color: #94a3b8; cursor: not-allowed; }
.btn-back { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 1.2rem; }

/* Form styles */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 1.4rem; font-weight: 500; margin-bottom: 6px; }
.form-group label.required::after { content: ' *'; color: #ef4444; }
.form-group input, .form-group select { width: 100%; padding: 4px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 1.4rem; font-weight: 600; }
.error-message { color: #ef4444; font-size: 0.8rem; margin-top: 4px; }

/* Calendar styles */
.calendar-container { max-width: 350px; margin: 0 auto 24px auto; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 5px;  BACKGROUND-COLOR: #f1f5f9; color: #000; }
.calendar-header button { background:  #f1f5f9; border: 1px solid #d0d3d5; cursor: pointer; border-radius: 0%; width: 40px; height: 40px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day-name { text-align: center; font-size: 0.8em; font-weight: 600; color: #434344; }
.date-cell { padding: 0px; text-align: center; border-radius: 8px; cursor: pointer; transition: all 0.2s; border: 1px solid #ababab75; }
.date-cell.other-month { visibility: hidden; }
.date-cell:not(.disabled):not(.selected):hover { background-color: #eff6ff; }
.date-cell.selected { background-color: var(--whbs-accent); color: white; font-weight: bold; }
.date-cell.disabled, .date-cell.booked { background-color: #f1f5f9; color: #cbd5e1; cursor: not-allowed; }

/* Time slots styles */
.time-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.time-slot { padding: 4px; text-align: center; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.time-slot:hover { border-color: var(--whbs-accent); }
.time-slot.selected { background-color: var(--whbs-accent); color: white; border-color: var(--whbs-accent); }

/* Confirmation screen styles */
.confirmation-screen { text-align: center; padding-top: 40px; }
.confirmation-details { text-align: left; max-width: 400px; margin: 0 auto 32px auto; padding: 20px; background-color: #f1f5f9; border-radius: 8px; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.detail-row:last-child { border-bottom: none; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 920px) {
    .booking-container { flex-direction: column; min-height: 0; height: auto; }
    .booking-sidebar { width: 100%; flex-direction: row; align-items: center; padding: 16px; }
    .sidebar-steps { display: flex; gap: 15px; margin: 0; width: 100%; justify-content: space-around; }
    .step-item { flex-direction: column; text-align: center; padding: 8px; background: none !important; }
    .step-item-info, .sidebar-footer { display: none; }
    .booking-content, .content-wrapper { padding: 24px 16px; }
}
@media (max-width: 480px) {
    .whbs-modal-content { width: 100%; height: 100%; max-height: 100vh; border-radius: 0;}
    .booking-container { height: 100%; border-radius: 0; }
    .whbs-modal-close { top: 10px; right: 10px; color: #333; background-color: #fff; }
}