/* --- Modern Dark Premium Theme --- */
:root {
    /* Default Dark Mode Variables */
    --bg-dark: #1f2937;
    --bg-card: #374151;
    --bg-input: #4b5563;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #d97706;
    /* Fallback */
    --border: #4b5563;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Variables map for PHP injection override if needed */
    --wp-booking-primary: var(--primary);
    --primary-shadow: rgba(217, 119, 6, 0.4);
    /* Matching #d97706 */
}

[data-theme="light"] {
    --bg-dark: #f3f4f6;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;

    /* Slightly Adjust Primary for Light Mode if needed */
    --primary: #d97706;
}

/* Wrapper */
#wp-booking-dashboard {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    /* Base color */
}

/* Force Header Colors */
#wp-booking-dashboard h1,
#wp-booking-dashboard h2,
#wp-booking-dashboard h3,
#wp-booking-dashboard h4 {
    color: var(--text-main) !important;
}

/* Reset */
.booking-wizard-wrapper *,
#wp-booking-dashboard * {
    box-sizing: border-box;
}

.booking-wizard-wrapper,
#wp-booking-dashboard {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
}

#wp-booking-dashboard {
    padding: 0;
    /* User Request: No spacing around the widget */
    background: transparent;
    /* User Request: No background color behind the widget */
    /* Dashboard container background */
    min-height: auto;
}

.wizard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    max-width: 1100px;
    width: 100%;
    min-height: 650px;
    color: var(--text-main);
}

/* Header */
.calendar-header {
    display: flex;
    justify-content: center;
    /* Center arrows and text together */
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-header h3 {
    margin: 0 !important;
    /* Remove spacing inside the header row */
    width: auto !important;
    /* Allow it to shrink to text width */
    font-size: 18px;
    font-weight: 600;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    /* Safety for mobile */
    gap: 20px;
}

.booking-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.booking-grid {
    display: flex;
    /* Flex is easier for centering varying amounts of cards */
    flex-wrap: wrap;
    justify-content: flex-start;
    /* Desktop: Left aligned */
    gap: 20px;
    width: 100%;
}

.booking-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 16px;
    /* Modern roundness */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Light shadow */
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
    /* Limit width */
    text-align: left;
    /* Keep text readable */
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.booking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.booking-card h3 {
    margin-top: 0;
    font-size: 18px;
    color: var(--wp-booking-primary);
    margin-bottom: 10px;
}

.booking-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 5px 0;
}

.button {
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.button:hover {
    background: var(--border);
}

.button-primary {
    background: var(--wp-booking-primary) !important;
    color: white !important;
    border: none !important;
}

.button-primary:hover {
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 500px;
    /* Clean form width */
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

#wp-booking-wizard {
    font-family: 'Inter', sans-serif;
    max-width: 1000px;
    margin: 40px auto;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    color: var(--text-main);
    /* Force Interitance */
}

#wp-booking-wizard h1,
#wp-booking-wizard h2,
#wp-booking-wizard h3,
#wp-booking-wizard h4,
#wp-booking-wizard p,
#wp-booking-wizard span,
#wp-booking-wizard div {
    color: var(--text-main);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text-main);
    font-size: 24px;
}

/* Modal Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 15px;
    box-sizing: border-box;
    /* Crucial for full width */
}

.wp-booking-toast {
    background: #ffffff;
    color: #333333;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    border-left: 4px solid #333;
    /* Fallback border */
    animation: toastSlideIn 0.3s ease-out;
}

.wp-booking-toast.type-success {
    background: #f0fdf4;
    /* Light green bg */
    border-left-color: #16a34a;
    /* Green border */
    color: #166534;
}

.wp-booking-toast.type-error {
    background: #fef2f2;
    /* Light red bg */
    border-left-color: #dc2626;
    /* Red border */
    color: #991b1b;
}

.wp-booking-toast.type-info {
    background: #eff6ff;
    border-left-color: #2563eb;
    color: #1e40af;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--wp-booking-primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--wp-booking-primary);
}

/* Summary */
.booking-summary {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Align top */
}

.wizard-logo {
    max-width: 150px;
    max-height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
    display: block;
}

.wizard-company {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Sidebar Text */
.wizard-sidebar small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    margin-bottom: 5px;
    display: block;
}

.wizard-sidebar h2 {
    font-size: 26px;
    /* Smaller as requested */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--wp-booking-primary);
    /* Use Primary Color for Title too? Or keep text-main? */
}

/* Calendar Column */
.calendar-column {
    flex: 2;
    padding: 30px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-column h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 25px;
    /* More space */
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    text-align: left;
    /* Align logic header to left like in mock? User said "monat mittig", but "Datum wählen" is usually a headline. Keeping left or center? Image has it left. */
    padding-left: 20px;
}

.calendar-header {
    display: flex;
    justify-content: center;
    /* Centered Month & Arrows */
    align-items: center;
    width: 100%;
    gap: 40px;
    /* Spacious gap between arrows and month */
    margin-bottom: 25px;
}

.calendar-header h3 {
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--primary);
    /* Gold/Primary color for month */
    min-width: 150px;
    /* Fixed width to prevent jumping */
    text-align: center;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    /* Larger click area */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    /* Neutral arrow color */
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-color: var(--primary);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.booking-summary p {
    margin: 5px 0;
    font-size: 16px;
    color: var(--text-main);
}

.booking-summary .summary-time {
    font-size: 24px;
    font-weight: 700;
    color: var(--wp-booking-primary);
}

/* --- Wizard (Public) --- */
.booking-wizard-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
    /* User Request: Remove 80vh */
    padding: 0;
    /* User Request: Remove padding */
    width: 100%;
}

/* Main Container - The "Floating" Card */
.wizard-container {
    display: flex;
    background: var(--bg-card);
    /* Restore background for shadow visibility */
    border: none;
    /* Modern "Geiler" Shadow */
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    /* Restore rounded corners */
    overflow: hidden;
    max-width: 1100px;
    width: 100%;
    min-height: auto;
    color: var(--text-main);
}

/* Columns */
.wizard-sidebar {
    width: 30%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.wizard-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 12px;
}

.calendar-section {
    /* Calendar container */
}

.time-slots-section {
    /* Time slots below calendar */
    margin-top: 20px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

/* Profile Area */
.wizard-avatar {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.wizard-profile h4 {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
}

/* Wizard Styles inside Dashboard for consistency if needed */
.wizard-step {
    display: block;
    /* Default block */
}

/* Calendar Grid */
/* Calendar Grid Wrapper */
.calendar-grid-wrapper {
    margin-top: 20px;
}

/* Weekday Headers */
.calendar-weekdays {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 5px;
}

.weekday-header {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
}

.weekday-header.kw-header {
    font-size: 11px;
    color: var(--text-muted);
}

/* Calendar Days Grid */
.calendar-days-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-week-row {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 8px;
}

.week-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
}

/* Old calendar-days for backwards compatibility */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-input);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.day-cell:hover:not(.disabled) {
    background: var(--wp-booking-primary);
    color: white;
}

.day-cell.selected {
    background: var(--wp-booking-primary);
    color: white;
}

.day-cell.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: #f3f4f6;
    /* Light gray background */
}

.day-cell.today {
    border: 2px solid var(--wp-booking-primary);
}

/* Time Slots Column */
/* Time Slots Section - Now inside wizard-main */
.time-slots-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-main);
    text-align: left;
    font-weight: 600;
}

.time-slot {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    background: #ffffff;
    /* White buttons */
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    color: var(--wp-booking-primary);
    /* Gold/Primary text as requested */
    /* Black text */
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.time-slot:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.time-slot:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.wizard-profile h1 {
    font-size: 32px;
    margin: 0 0 20px 0;
    line-height: 1.1;
    background: linear-gradient(45deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback */
    border-bottom: 1px solid var(--border);
}

/* Nav Row: < Title > */
.calendar-nav-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    width: 100%;
}

/* Title inside nav */
.calendar-nav-row h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
}

/* Month Label inside nav */
.calendar-month-label {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    /* Match title color or stay primary? usually text-main for headers */
    margin: 0;
    min-width: 140px;
    /* Prevent jumping when month length changes */
}

/* Fix: The PHP outputs h3, not h2 */
.wizard-main h3,
.wizard-slots h3 {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px !important;
    font-weight: 600;
    color: var(--text-main);
}

/* Calendar */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    text-align: center;
}

/* Checkbox Specific Styling */
.form-group input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    margin-right: 12px;
    accent-color: var(--primary);
    /* Native coloring */
    cursor: pointer;
    box-shadow: none !important;
}

.day-cell {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    font-weight: 500;
}

.day-cell:hover:not(.disabled) {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary);
}

.day-cell.selected {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary);
}

.day-cell.disabled {
    opacity: 0.3;
    pointer-events: none;
    background: transparent;
}

/* Calendar specific overrides to kill orange */
.ui-datepicker-header {
    color: var(--primary) !important;
}

.ui-datepicker th {
    color: var(--text-muted) !important;
}

.ui-state-default,
.ui-widget-content .ui-state-default {
    background: var(--bg-light) !important;
    color: var(--primary) !important;
    /* The numbers */
    border: none !important;
    text-align: center;
}

.ui-state-highlight,
.ui-widget-content .ui-state-highlight {
    color: var(--primary) !important;
    /* Today */
}

.ui-state-active,
.ui-widget-content .ui-state-active {
    background-color: var(--primary) !important;
    color: #fff !important;
    border-radius: 12px;
}

/* Slot List */
.slot-list li {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--primary);
    /* Was orange */
}

.slot-list li:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

/* Slots */
.time-slot {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-main);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.time-slot:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Modal */
.booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.booking-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 24px;
    width: 500px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 1);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    color: var(--text-muted);
}

.close-modal:hover {
    color: #fff;
}

.booking-summary {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

/* Modal specific text overrides */
.booking-modal h2,
.booking-modal h3,
.booking-modal .close-modal {
    color: var(--text-main) !important;
}

.booking-summary p {
    margin: 5px 0;
    color: var(--text-main);
}

/* Modern Form Styling */
.form-group {
    margin-bottom: 24px;
    /* More breathing room */
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    /* Muted for labels is standard, keep it */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    /* Larger touch area */
    border: 1px solid var(--border);
    border-radius: 12px;
    /* Modern rounded corners */
    background: var(--bg-input) !important;
    /* Force background from variable */
    color: var(--text-main);
    /* Ensure text inside input is readable */
    font-size: 16px;
    /* Larger font */
    box-sizing: border-box;
    transition: all 0.2s ease;
    height: 52px;
    /* Fixed height for uniformity */
}

/* Dark Mode Specific Overrides */
html:not([data-theme="light"]) {
    --bg-input: #111827;
}

/* Dark Mode Text Color - FORCE WHITE */
html:not([data-theme="light"]) .form-group input,
html:not([data-theme="light"]) .form-group select,
html:not([data-theme="light"]) .form-group textarea {
    color: #ffffff !important;
    /* Explicitly white text */
    caret-color: #ffffff;
    /* White cursor/caret */
}

/* Dark Mode Focus - White Glow & Border */
html:not([data-theme="light"]) .form-group input:not([type="checkbox"]):focus,
html:not([data-theme="light"]) .form-group select:focus,
html:not([data-theme="light"]) .form-group textarea:focus {
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2) !important;
    background: #1f2937 !important;
    /* Keep it dark on focus */
}

.form-group textarea {
    height: auto;
    min-height: 120px;
}

/* Focus State - Default (Light Mode / Standard) */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--bg-card) !important;
    /* Slightly different on focus */
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-shadow);
    /* Premium focus ring */
}

/* Cleaned up duplicate input styles */

/* Summary */
.booking-summary {
    background: var(--bg-dark);
    /* Use dark/light bg instead of orange/yellow */
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.booking-summary p {
    margin: 5px 0;
    font-size: 16px;
    color: var(--text-main);
}

.booking-summary .summary-time {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.button-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {

    /* Full width wrapper */
    .booking-wizard-wrapper {
        padding: 0;
        align-items: flex-start;
    }

    .wizard-container {
        grid-template-columns: 1fr;
        /* Force single column */
        display: flex;
        /* Switch to flex to control order easily if needed, or stick to grid 1fr */
        flex-direction: column;
        gap: 0;
        height: auto;
        max-height: none;
        width: 100%;
        margin: 0;
        box-shadow: none;
    }

    .wizard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .wizard-sidebar h2 {
        font-size: 20px;
        margin-bottom: 10px;
        margin-top: 0;
    }

    .wizard-main {
        padding: 10px !important;
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 400px;
    }

    /* Mobile Month Selector */
    .mobile-month-select {
        display: block !important;
        width: 100%;
        padding: 10px;
        margin: 10px 0;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--bg-input);
        color: var(--text-main);
        font-size: 16px;
    }

    #current-month {
        display: none;
        /* Hide standard text label on mobile in favor of select */
    }

    /* Mobile Week View */
    .calendar-weekdays,
    .calendar-week-row {
        display: none !important;
        /* Hide table-like grid */
    }

    /* New Flex Week View */
    .mobile-week-view {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        margin-top: 10px;
    }

    .mobile-day-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 50px;
        background: var(--bg-input);
        border: 1px solid var(--border);
        border-radius: 8px;
        cursor: pointer;
        padding: 5px;
    }

    /* Larger Phones (e.g. Pro Max, Landscape) */
    @media (min-width: 400px) {
        .mobile-day-btn {
            width: 100px;
            /* User requested "width: 100" */
            height: 90px;
        }

        .mobile-day-btn .day-number {
            font-size: 20px;
        }
    }

    /* Tablets (e.g. iPad Portrait) - up to 768px before switching to desktop */
    @media (min-width: 600px) {
        .mobile-day-btn {
            width: 140px;
            /* "Tablet noch größer" */
            height: 120px;
        }

        .mobile-day-btn .day-number {
            font-size: 28px;
        }
    }

    .mobile-day-btn.today {
        /* Remove background, keep border or just text style to differentiate "Today" without confusing selection */
        border: 1px solid var(--text-muted);
        background: transparent;
        color: var(--text-main);
    }

    .mobile-day-btn.selected {
        background: var(--wp-booking-primary) !important;
        color: white !important;
        border-color: var(--wp-booking-primary) !important;
    }

    .mobile-day-btn.month-start.selected {
        border: 2px solid var(--wp-booking-primary) !important;
        /* Override red border when selected */
    }

    .mobile-day-btn.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
    }

    .mobile-day-btn.month-start {
        border: 2px solid #d63638;
        /* Red border for start of month */
        position: relative;
    }

    .mobile-day-btn .day-name {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .mobile-day-btn .day-number {
        font-size: 14px;
        font-weight: 700;
        margin-top: 1px;
    }

    /* Subtitle for Mobile Header */
    .wizard-subtitle {
        font-size: 13px;
        color: var(--wp-booking-primary);
        margin-top: -5px;
        margin-bottom: 15px;
        font-weight: 600;
        text-align: center;
        /* Centered as requested */
    }

    /* Center all headers in wizard main on mobile */
    .wizard-main h3 {
        text-align: center;
    }

    /* Mobile Calendar Adjustments - Hide KW, make very compact */
    .calendar-weekdays {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        padding: 0;
    }

    .weekday-header.kw-header {
        display: none;
        /* Hide KW on mobile */
    }

    .weekday-header {
        font-size: 10px;
        padding: 2px 0;
    }

    .calendar-week-row {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }

    .week-number {
        display: none;
        /* Hide week numbers on mobile */
    }

    .day-cell {
        font-size: 11px;
        padding: 4px 2px;
        min-height: 32px;
        aspect-ratio: 1;
    }

    .calendar-grid-wrapper {
        margin-top: 10px;
    }

    /* Mobile Step Logic: Default shows Calendar */
    .calendar-column {
        display: block;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }

    /* Fix Mobile Title */
    .wizard-main h3 {
        text-align: center !important;
        width: 100%;
        display: block;
        font-size: 18px;
        margin-bottom: 15px;
        font-weight: 600;
        margin-top: 10px;
    }

    /* Fix Mobile Nav Row */
    .calendar-nav-row {
        justify-content: center !important;
        gap: 10px;
        /* Tighter nav */
    }

    /* Step 2: Hide Calendar, Show Slots */
    .wizard-container.mobile-step-2 .calendar-column {
        display: none;
    }

    .wizard-container.mobile-step-2 .wizard-slots {
        display: flex;
    }

    /* Default: Hide Slots */
    .wizard-slots {
        display: none;
        /* Hidden initially on mobile */
        border-left: none;
        padding: 20px;
        min-height: 400px;
        /* Give it height */
        width: 100%;
    }

    /* Mobile Back Button */
    .mobile-back-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 5px;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        padding: 0;
        margin-bottom: 15px;
        align-self: flex-start;
        /* Left align the back button */
    }

    .mobile-back-btn:hover {
        color: var(--primary);
        text-decoration: underline;
    }

    .calendar-grid {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .booking-grid {
        justify-content: center;
        /* Mobile: Center aligned */
    }

    .calendar-days {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        /* Reduce gap to prevent overflow/cutoff */
        padding: 0 5px;
        /* Tiny side padding */
        width: 100%;
        box-sizing: border-box;
    }

    /* Mobile Modal Fix */
    .booking-modal-content {
        width: 90% !important;
        /* Use almost full width */
        max-width: none;
        margin: 20px auto;
        /* Center with simpler margin */
        padding: 20px;
        /* Reduce padding */
        max-height: 85vh;
        /* Prevent vertical cutoff */
        overflow-y: auto;
        /* Allow scrolling if keyboard opens */
    }

    .day-cell {
        width: auto;
        /* Let grid control width */
        height: 44px;
        /* Slightly smaller height to be safe */
        aspect-ratio: 1;
        font-size: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        margin: 0;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }

    .wizard-slots h3 {
        font-size: 18px;
        margin-bottom: 15px;
        text-align: center;
        width: 100%;
    }
}

/* Hide back button on desktop */
@media (min-width: 769px) {
    .mobile-back-btn {
        display: none !important;
    }
}

/* --- Dark Mode Overrides for Wizard Layout --- */
html:not([data-theme="light"]) .wizard-slots {
    background: #111827 !important;
    /* Dark Background */
    border-color: #374151;
}

html:not([data-theme="light"]) .time-slot {
    background: #1f2937 !important;
    /* Dark Button Surface */
    color: var(--primary) !important;
    /* Gold Text */
    border-color: #374151;
}

html:not([data-theme="light"]) .time-slot:hover {
    border-color: var(--primary);
    background: #374151 !important;
}

/* Dashboard Fixes */
.booking-grid {
    width: 100%;
    box-sizing: border-box;
}

.booking-card {
    overflow: hidden;
    /* Contain content */
    word-wrap: break-word;
    /* Prevent long text overflow */
}

/* --- Unified Dashboard Styles --- */

.booking-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.booking-toolbar input,
.booking-toolbar select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.booking-month-header {
    background: #f3f4f6;
    color: #374151;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px;
    margin: 24px 0 12px 0;
    position: sticky;
    top: 10px;
    /* Sticky effect */
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.booking-item-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.booking-item-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.booking-item-card.is-blocked {
    background: #fff1f2;
    /* Light red */
    border-color: #fecaca;
}

/* Date Date Box */
.booking-item-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
    color: #374151;
}

.booking-item-date .day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.booking-item-date .weekday {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

/* Details */
.booking-item-details {
    flex: 1;
    /* Take remaining space */
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    /* Ensure content doesn't squash too much */
}

.booking-time {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.booking-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.booking-meta {
    font-size: 0.9rem;
    color: #4b5563;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Actions */
.booking-item-actions {
    display: flex;
    gap: 8px;
}

.button-small {
    padding: 6px 10px;
    min-height: auto;
    font-size: 0.85rem;
}

/* Status Badges */
.status-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .booking-item-card {
        align-items: flex-start;
        /* Stack items */
    }

    .booking-item-details {
        width: 100%;
        /* Full width on break */
    }

    .booking-item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f3f4f6;
    }
}

/* --- Wide Modal & Badges --- */

.booking-modal-content.modal-xl {
    max-width: 900px;
    width: 95%;
}

/* Grid Layout for Form in Wide Modal on Desktop */
@media (min-width: 769px) {
    .booking-modal-content.modal-xl form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .booking-modal-content.modal-xl form h2,
    .booking-modal-content.modal-xl form #booking-summary,
    .booking-modal-content.modal-xl form .submit-row {
        grid-column: 1 / -1;
        /* Full width header/footer */
    }

    /* Submit Button Container */
    .submit-row {
        margin-top: 20px;
        text-align: right;
    }
}

/* Badges */
.status-badge.blocked {
    background: #fee2e2;
    color: #991b1b;
}

/* Red-ish for Blocked */
.status-badge.trash {
    background: #374151;
    color: #f3f4f6;
}

/* Dark for Trash */
.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

/* --- Wizard Step 2: Form Grid --- */
.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Full Width Spans (Textarea, Checkbox) */
.booking-form-grid .form-group[style*="span 2"] {
    grid-column: span 2;
}

/* Form Group overrides for Grid */
.booking-form-grid .form-group {
    margin-bottom: 0;
    /* Let Grid gap handle spacing */
}

/* Mobile: Stack nicely */
@media (max-width: 768px) {
    .booking-form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .booking-form-grid .form-group[style*="span 2"] {
        grid-column: span 1 !important;
    }
}

/* --- Beautiful Big Submit Button --- */
.big-submit-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.big-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.big-submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Back Button Styling */
#wizard-back-btn {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

#wizard-back-btn:hover {
    color: var(--wp-booking-primary);
}

/* --- Wizard Selection Summary Card --- */
.wizard-summary-card {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-left: 4px solid var(--wp-booking-primary);
    padding: 15px 20px;
    border-radius: 8px;
    gap: 15px;
    margin-bottom: 25px;
}

.summary-icon {
    font-size: 24px;
    opacity: 0.8;
}

.summary-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.summary-details .summary-date {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
}

.summary-details .summary-time {
    font-size: 14px;
    color: var(--text-muted);
}

.change-slot-btn {
    color: var(--wp-booking-primary);
    font-weight: 600;
    font-size: 14px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.change-slot-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

/* FIX: Slot Grid Spacing */
#booking-slots-container {
    padding-top: 20px;
    /* More space above first row */
    padding-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    /* Increase gap */
}

/* FIX: Slot Button Sizing */
#booking-slots-container .time-slot {
    margin-bottom: 0;
    /* Let grid handle gap */
    width: 100%;
    box-sizing: border-box;
    /* Ensure border doesn't expand width */
    height: 50px;
    /* Fixed height for uniformity */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Remove padding causing squeeze */
}

/* FIX: Selected State Border */
#booking-slots-container .time-slot.selected {
    border: 2px solid var(--wp-booking-primary);
    /* Use border instead of outline */
    background: white;
    /* Ensure text is readable */
    color: var(--wp-booking-primary);
}

/* --- DASHBOARD DARK MODE OVERRIDES (Scoped) --- */

/* 1. Dark Container Canvas */
[data-theme="dark"] #wp-booking-dashboard {
    background-color: #1f2937 !important;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
    color: white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 2. Headers & Text */
[data-theme="dark"] #wp-booking-dashboard h2,
[data-theme="dark"] #wp-booking-dashboard h3,
[data-theme="dark"] #wp-booking-dashboard label,
[data-theme="dark"] #wp-booking-dashboard .booking-header h2 {
    color: white !important;
}

/* 3. Inputs & Selects (Dark + White Border) */
[data-theme="dark"] #wp-booking-dashboard input[type="text"],
[data-theme="dark"] #wp-booking-dashboard input[type="email"],
[data-theme="dark"] #wp-booking-dashboard input[type="search"],
[data-theme="dark"] #wp-booking-dashboard input[type="tel"],
[data-theme="dark"] #wp-booking-dashboard input[type="url"],
[data-theme="dark"] #wp-booking-dashboard input[type="number"],
[data-theme="dark"] #wp-booking-dashboard input[type="date"],
[data-theme="dark"] #wp-booking-dashboard select {
    background-color: #111827 !important;
    /* DARKER background request */
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 6px;
    padding: 8px 12px;
}

[data-theme="dark"] #wp-booking-dashboard input::placeholder {
    color: #9ca3af !important;
}

/* 4. Buttons In Dark Mode */
[data-theme="dark"] #wp-booking-dashboard .button-secondary {
    background-color: #374151 !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] #wp-booking-dashboard .button-secondary:hover {
    background-color: var(--wp-booking-primary) !important;
    border-color: var(--wp-booking-primary) !important;
    color: white !important;
}

/* 5. Booking Cards (Dark + White Border) */
[data-theme="dark"] #wp-booking-dashboard .booking-item-card {
    background-color: #374151 !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    color: white !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 6. Booking Details Text */
[data-theme="dark"] #wp-booking-dashboard .booking-item-details .booking-title strong {
    color: white !important;
}

[data-theme="dark"] #wp-booking-dashboard .booking-item-details .booking-time,
[data-theme="dark"] #wp-booking-dashboard .booking-item-details .booking-meta span,
[data-theme="dark"] #wp-booking-dashboard .booking-item-date .weekday {
    color: #d1d5db !important;
}

/* 7. Date Box */
[data-theme="dark"] #wp-booking-dashboard .booking-item-date {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

[data-theme="dark"] #wp-booking-dashboard .booking-item-date .day {
    color: white !important;
}

/* 8. Action Buttons (Edit/Delete) */
[data-theme="dark"] #wp-booking-dashboard .booking-item-card button {
    background-color: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

/* 9. Month Headers */
[data-theme="dark"] #wp-booking-dashboard .booking-month-header.sticky-header {
    background-color: #1f2937 !important;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- CI COLORS & HIGHLIGHTS (Global) --- */
/* These apply to BOTH Light and Dark mode to give "Sinnvolle" Branding */

/* Card Hover Border -> Primary Color */
#wp-booking-dashboard .booking-item-card:hover {
    border-color: var(--wp-booking-primary) !important;
    box-shadow: 0 0 0 1px var(--wp-booking-primary) !important;
    transform: translateY(-1px);
    transition: all 0.2s ease-in-out;
}

/* Input Focus -> Primary Color */
#wp-booking-dashboard input:focus,
#wp-booking-dashboard select:focus {
    border-color: var(--wp-booking-primary) !important;
    box-shadow: 0 0 0 1px var(--wp-booking-primary);
    outline: none;
}

/* Pagination Active -> Primary Color */
#wp-booking-dashboard .tablenav .pagination-links .current {
    background: var(--wp-booking-primary) !important;
    border-color: var(--wp-booking-primary) !important;
    color: white !important;
}



/* Action Buttons Hover -> Primary Color */
#wp-booking-dashboard .booking-item-card button:hover {
    background-color: var(--wp-booking-primary) !important;
    border-color: var(--wp-booking-primary) !important;
    color: white !important;
}

/* FIX: Ensure Textarea Text is NOT Primary Color */
.form-group textarea,
#booking-modal .form-group textarea {
    color: #333333 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #333333 !important;
}

[data-theme="dark"] .form-group textarea,
[data-theme="dark"] #booking-modal .form-group textarea {
    color: white !important;
    -webkit-text-fill-color: white !important;
    /* CRITICAL FIX */
    background-color: #111827 !important;
    /* DARKER background request */
    border-color: rgba(255, 255, 255, 0.3) !important;
}