.booking-calendar-wrapper {
    max-width: 570px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.booking-calendar-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.booking-calendar-header {
    padding: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.booking-calendar-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
}

.booking-icon {
    width: 20px;
    height: 20px;
}

.booking-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.booking-month-display {
    font-size: 14px;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
    color: #374151;
    transition: all 0.2s;
}

.booking-month-display:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.booking-nav-btn {
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    background: transparent !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #374151 !important;
    transition: all 0.2s !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 32px !important;
    min-height: 32px !important;
}

.booking-nav-btn svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #374151 !important;
    fill: none !important;
    stroke-width: 2 !important;
    pointer-events: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.booking-nav-btn:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

.booking-nav-btn:hover svg {
    stroke: #111827 !important;
}

.booking-nav-btn:active {
    background: #e5e7eb !important;
}

.booking-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.booking-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 0 22px;
    margin-top: 10px;
    font-size: 11px;
}

.booking-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid;
}

.legend-free {
    background: #dcfce7;
    border-color: #86efac;
}

.legend-pending {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.legend-booked {
    background: #fee2e2;
    border-color: #fca5a5;
}

.booking-calendar-body {
    padding: 22px;
    padding-top: 0;
}

.booking-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    padding: 0;
}

.booking-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    padding: 8px 0;
    margin: 0;
}

.booking-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 0;
    margin: 0;
}

.booking-day {
    aspect-ratio: 1;
    border-radius: 6px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.booking-day:hover:not(:disabled) {
    background: #f3f4f6;
}

.booking-day:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9fafb;
}

.booking-day.free {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.booking-day.free:hover {
    background: #bbf7d0;
    transform: scale(1.05);
}

.booking-day.selected {
    background: #3b82f6;
    color: white;
    border: 2px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.booking-day.booked {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    cursor: not-allowed;
}

.booking-day.pending {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
}

/* Ensure Sunday visibility and fix alignment on mobile */
@media (max-width: 768px) {
    .booking-calendar-body {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .booking-weekdays,
    .booking-days-grid {
        gap: 2px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .booking-weekday,
    .booking-day {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .booking-day {
        font-weight: 600;
        font-size: 13px;
    }
    
    .booking-day:disabled {
        font-weight: 500;
        opacity: 0.5;
    }
    
    /* Make Sundays more visible */
    .booking-days-grid .booking-day:nth-child(7n) {
        font-weight: 700;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .booking-weekdays,
    .booking-days-grid {
        gap: 1px;
    }
    
    /* Make Sundays even more visible on small screens */
    .booking-days-grid .booking-day:nth-child(7n) {
        font-weight: 700;
        font-size: 13px;
    }
}

.booking-instruction {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 16px;
    margin-bottom: 0;
}

/* Form Overlay */
.booking-form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.booking-form-overlay.active {
    display: flex;
}

.booking-form-container {
    background: white;
    border-radius: 12px;
    padding: 28px;
    max-width: 475px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.booking-form-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.booking-form-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.booking-form-container h3 {
    margin: 0 0 14px 0;
    font-size: 22px;
    font-weight: 600;
    color: #111827;
}

.booking-selected-date {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #1e40af;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.booking-submit-btn {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.booking-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.booking-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.booking-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.booking-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.booking-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Month/Year Picker */
.month-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.month-picker-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.month-picker-year {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    min-width: 80px;
    text-align: center;
}

.month-picker-nav {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.month-picker-nav:hover:not(:disabled) {
    background: #e5e7eb;
    color: #111827;
}

.month-picker-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.month-picker-btn {
    padding: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.month-picker-btn:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #3b82f6;
}

.month-picker-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.month-picker-close {
    width: 100%;
    padding: 10px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.month-picker-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .booking-calendar-wrapper {
        max-width: 100%;
        padding: 0 12px;
    }

    .booking-calendar-header {
        padding: 16px;
        padding-bottom: 12px;
    }

    .booking-calendar-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .booking-icon {
        width: 18px;
        height: 18px;
    }

    .booking-month-display {
        font-size: 13px;
        min-width: 100px;
    }

    .booking-nav-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }

    .booking-nav-btn svg {
        width: 18px !important;
        height: 18px !important;
        stroke: #374151 !important;
    }

    .booking-legend {
        padding: 0 16px;
        gap: 12px;
        margin-top: 8px;
    }

    .booking-legend-item {
        font-size: 11px;
    }

    .legend-color {
        width: 14px;
        height: 14px;
    }

    .booking-calendar-body {
        padding: 16px;
        padding-top: 0;
    }

    .booking-weekdays {
        gap: 2px;
    }

    .booking-weekday {
        font-size: 11px;
        padding: 6px 0;
        margin: 0;
    }

    .booking-days-grid {
        gap: 2px;
    }

    .booking-day {
        font-size: 13px;
        min-height: 36px;
        padding: 0;
        margin: 0;
    }

    .booking-instruction {
        font-size: 11px;
        margin-top: 12px;
    }

    .booking-form-container {
        padding: 24px 20px;
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }

    .booking-form-container h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .booking-selected-date {
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .booking-submit-btn {
        padding: 14px;
        font-size: 16px;
    }

    .month-picker-container {
        padding: 20px 16px;
        max-width: 100%;
        margin: 10px;
    }

    .month-picker-header {
        margin-bottom: 16px;
    }

    .month-picker-year {
        font-size: 16px;
    }

    .month-picker-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .month-picker-grid {
        gap: 6px;
        margin-bottom: 16px;
    }

    .month-picker-btn {
        padding: 10px 8px;
        font-size: 13px;
    }

    .month-picker-close {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .booking-calendar-wrapper {
        padding: 0 8px;
    }

    .booking-calendar-header {
        padding: 12px;
        padding-bottom: 10px;
    }

    .booking-calendar-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .booking-month-display {
        font-size: 12px;
        min-width: 90px;
    }

    .booking-legend {
        padding: 0 12px;
        gap: 10px;
    }

    .booking-calendar-body {
        padding: 12px;
        padding-top: 0;
    }

    .booking-weekdays {
        gap: 1px;
    }

    .booking-days-grid {
        gap: 1px;
    }

    .booking-day {
        font-size: 12px;
        min-height: 32px;
        padding: 0;
        margin: 0;
    }

    .booking-form-container {
        padding: 20px 16px;
        border-radius: 8px;
    }

    .booking-form-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
        font-size: 22px;
    }

    .month-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .booking-nav-btn,
    .booking-day,
    .month-picker-btn,
    .month-picker-nav {
        min-height: 44px;
        min-width: 44px;
    }

    .booking-day.free:hover {
        transform: none; /* Disable scale on touch devices */
    }
}
