/**
 * Modern Restaurant Reservations Form Styles
 * Beautiful and user-friendly design
 */

/* Reservation Form Container */
.restaurant-reservations-form {
    max-width: 650px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.restaurant-reservations-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Title */
.restaurant-reservations-form .reservation-form-title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff !important;
    text-align: center;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Description */
.restaurant-reservations-form .reservation-form-description {
    margin-bottom: 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.6;
}

/* Response Messages */
.restaurant-reservations-form .reservation-form-response {
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.restaurant-reservations-form .reservation-form-response.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    color: #155724;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.restaurant-reservations-form .reservation-form-response.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    color: #721c24;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

/* Form Fields */
.restaurant-reservations-form .reservation-form-field {
    margin-bottom: 24px;
    position: relative;
}

.restaurant-reservations-form .reservation-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #ffffff !important;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Extra Spezifität für Labels */
#restaurant-reservations-form .reservation-form-field label,
.restaurant-reservations-form form .reservation-form-field label {
    color: #ffffff !important;
}

.restaurant-reservations-form .reservation-form-field .required {
    color: #ef4444 !important;
    margin-left: 4px;
    font-size: 16px;
}

/* Input Fields */
.restaurant-reservations-form .reservation-form-field input[type="text"],
.restaurant-reservations-form .reservation-form-field input[type="email"],
.restaurant-reservations-form .reservation-form-field input[type="tel"],
.restaurant-reservations-form .reservation-form-field select,
.restaurant-reservations-form .reservation-form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background-color: #ffffff;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.restaurant-reservations-form .reservation-form-field input[type="text"]:hover,
.restaurant-reservations-form .reservation-form-field input[type="email"]:hover,
.restaurant-reservations-form .reservation-form-field input[type="tel"]:hover,
.restaurant-reservations-form .reservation-form-field select:hover,
.restaurant-reservations-form .reservation-form-field textarea:hover {
    border-color: #cbd5e1;
}

.restaurant-reservations-form .reservation-form-field input[type="text"]:focus,
.restaurant-reservations-form .reservation-form-field input[type="email"]:focus,
.restaurant-reservations-form .reservation-form-field input[type="tel"]:focus,
.restaurant-reservations-form .reservation-form-field select:focus,
.restaurant-reservations-form .reservation-form-field textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
    outline: none;
    transform: translateY(-1px);
}

.restaurant-reservations-form .reservation-form-field select {
    height: auto;
    padding: 14px 16px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.restaurant-reservations-form .reservation-form-field textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Description Text */
.reservation-form-field .description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8) !important;
    margin-top: 6px;
    line-height: 1.4;
    font-style: italic;
}

/* Submit Button */
.restaurant-reservations-form .submit-field {
    margin-top: 32px;
    text-align: center;
}

.restaurant-reservations-form .reservation-submit {
    display: inline-block;
    padding: 16px 48px;
    background: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.restaurant-reservations-form .reservation-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.restaurant-reservations-form .reservation-submit:hover::before {
    left: 100%;
}

.restaurant-reservations-form .reservation-submit:hover,
.restaurant-reservations-form .reservation-submit:focus {
    background: rgba(255, 255, 255, 0.95);
    color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.restaurant-reservations-form .reservation-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.restaurant-reservations-form .reservation-submit:disabled {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(102, 126, 234, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Captcha Field */
.restaurant-reservations-form .captcha-field .captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.restaurant-reservations-form .captcha-field .captcha-image {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.restaurant-reservations-form .captcha-field input {
    flex: 1;
}

/* jQuery UI Datepicker - Ultra Premium Glassmorphism Design */
.ui-datepicker,
#inline-datepicker.ui-datepicker-inline {
    /* Glassmorphism Background matching form gradient */
    background: rgba(102, 126, 234, 0.15) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    /* Premium Border with gradient colors */
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 20px;
    
    /* Multi-layer 3D shadows matching theme */
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.25),
        0 6px 20px rgba(118, 75, 162, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    padding: 20px !important;
    width: fit-content !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1000 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Entry animation */
    animation: datepickerFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top center;
}

/* Inline datepicker specific */
#inline-datepicker.ui-datepicker-inline {
    display: inline-block;
    margin: 10px 0;
}

/* Hide the trigger button for inline datepicker */
.ui-datepicker-trigger {
    display: none !important;
}

/* Ensure no table borders show through */
.ui-datepicker table,
.ui-datepicker table tbody,
.ui-datepicker table tr,
.ui-datepicker table td,
.ui-datepicker table th {
    border: none !important;
    background: transparent !important;
}

@keyframes datepickerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ui-datepicker .ui-datepicker-header {
    margin-bottom: 20px;
    position: relative;
    text-align: center;
    
    /* Premium gradient with shine effect */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Neumorphism effect */
    border-radius: 16px;
    padding: 16px 0;
    color: #ffffff;
    
    /* 3D depth */
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.35),
        0 2px 8px rgba(118, 75, 162, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    
    /* Subtle animation on load */
    animation: headerPulse 2s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% {
        box-shadow: 
            0 8px 20px rgba(102, 126, 234, 0.35),
            0 2px 8px rgba(118, 75, 162, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 10px 25px rgba(102, 126, 234, 0.45),
            0 4px 12px rgba(118, 75, 162, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    height: 36px;
    width: 36px;
    position: absolute;
    top: 12px;
    color: #ffffff;
    text-decoration: none;
    
    /* Glassmorphism button */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    
    /* 3D effect */
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Center the arrow */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ui-datepicker .ui-datepicker-prev:active,
.ui-datepicker .ui-datepicker-next:active {
    transform: scale(0.95) translateY(0);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ui-datepicker .ui-datepicker-prev {
    left: 12px;
}

.ui-datepicker .ui-datepicker-next {
    right: 12px;
}

.ui-datepicker .ui-datepicker-title {
    font-weight: 800;
    font-size: 17px;
    line-height: 1.8em;
    margin: 0 2.3em;
    text-align: center;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ui-datepicker table {
    border-collapse: separate !important;
    border-spacing: 1px !important;
    font-size: 14px;
    margin: 12px auto 0;
    width: 100% !important;
    max-width: 100%;
    border: none !important;
    table-layout: fixed !important;
}

.ui-datepicker table tr {
    display: table-row;
}

.ui-datepicker table th,
.ui-datepicker table td {
    display: table-cell;
    width: 14.28571% !important; /* 100% / 7 days */
    text-align: center !important;
    vertical-align: middle;
    box-sizing: border-box;
}

.ui-datepicker th {
    border: 0 !important;
    font-weight: 600;
    padding: 8px 2px !important;
    text-align: center !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ui-datepicker td {
    border: 0 !important;
    padding: 2px !important;
    background: transparent !important;
    text-align: center !important;
}

.ui-datepicker td span,
.ui-datepicker td a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 90% !important;
    max-width: 44px !important;
    height: 44px !important;
    margin: 0 auto !important;
    text-align: center;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    box-sizing: border-box;
    
    /* Soft neumorphism base */
    background: #ffffff !important;
    border-radius: 9px;
    
    /* Subtle 3D shadow */
    box-shadow: 
        2px 2px 5px rgba(0, 0, 0, 0.06),
        -1px -1px 4px rgba(255, 255, 255, 0.8),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.6);
    
    border: 1px solid rgba(229, 231, 235, 0.5) !important;
    
    /* Smooth transitions */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on hover */
.ui-datepicker td a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s;
}

.ui-datepicker td a:hover {
    /* Elevated neumorphism */
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    transform: translateY(-2px) scale(1.05);
    
    box-shadow: 
        4px 4px 12px rgba(0, 0, 0, 0.1),
        -2px -2px 8px rgba(255, 255, 255, 1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(102, 126, 234, 0.15);
    
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.2);
}

.ui-datepicker td a:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Selected/Active date */
.ui-datepicker td a.ui-state-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 800;
    
    /* Premium glow effect */
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.5),
        0 4px 12px rgba(118, 75, 162, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(102, 126, 234, 0.15);
    
    transform: translateY(-2px) scale(1.05);
    animation: activeDate 0.5s ease-out;
}

@keyframes activeDate {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: translateY(-2px) scale(1.05);
        opacity: 1;
    }
}

/* Today's date highlight */
.ui-datepicker td a.ui-state-highlight {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    color: #1e40af;
    font-weight: 700;
    
    box-shadow: 
        2px 2px 6px rgba(59, 130, 246, 0.25),
        -1px -1px 4px rgba(255, 255, 255, 0.9),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
    
    border: 2px solid rgba(59, 130, 246, 0.3);
    
    /* Subtle pulse animation */
    animation: todayPulse 3s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% {
        border-color: rgba(59, 130, 246, 0.3);
    }
    50% {
        border-color: rgba(59, 130, 246, 0.5);
        box-shadow: 
            2px 2px 8px rgba(59, 130, 246, 0.3),
            -1px -1px 5px rgba(255, 255, 255, 1),
            0 0 0 3px rgba(59, 130, 246, 0.1);
    }
}

.ui-datepicker .ui-datepicker-unselectable .ui-state-disabled {
    /* Disabled days - pressed inward neumorphism */
    background: linear-gradient(145deg, #e9ecef, #f8f9fa) !important;
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.1),
        inset -1px -1px 3px rgba(255, 255, 255, 0.5) !important;
    color: #adb5bd !important;
    opacity: 0.5;
    cursor: not-allowed;
    font-weight: 400;
}

/* Blocked dates - premium striped glass effect */
.ui-datepicker td.blocked-date span,
.ui-datepicker td.blocked-date a {
    /* Glassmorphism with stripes */
    background: 
        repeating-linear-gradient(
            135deg,
            rgba(254, 226, 226, 0.9),
            rgba(254, 226, 226, 0.9) 8px,
            rgba(252, 165, 165, 0.7) 8px,
            rgba(252, 165, 165, 0.7) 16px
        );
    
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    color: #991b1b;
    font-weight: 700;
    
    /* Pressed inward effect */
    box-shadow: 
        inset 3px 3px 6px rgba(153, 27, 27, 0.15),
        inset -2px -2px 4px rgba(255, 255, 255, 0.3),
        0 2px 6px rgba(220, 38, 38, 0.2);
    
    border: 1px solid rgba(220, 38, 38, 0.3);
    cursor: not-allowed;
    opacity: 0.75;
    position: relative;
}

/* X icon overlay for blocked dates */
.ui-datepicker td.blocked-date span::after,
.ui-datepicker td.blocked-date a::after {
    content: '✕';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    color: #dc2626;
    font-weight: bold;
    opacity: 0.6;
}

/* Datepicker trigger button */
.ui-datepicker-trigger {
    margin-left: 8px;
    vertical-align: middle;
    cursor: pointer;
    width: 32px;
    height: 32px;
    
    /* Neumorphism button */
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    border-radius: 50%;
    padding: 6px;
    
    box-shadow: 
        4px 4px 10px rgba(0, 0, 0, 0.1),
        -2px -2px 6px rgba(255, 255, 255, 0.9);
    
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ui-datepicker-trigger:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        6px 6px 14px rgba(0, 0, 0, 0.15),
        -3px -3px 8px rgba(255, 255, 255, 1),
        0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ui-datepicker-trigger:active {
    transform: scale(0.95) rotate(0deg);
    box-shadow: 
        inset 2px 2px 4px rgba(0, 0, 0, 0.1),
        inset -1px -1px 3px rgba(255, 255, 255, 0.5);
}

/* Input field with datepicker */
input.datepicker {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 22px;
    padding-right: 52px;
    cursor: pointer;
    
    /* Subtle icon animation on focus */
    transition: all 0.3s ease;
}

input.datepicker:focus {
    background-size: 24px;
}

/* Loading State */
.restaurant-reservations-form.loading {
    pointer-events: none;
    opacity: 0.6;
}

.restaurant-reservations-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Styles */

/* Extra Large Screens */
@media screen and (min-width: 1200px) {
    .ui-datepicker,
    #inline-datepicker.ui-datepicker-inline {
        padding: 24px 20px !important;
    }
    
    .ui-datepicker td span,
    .ui-datepicker td a {
        width: 90% !important;
        max-width: 48px !important;
        height: 48px !important;
        font-size: 14px !important;
    }
    
    .ui-datepicker table {
        border-spacing: 3px !important;
    }
    
    .ui-datepicker th {
        padding: 10px 2px !important;
    }
    
    .ui-datepicker td {
        padding: 2px !important;
    }
}

/* Tablet and smaller desktops */
@media screen and (max-width: 768px) {
    .restaurant-reservations-form {
        padding: 30px 24px;
        margin: 20px auto;
        border-radius: 12px;
    }
    
    .restaurant-reservations-form .reservation-form-title {
        font-size: 26px;
    }
    
    .restaurant-reservations-form .reservation-form-field input[type="text"],
    .restaurant-reservations-form .reservation-form-field input[type="email"],
    .restaurant-reservations-form .reservation-form-field input[type="tel"],
    .restaurant-reservations-form .reservation-form-field select,
    .restaurant-reservations-form .reservation-form-field textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .restaurant-reservations-form .reservation-submit {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .ui-datepicker,
    #inline-datepicker.ui-datepicker-inline {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 12px !important;
        border-radius: 16px;
        box-sizing: border-box;
    }
    
    .ui-datepicker td span,
    .ui-datepicker td a {
        width: 90% !important;
        max-width: 42px !important;
        height: 42px !important;
        font-size: 12px !important;
        border-radius: 8px;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .ui-datepicker table {
        border-spacing: 2px !important;
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    .ui-datepicker th {
        padding: 8px 2px !important;
        font-size: 9px;
        text-align: center !important;
        width: 14.28571% !important;
    }
    
    .ui-datepicker td {
        padding: 2px !important;
        text-align: center !important;
        width: 14.28571% !important;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 480px) {
    .restaurant-reservations-form {
        padding: 24px 16px;
        margin: 16px 8px;
    }
    
    .restaurant-reservations-form .reservation-form-title {
        font-size: 22px;
    }
    
    .restaurant-reservations-form .reservation-form-field {
        margin-bottom: 20px;
    }
    
    .ui-datepicker,
    #inline-datepicker.ui-datepicker-inline {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 8px !important;
        border-radius: 14px;
        box-sizing: border-box;
    }
    
    .ui-datepicker td span,
    .ui-datepicker td a {
        width: 90% !important;
        max-width: 38px !important;
        height: 38px !important;
        font-size: 11px !important;
        border-radius: 7px;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .ui-datepicker table {
        border-spacing: 2px !important;
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    .ui-datepicker th {
        padding: 6px 2px !important;
        font-size: 8px;
        text-align: center !important;
        width: 14.28571% !important;
    }
    
    .ui-datepicker td {
        padding: 2px !important;
        text-align: center !important;
        width: 14.28571% !important;
        box-sizing: border-box;
    }
    
    .ui-datepicker .ui-datepicker-header {
        padding: 8px 0;
        font-size: 16px;
    }
}

/* Premium Enhancements */

/* Add glow effect to current month */
.ui-datepicker-current-day a {
    position: relative;
    z-index: 1;
}

/* Smooth transitions between months */
.ui-datepicker-calendar tbody {
    transition: opacity 0.3s ease;
}

/* Other months styling - muted neumorphism */
.ui-datepicker .ui-datepicker-other-month {
    opacity: 0.4;
}

.ui-datepicker .ui-datepicker-other-month a,
.ui-datepicker .ui-datepicker-other-month span {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef) !important;
    box-shadow: 
        inset 1px 1px 3px rgba(0, 0, 0, 0.08),
        inset -1px -1px 2px rgba(255, 255, 255, 0.5) !important;
    color: #adb5bd !important;
}

/* Elegant separator line after header */
.ui-datepicker .ui-datepicker-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(102, 126, 234, 0.3) 50%,
        transparent
    );
}

/* Premium loading state */
.ui-datepicker.loading {
    pointer-events: none;
}

.ui-datepicker.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: datepickerSpin 0.8s linear infinite;
}

@keyframes datepickerSpin {
    to { transform: rotate(360deg); }
}

/* Additional Premium Effects */

/* Month transition animation */
.ui-datepicker.ui-datepicker-multi {
    animation: monthSlide 0.4s ease-out;
}

@keyframes monthSlide {
    from {
        opacity: 0.5;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Add subtle gradient overlay to entire calendar */
.ui-datepicker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: radial-gradient(
        circle at top right,
        rgba(102, 126, 234, 0.05),
        transparent 70%
    );
    pointer-events: none;
    z-index: -1;
}

.ui-datepicker {
    position: relative;
}

/* Add floating effect on datepicker */
.ui-datepicker:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 24px 70px rgba(102, 126, 234, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Selected date ring animation */
.ui-datepicker td a.ui-state-active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    z-index: -1;
    opacity: 0.3;
    animation: ringPulse 1.5s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

/* Smooth month change effect */
.ui-datepicker-calendar {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .restaurant-reservations-form {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    }
    
    .restaurant-reservations-form .reservation-form-title {
        color: #f9fafb !important;
    }
    
    .restaurant-reservations-form .reservation-form-field label {
        color: #e5e7eb !important;
    }
    
    .restaurant-reservations-form .reservation-form-field input[type="text"],
    .restaurant-reservations-form .reservation-form-field input[type="email"],
    .restaurant-reservations-form .reservation-form-field input[type="tel"],
    .restaurant-reservations-form .reservation-form-field select,
    .restaurant-reservations-form .reservation-form-field textarea {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    /* Dark mode datepicker */
    .ui-datepicker {
        background: rgba(31, 41, 55, 0.95);
        backdrop-filter: blur(20px);
        border-color: rgba(75, 85, 99, 0.5);
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 8px 24px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .ui-datepicker th {
        background: linear-gradient(145deg, #374151, #2d3748);
        color: #9ca3af;
    }
    
    .ui-datepicker td span,
    .ui-datepicker td a {
        background: linear-gradient(145deg, #374151, #2d3748);
        color: #e5e7eb;
        box-shadow: 
            3px 3px 8px rgba(0, 0, 0, 0.3),
            -2px -2px 6px rgba(255, 255, 255, 0.05);
    }
    
    .ui-datepicker td a:hover {
        background: linear-gradient(145deg, #4b5563, #374151);
    }
}

/* Print Styles */
@media print {
    .restaurant-reservations-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .restaurant-reservations-form .reservation-submit {
        display: none;
    }
}
