/* 
 * File: src/assets/css/clisyc-frontend-style.css
 * IMPROVED Frontend Styles for Client Sync Appointment Booking
 * Enhanced version with better large screen layout and color-coding
 */

/* --- IMPORTS AND BASE FIXES --- */
.ui-widget-content .ui-icon, .ui-widget-header .ui-icon, .ui-button .ui-icon {
    background-image: none !important;
}
.ui-icon-circle-triangle-e:before { content: "\25B6"; }
.ui-icon-circle-triangle-w:before { content: "\25C0"; }
.ui-datepicker .ui-icon {
    text-indent: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* --- IMPROVED: Date Range Highlighting --- */
.ui-datepicker td.ui-datepicker-range .ui-state-default {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}
.ui-datepicker td.ui-datepicker-range-start .ui-state-default,
.ui-datepicker td.ui-datepicker-current-day.ui-datepicker-range-start a.ui-state-default,
.ui-datepicker td.ui-datepicker-current-day a.ui-state-active {
    background: #3b82f6 !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}
.ui-datepicker td.ui-datepicker-range-end .ui-state-default,
.ui-datepicker td.ui-datepicker-current-day.ui-datepicker-range-end a.ui-state-default {
    background: #3b82f6 !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* --- IMPROVED: List View Rendering --- */
.fc-list-table .fc-event-selected::before,
.fc-list-table .fc-event-selected::after {
    display: none !important;
}
.fc-list-event .fc-list-event-graphic {
    display: none;
}
.fc-list-event-title-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1em;
}
.fc-list-table .fc-event-selected td {
    background-color: #dbeafe !important;
}
.fc-list-event.clisyc-available-slot:hover td {
    background-color: #eff6ff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.fc-list-event.clisyc-booked-event .fc-list-event-title-container,
.fc-list-event.clisyc-unavailable-slot .fc-list-event-title-container {
    font-style: italic;
    color: #6b7280;
}

/* --- NEW: Striped Blocked Slots --- */
.fc-event.clisyc-blocked-slot,
.fc-timegrid-event.clisyc-blocked-slot .fc-event-main {
    background-color: rgba(229, 231, 235, 0.7) !important; /* A light grey, semi-transparent */
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(0, 0, 0, 0.07),
        rgba(0, 0, 0, 0.07) 5px,
        transparent 5px,
        transparent 10px
    ) !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
    cursor: not-allowed;
}

.fc-event.clisyc-blocked-slot .fc-event-time {
    text-decoration: line-through;
}

/* --- IMPROVED: General Form & Message Styling --- */
.clisyc-form-field { 
    margin-bottom: 20px; 
}
.clisyc-form-field label, .clisyc-user-account-form label, .clisyc-registration-form label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600;
    color: #374151;
    font-size: 0.95em;
}
.clisyc-form-field label .required, .clisyc-user-account-form label .required, .clisyc-registration-form label .required { 
    color: #ef4444; 
    font-weight: 600; 
    margin-left: 3px; 
}
.clisyc-form-field input[type="text"], 
.clisyc-form-field input[type="email"], 
.clisyc-form-field input[type="password"], 
.clisyc-form-field textarea, 
.clisyc-form-field select,
.clisyc-user-account-form input[type="text"], 
.clisyc-user-account-form input[type="email"], 
.clisyc-user-account-form textarea, 
.clisyc-user-account-form select,
.clisyc-registration-form input[type="text"], 
.clisyc-registration-form input[type="email"], 
.clisyc-registration-form input[type="password"] { 
    width: 100%; 
    max-width: 500px; 
    padding: 10px 12px; 
    border: 1px solid #d1d5db; 
    border-radius: 6px; 
    box-sizing: border-box;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.clisyc-form-field input:focus,
.clisyc-form-field textarea:focus,
.clisyc-form-field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* --- IMPROVED: Message Banners --- */
.clisyc-registration-message { 
    padding: 14px 16px 14px 48px; 
    margin-bottom: 20px; 
    border: 1px solid transparent; 
    border-radius: 8px; 
    position: relative; 
    line-height: 1.6;
    font-size: 0.95em;
}
.clisyc-registration-message .dashicons { 
    position: absolute; 
    left: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    font-size: 22px; 
}
.clisyc-registration-message p { 
    margin: 0; 
}
.clisyc-error-message { 
    color: #991b1b; 
    background-color: #fee2e2; 
    border-color: #fecaca; 
}
.clisyc-error-message .dashicons { 
    color: #991b1b; 
}
.clisyc-success-message { 
    color: #065f46; 
    background-color: #d1fae5; 
    border-color: #a7f3d0; 
}
.clisyc-success-message .dashicons { 
    color: #065f46; 
}
.clisyc-info-message { 
    color: #075985; 
    background-color: #e0f2fe; 
    border-color: #bae6fd; 
}
.clisyc-info-message .dashicons { 
    color: #075985; 
}

/* --- IMPROVED: Main Booking Container --- */
#clisyc-appointment-calendar-container { 
    margin: 20px auto; 
}

/* --- IMPROVED: Selected Slot Display --- */
#selected_slot_display { 
    font-weight: normal; 
    margin: 20px 0; 
    padding: 16px 20px; 
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #93c5fd; 
    border-radius: 8px; 
    transition: all 0.3s ease; 
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
#selected_slot_display.none { 
    display: none; 
}
#selected_slot_display span { 
    color: #1e40af; 
    font-weight: 700;
    font-size: 1.05em;
}

/* --- IMPROVED: Faceted Search Layout (Main Container) --- */
/* CRITICAL CHANGE: Reduced sidebar width from 320px to 240px for better proportions */
.clisyc-faceted-search-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    margin: 0 auto;
    max-width: 1400px;
}

/* --- IMPROVED: Filters Container (Left Sidebar) --- */
.clisyc-faceted-search-layout .clisyc-availability-filters-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.clisyc-faceted-search-layout .clisyc-availability-filters-container h3 {
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 1.1em;
    color: #111827;
    font-weight: 700;
}

/* --- IMPROVED: Right Side Content Area --- */
.clisyc-faceted-search-layout .clisyc-main-content-area {
    min-width: 0;
}

/* --- IMPROVED: Filter Groups --- */
.clisyc-filter-group-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.clisyc-filter-group {
    margin-bottom: 0;
}

.clisyc-filter-group-label {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- IMPROVED: Radio Button Container (Card Style) --- */
.clisyc-filter-radio-container {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 6px;
}

/* Custom scrollbar for filter container */
.clisyc-filter-radio-container::-webkit-scrollbar {
    width: 6px;
}
.clisyc-filter-radio-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}
.clisyc-filter-radio-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.clisyc-filter-radio-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* --- IMPROVED: Radio Options as Cards with Color Indicators --- */
.clisyc-radio-option {
    display: block;
    margin-bottom: 6px;
}

.clisyc-radio-option label {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    font-weight: 500;
    color: #374151;
    font-size: 0.9em;
}

.clisyc-radio-option label:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.clisyc-radio-option input[type="radio"] {
    margin: 0 10px 0 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #3b82f6;
}

.clisyc-radio-option input[type="radio"]:checked + span,
.clisyc-radio-option input[type="radio"]:checked ~ * {
    color: #1e40af;
}

.clisyc-radio-option:has(input[type="radio"]:checked) label {
    background: #dbeafe;
    border-color: #3b82f6;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

/* NEW: Color dot indicator for filter options */
.clisyc-filter-color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 6px;
    border: 1.5px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Show option count if available */
.clisyc-radio-option-count {
    margin-left: auto;
    padding: 2px 8px;
    background: #e5e7eb;
    border-radius: 12px;
    font-size: 0.8em;
    color: #6b7280;
    font-weight: 600;
}

.clisyc-radio-option:has(input[type="radio"]:checked) .clisyc-radio-option-count {
    background: #bfdbfe;
    color: #1e40af;
}

/* --- IMPROVED: Buttons Container --- */
.clisyc-filter-buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.clisyc-filter-button {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.clisyc-filter-button:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.clisyc-filter-button:active {
    transform: translateY(0);
}

/* Mobile filter toggle button */
#clisyc-mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
}

#clisyc-mobile-filter-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.clisyc-event-label-group {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.clisyc-event-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fc-event-line-1 {
    display: flex;
    align-items: center;
}

/* --- IMPROVED: Button Styling --- */
#schedule_button, .clisyc-submit-button {
    padding: 14px 24px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

#schedule_button:hover:not(:disabled), 
.clisyc-submit-button:hover:not(.clisyc-button-disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#schedule_button:disabled, 
.clisyc-submit-button.clisyc-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clisyc-submit-button.clisyc-button-processing::after {
    content: " .";
    animation: clisyc-dots 1s steps(5, end) infinite;
    display: inline-block;
    vertical-align: bottom;
}

@keyframes clisyc-dots {
    0%, 20% { color: rgba(255, 255, 255, 0); text-shadow: .25em 0 0 rgba(255, 255, 255, 0), .5em 0 0 rgba(255, 255, 255, 0); }
    40% { color: inherit; text-shadow: .25em 0 0 rgba(255, 255, 255, 0), .5em 0 0 rgba(255, 255, 255, 0); }
    60% { text-shadow: .25em 0 0, .5em 0 0 rgba(255, 255, 255, 0); }
    80%, 100% { text-shadow: .25em 0 0, .5em 0 0; }
}

/* --- IMPROVED: Timezone Section --- */
.clisyc-time-selection-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.clisyc-timezone-filter-wrapper,
.clisyc-live-clock-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* FIXED: Improved timezone selector visibility */
.clisyc-timezone-filter-wrapper label {
    font-weight: 600;
    font-size: 0.9em;
    color: #374151;
    margin-bottom: 4px;
}

.clisyc-timezone-filter-wrapper select,
.clisyc-timezone-filter-wrapper .clisyc-custom-dropdown {
    font-size: 0.95em;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clisyc-timezone-filter-wrapper select:hover,
.clisyc-timezone-filter-wrapper .clisyc-custom-dropdown:hover {
    border-color: #3b82f6;
}

.clisyc-timezone-filter-wrapper select:focus,
.clisyc-timezone-filter-wrapper .clisyc-custom-dropdown:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clisyc-live-clock {
    font-size: 1.75em;
    font-weight: 700;
    color: #1f2937;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-variant-numeric: tabular-nums;
}

.clisyc-timezone-note {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.5;
    font-weight: 500;
}

/* --- IMPROVED: Loading States --- */
.clisyc-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: clisyc-spinner-spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes clisyc-spinner-spin {
    to { transform: rotate(360deg); }
}

.clisyc-availability-filters-container {
    position: relative;
    transition: opacity 0.2s ease-in-out;
}

.clisyc-availability-filters-container.clisyc-filters-loading {
    opacity: 0.6;
    pointer-events: none;
}

.clisyc-availability-filters-container.clisyc-filters-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: clisyc-spinner-spin 0.8s linear infinite;
    z-index: 20;
}

/* --- IMPROVED: Calendar Tooltip --- */
.clisyc-calendar-tooltip.ui-tooltip {
    padding: 12px 16px;
    background: #1f2937;
    color: #ffffff;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.9em;
    max-width: 320px;
    z-index: 9999 !important;
}

.clisyc-calendar-tooltip strong {
    color: #ffffff;
    font-weight: 700;
}

/* --- IMPROVED: Validation Errors --- */
#clisyc-client-side-validation-errors {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 8px;
    background: #fee2e2;
    border: 2px solid #fecaca;
}

#clisyc-client-side-validation-errors ul {
    margin: 0;
    padding-left: 24px;
    list-style: disc;
}

#clisyc-client-side-validation-errors li {
    margin-bottom: 6px;
    color: #991b1b;
    font-weight: 500;
}

.clisyc-form-field.clisyc-field-error {
    border-left: 4px solid #ef4444;
    padding-left: 16px;
    background-color: #fee2e2;
    border-radius: 6px;
}

.clisyc-form-field.clisyc-field-error > label {
    color: #dc2626;
}

/* --- IMPROVED: Calendar Container Sizing --- */
/* Make sure calendar takes full available width */
#clisyc-calendar {
    width: 100%;
    min-height: 600px;
}

/* Ensure FullCalendar month view cells are properly sized */
.fc-daygrid-day {
    min-height: 100px;
}

/* Better month view spacing */
.fc-dayGridMonth-view .fc-daygrid-day-frame {
    min-height: 100px;
}

/* --- IMPROVED: Responsive Design --- */
@media (max-width: 1024px) {
    .clisyc-faceted-search-layout {
        grid-template-columns: 1fr;
    }
    
    .clisyc-faceted-search-layout .clisyc-availability-filters-container {
        position: relative;
        top: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .clisyc-faceted-search-layout {
        gap: 20px;
    }
    
    .clisyc-faceted-search-layout .clisyc-availability-filters-container {
        padding: 20px;
    }
    
    .clisyc-time-selection-wrapper {
        grid-template-columns: 1fr;
    }
    
    .clisyc-live-clock {
        font-size: 1.5em;
    }
    
    #schedule_button, .clisyc-submit-button {
        width: 100%;
        padding: 16px 24px;
    }
    
    #clisyc-mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* --- IMPROVED: Step Headers (Numbered Sections) --- */
.clisyc-step-header {
    font-size: 1.35em;
    font-weight: 700;
    color: #111827;
    margin: 32px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.clisyc-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85em;
}

/* --- Section Cards --- */
.clisyc-section-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.clisyc-section-card h3 {
    margin-top: 0;
}

/* --- Empty State --- */
.clisyc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.clisyc-empty-state-icon {
    font-size: 4em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.clisyc-empty-state-message {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.clisyc-empty-state-description {
    font-size: 0.95em;
    line-height: 1.6;
}

/* --- ACCESSIBILITY IMPROVEMENTS --- */
.clisyc-radio-option input[type="radio"]:focus + span,
.clisyc-radio-option input[type="radio"]:focus ~ * {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.clisyc-radio-option label:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* --- ANIMATION FOR SMOOTH TRANSITIONS --- */
@media (prefers-reduced-motion: no-preference) {
    .fc-event,
    .clisyc-radio-option label,
    #schedule_button,
    .clisyc-submit-button {
        transition: all 0.2s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- NEW: Event Duration Display --- */
.fc-event-main-frame {
    position: relative; /* This is crucial for positioning the child element */
    height: 100%;
}

.clisyc-event-duration {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.8em;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 1px 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: #4b5563; /* A neutral dark grey for readability */
}

/* On selected events, make the duration text white */
.fc-event-selected .clisyc-event-duration {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.clisyc-event-duration .dashicons {
    font-size: 12px;
    line-height: 1;
    height: 12px;
    width: 12px;
}

/* ============================================================================
   FIX FOR FULLCALENDAR EVENT COLORS
   Replaces hardcoded colors with CSS variables from Calendar Event Styling settings
   ============================================================================ */

/* --- Available Slots: Use configured purple color --- */
.clisyc-booking-form-app .fc-event.clisyc-available-slot {
    cursor: pointer;
    background-color: var(--clisyc-available-bg, #3b82f6) !important;
    color: var(--clisyc-available-text, #ffffff) !important;
    border-color: var(--clisyc-available-bg, #2563eb) !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) !important;
}

/* Hover state for available slots */
.clisyc-booking-form-app .fc-event.clisyc-available-slot:hover {
    filter: brightness(0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Selected state for available slots */
.clisyc-booking-form-app .fc-event.clisyc-available-slot.fc-event-selected {
    filter: brightness(1.1);
    box-shadow: 0 0 0 2px var(--clisyc-available-bg, #2563eb), 
                0 4px 8px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid var(--clisyc-available-text, #ffffff) !important;
}

/* --- Booked Events: Use configured booked color --- */
.clisyc-booking-form-app .fc-event.clisyc-booked-event {
    background-color: var(--clisyc-booked-bg, #fee2e2) !important;
    color: var(--clisyc-booked-text, #991b1b) !important;
    border-color: var(--clisyc-booked-bg, #fca5a5) !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* --- Unavailable Slots: Use configured unavailable color --- */
.clisyc-booking-form-app .fc-event.clisyc-unavailable-slot {
    background-color: var(--clisyc-unavailable-bg, #f3f4f6) !important;
    color: var(--clisyc-unavailable-text, #6b7280) !important;
    border-color: var(--clisyc-unavailable-bg, #e5e7eb) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- List View Fixes --- */
.clisyc-booking-form-app .fc-list-event.clisyc-available-slot:hover td {
    background-color: var(--clisyc-available-bg, #eff6ff) !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clisyc-booking-form-app .fc-list-table .fc-event-selected td {
    background-color: var(--clisyc-available-bg, #dbeafe) !important;
}

/* --- Ensure text and details are visible --- */
.clisyc-booking-form-app .fc-event.clisyc-available-slot .fc-event-time,
.clisyc-booking-form-app .fc-event.clisyc-available-slot .clisyc-event-details-compact,
.clisyc-booking-form-app .fc-event.clisyc-available-slot .clisyc-event-detail-label,
.clisyc-booking-form-app .fc-event.clisyc-available-slot .clisyc-event-more-count {
    color: inherit;
}

/* --- Legend Styling --- */
.clisyc-booking-form-app .clisyc-legend-item.clisyc-legend-available {
    background-color: var(--clisyc-available-bg, #3b82f6);
    color: var(--clisyc-available-text, #ffffff);
}

.clisyc-booking-form-app .clisyc-legend-item.clisyc-legend-booked {
    background-color: var(--clisyc-booked-bg, #fee2e2);
    color: var(--clisyc-booked-text, #991b1b);
}

.clisyc-booking-form-app .clisyc-legend-item.clisyc-legend-unavailable {
    background-color: var(--clisyc-unavailable-bg, #f3f4f6);
    color: var(--clisyc-unavailable-text, #6b7280);
}

/* --- User Appointment List Improvements --- */
#clisyc-user-appointments-dashboard {
    max-width: 100%;
}

.clisyc-appointment-list-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 1.5em;
    padding: 1em;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.clisyc-filter-group label {
    font-weight: 600;
    margin-right: 8px;
}

.clisyc-table-container {
    position: relative;
    overflow-x: auto;
}

.clisyc-appointment-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.clisyc-appointment-actions a {
    display: inline-block;
    color: #50575e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.clisyc-appointment-actions a:hover {
    color: #007cba;
}

.clisyc-appointment-actions .clisyc-action-cancel:hover {
    color: #d63638;
}

.clisyc-appointment-actions .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* --- User Appointment List Improvements v2 --- */
#clisyc-user-appointments-dashboard {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-top: 2em;
}

.clisyc-appointment-list-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid #e5e7eb;
}

.clisyc-filter-group label {
    font-weight: 600;
    margin-right: 8px;
}

.clisyc-table-container {
    position: relative;
    overflow-x: auto;
}

.clisyc-appointment-list-table {
    width: 100%;
    border-collapse: collapse; /* Ensures borders are single lines */
}

/* Header Styling */
.clisyc-appointment-list-table thead th {
    background-color: #f9fafb;
    font-weight: 600;
    text-align: left;
    color: #374151;
    font-size: 13px;
    border-bottom: 2px solid #e5e7eb; /* Thicker line for header */
    padding: 12px 24px; /* Vertical | Horizontal */
}

/* Body Cell Styling - This is the key change for spacing */
.clisyc-appointment-list-table tbody td {
    padding: 16px 24px; /* More vertical padding for breathing room, more horizontal for column separation */
    border-bottom: 1px solid #f0f0f1; /* Thin line between rows */
    vertical-align: middle;
}

/* Striped Rows */
.clisyc-appointment-list-table.striped tbody tr:nth-child(odd) {
    background-color: #f9fafb;
}

/* Action Buttons */
.clisyc-appointment-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.clisyc-appointment-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.clisyc-appointment-actions a:hover {
    background-color: #f0f0f1;
    color: #007cba;
}

.clisyc-appointment-actions a.clisyc-action-cancel:hover {
    color: #d63638;
}

.clisyc-appointment-actions .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* --- Mini Calendar Widget Styles --- */
.clisyc-mini-calendar-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    max-width: 320px; /* Constrain width like a widget */
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Adjust FullCalendar Toolbar for Mini */
#clisyc-user-mini-calendar .fc-toolbar {
    margin-bottom: 10px !important;
    font-size: 0.8em; /* Smaller title */
}
#clisyc-user-mini-calendar .fc-toolbar-title {
    font-size: 1.1em;
}
#clisyc-user-mini-calendar .fc-button {
    padding: 2px 6px;
    font-size: 0.85em;
}

/* Adjust Day Cells */
#clisyc-user-mini-calendar .fc-daygrid-day-frame {
    min-height: 30px; /* Squash cells vertically */
    cursor: pointer;
}
#clisyc-user-mini-calendar .fc-daygrid-day-top {
    justify-content: center; /* Center date numbers */
    font-size: 0.9em;
}

/* Selection Highlight */
#clisyc-user-mini-calendar .clisyc-day-selected {
    background-color: #eff6ff !important;
}
#clisyc-user-mini-calendar .clisyc-day-selected .fc-daygrid-day-number {
    color: #3b82f6;
    font-weight: bold;
}

/* Event Dots (using List Item View trick) */
#clisyc-user-mini-calendar .fc-daygrid-event-harness {
    /* Center the dot */
    display: flex;
    justify-content: center;
    margin-top: -4px; /* Pull up closer to date */
}
#clisyc-user-mini-calendar .fc-event-title,
#clisyc-user-mini-calendar .fc-event-time {
    display: none; /* Hide text */
}
#clisyc-user-mini-calendar .fc-daygrid-dot-event {
    background: none;
    border: none;
    padding: 0;
}
#clisyc-user-mini-calendar .fc-daygrid-event-dot {
    border-width: 3px; /* Make dots slightly larger */
    border-color: #3b82f6; /* Use brand color */
}

/* --- Mini Details List (Below Calendar) --- */
#clisyc-mini-calendar-details {
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding-top: 10px;
    min-height: 50px;
}
#clisyc-mini-calendar-details h4 {
    margin: 0 0 8px 0;
    font-size: 0.95em;
    color: #374151;
}
.clisyc-mini-hint, .clisyc-mini-empty {
    font-size: 0.85em;
    color: #6b7280;
    font-style: italic;
    text-align: center;
}
.clisyc-mini-event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.clisyc-mini-event-list li {
    margin-bottom: 6px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 6px;
}
.clisyc-mini-event-list li:last-child {
    border-bottom: none;
}
.clisyc-mini-event-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    line-height: 1.3;
}
.clisyc-mini-time {
    color: #6b7280;
    font-size: 0.85em;
    font-weight: 500;
}
.clisyc-mini-title {
    color: #3b82f6;
    font-weight: 600;
}