.rbm-booking-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rbm-form-group {
    margin-bottom: 20px;
}

/* Row layout for side-by-side fields */
.rbm-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: 20px;
}

.rbm-form-group-half {
    flex: 0 0 50%;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
}

.rbm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.rbm-form-group input[type="text"],
.rbm-form-group input[type="email"],
.rbm-form-group input[type="tel"],
.rbm-form-group input[type="date"],
.rbm-form-group input[type="time"],
.rbm-form-group select,
.rbm-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.3s ease;
}

.rbm-form-group input:focus,
.rbm-form-group select:focus,
.rbm-form-group textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.rbm-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.rbm-phone-group .rbm-phone-input-wrapper {
    display: flex;
    align-items: stretch;
}

.rbm-phone-input-wrapper .iti {
    width: 100%;
    display: flex;
    align-items: stretch;
}

.rbm-phone-input-wrapper .iti input[type="tel"] {
    flex: 1;
    border-radius: 0 4px 4px 0;
    border-left: 0;
    padding: 12px;
    height: auto;
}

.rbm-phone-input-wrapper .iti__flag-container {
    display: flex;
    align-items: stretch;
    cursor: pointer;
    border: 1px solid #ddd;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    background-color: #f7f7f7;
    padding: 0;
    min-width: auto;
    position: relative;
}

.rbm-phone-input-wrapper .iti__selected-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 100%;
    transition: background-color 0.2s ease;
}

.rbm-phone-input-wrapper .iti__selected-flag:hover,
.rbm-phone-input-wrapper .iti__selected-flag:focus-visible {
    background-color: #efefef;
}

.rbm-phone-input-wrapper .iti__selected-dial-code {
    display: none;
}

.rbm-phone-input-wrapper .iti__arrow {
    border-top-color: #666;
    margin-left: 6px;
}

.rbm-phone-input-wrapper .iti:focus-within .iti__flag-container {
    border-color: #007cba;
    background-color: #eef6ff;
}

.rbm-phone-input-wrapper .iti__country-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 8px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    background-color: #fff;
    max-height: 260px;
    overflow-y: auto;
    width: 320px;
    z-index: 10000;
    position: absolute;
    top: calc(100%);
    left: 0;
}

.rbm-phone-input-wrapper .iti__country-list[aria-hidden="true"] {
    display: none;
}

.rbm-phone-input-wrapper .iti__country-list.iti__hide {
    display: none;
}

.rbm-phone-input-wrapper .iti__country {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.rbm-phone-input-wrapper .iti__country.iti__highlight,
.rbm-phone-input-wrapper .iti__country:hover {
    background-color: #f0f6ff;
}

.rbm-phone-input-wrapper .iti__flag {
    display: none;
}

.rbm-phone-input-wrapper .rbm-phone-flag-emoji {
    font-size: 20px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.rbm-phone-input-wrapper .rbm-phone-country-label {
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    font-size: 14px;
}

.rbm-phone-input-wrapper .iti__country .rbm-phone-flag-emoji {
    font-size: 18px;
}

.rbm-phone-input-wrapper .iti__dial-code {
    margin-left: auto;
    color: #666;
    font-weight: 500;
}

.rbm-phone-input-wrapper .iti__flag {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

@media (max-width: 480px) {
    .rbm-phone-input-wrapper .iti__country-list {
        width: calc(100vw - 40px);
        max-width: 100%;
        left: 0 !important;
        right: auto !important;
    }

    .rbm-phone-input-wrapper .iti__selected-flag {
        padding: 0 8px;
        gap: 4px;
    }
}

/* Mobile touch improvements for phone dropdown */
.rbm-phone-input-wrapper .iti__selected-flag {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure dropdown is above other elements */
.rbm-phone-input-wrapper .iti--container {
    z-index: 999999 !important;
}

.rbm-phone-input-wrapper .iti__country-list {
    z-index: 999999 !important;
}

/* Fix for iOS touch issues */
.rbm-phone-input-wrapper .iti__flag-container {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Ensure dropdown items are easily tappable on mobile */
@media (max-width: 768px) {
    .rbm-phone-input-wrapper .iti__country {
        min-height: 44px; /* iOS recommended touch target */
        padding: 10px 16px;
    }
}

/* Fullscreen popup styles for mobile (intl-tel-input v18) */
.iti--fullscreen-popup .iti__country-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.5);
}

.iti--fullscreen-popup .iti__dropdown-content {
    position: fixed !important;
    top: 10% !important;
    left: 5% !important;
    right: 5% !important;
    bottom: 10% !important;
    width: 90% !important;
    max-width: none !important;
    max-height: 80vh !important;
    border-radius: 12px;
    overflow: hidden;
    z-index: 999999 !important;
}

.iti--fullscreen-popup .iti__country-list {
    max-height: calc(80vh - 60px) !important;
    overflow-y: auto !important;
}

.iti--fullscreen-popup .iti__country {
    min-height: 48px;
    padding: 12px 16px;
}

/* Global dropdown container when appended to body */
body > .iti--container {
    z-index: 999999 !important;
}

body > .iti--container .iti__country-list {
    z-index: 999999 !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

/* When the dropdown is appended to the document body we must avoid
   using the original 'top: calc(100% + 6px)' (which is relative to the
   original wrapper). Reset top/left so the JS can place the element
   correctly, and ensure it overlays the page instead of expanding it. */
body > .iti--container .iti__country-list {
    background-color: #efefef !important;
    position: absolute !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    min-width: 260px !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
}

/* Ensure the dropdown appended to body looks like the in-place one: no bullets,
   show native flag element or emoji, and make items clickable. */
body > .iti--container .iti__country-list {
    list-style: none !important;
    margin: 8px 0 0 !important;
    padding: 8px 0 !important;
}

body > .iti--container .iti__country {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

body > .iti--container .iti__country:hover,
body > .iti--container .iti__country.iti__highlight {
    background-color: #f0f6ff !important;
}

/* Show the native flag element (intl-tel-input adds .iti__flag) and our emoji span */
body > .iti--container .iti__flag {
    display: inline-block !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06) !important;
    border-radius: 2px !important;
}

body > .iti--container .rbm-phone-flag-emoji {
    font-size: 18px !important;
    line-height: 1 !important;
    margin-right: 6px !important;
}

body > .iti--container .iti__dial-code {
    margin-left: auto !important;
    color: #666 !important;
    font-weight: 500 !important;
}

/* Make touch targets larger on mobile */
@media (max-width: 768px) {
    body > .iti--container .iti__country {
        min-height: 44px !important;
        padding: 10px 16px !important;
    }
}

.rbm-phone-group .rbm-phone-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.rbm-phone-group .rbm-phone-error {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ebccd1;
    background-color: #f2dede;
    color: #a94442;
    font-size: 13px;
}

.rbm-phone-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.rbm-submit-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Primary color button - uses WordPress theme primary color */
.primary-color-button {
    background-color: var(--e-global-color-primary, #0073aa);
}

.primary-color-button:hover {
    background-color: var(--e-global-color-primary-dark, #005177);
    filter: brightness(90%);
}

.rbm-submit-button:hover {
    background-color: #005177;
}

.rbm-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.rbm-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
}

.rbm-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.rbm-pending {
    background-color: #fcf8e3;
    color: #8a6d3b;
    border: 1px solid #faebcc;
}

.rbm-error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.rbm-loading {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

/* Flatpickr customization */
.flatpickr-calendar {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 99999 !important; /* Assicura che sia sopra i popup */
}

/* Flatpickr nei popup - z-index ancora più alto */
.popup .flatpickr-calendar,
.modal .flatpickr-calendar,
.elementor-popup-modal .flatpickr-calendar {
    z-index: 999999 !important;
}

/* Prevenzione eventi per elementi flatpickr */
.flatpickr-calendar,
.flatpickr-calendar * {
    pointer-events: auto !important;
}

/* Assicura che il campo data nei popup non chiuda il popup */
.popup .rbm-date-picker,
.modal .rbm-date-picker,
.elementor-popup-modal .rbm-date-picker {
    position: relative;
    z-index: 1000;
}

.flatpickr-day.selected {
    background: #0073aa;
    border-color: #0073aa;
}

.flatpickr-day.selected:hover {
    background: #005177;
    border-color: #005177;
}

.flatpickr-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Full days styling - visible normally, just not selectable */
.flatpickr-day.rbm-day-full {
    position: relative;
    cursor: pointer !important; /* Keep normal cursor */
}

.flatpickr-day.rbm-day-full:hover {
    background-color: #e6e6e6 !important; /* Normal hover effect */
}

/* Full time slots styling */
.rbm-time-select option.rbm-slot-full {
    color: #999;
    background-color: #f5f5f5;
    font-style: italic;
}

/* ========================================
   CONDITIONAL LOGIC
   ======================================== */

/* Required field indicator */
.rbm-form-group label.rbm-required::after,
.elementor-field-group label.rbm-required::after {
    content: ' *';
    color: #d00;
    font-weight: bold;
}

/* Hidden field animation */
.rbm-form-group.rbm-conditional-hidden,
.elementor-field-group.rbm-conditional-hidden {
    display: none;
}

/* Conditional field indicator in admin */
.rbm-conditional-indicator {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #e8f4f8;
    color: #0073aa;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsive styles */
@media (max-width: 768px) {
    .rbm-booking-form {
        padding: 15px;
    }

    .rbm-form-group-half {
        flex: 0 0 100%;
        margin-bottom: 15px;
    }

    .rbm-form-group input[type="text"],
    .rbm-form-group input[type="email"],
    .rbm-form-group input[type="tel"],
    .rbm-form-group input[type="date"],
    .rbm-form-group input[type="time"],
    .rbm-form-group select,
    .rbm-form-group textarea {
        font-size: 14px;
    }

    .rbm-submit-button {
        width: 100%;
        padding: 10px;
    }
}

/* Restaurant Booking Manager - Frontend Styles */

/* Availability Status Container */
.rbm-availability-status {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.5;
    animation: rbm-fade-in 0.3s ease-out;
}

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

/* Status Level Colors */
.rbm-availability-status.info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.rbm-availability-status.success {
    background-color: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.rbm-availability-status.warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.rbm-availability-status.error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Availability Message */
.rbm-availability-message {
    font-weight: 600;
    margin-bottom: 10px;
}

.rbm-availability-message:last-child {
    margin-bottom: 0;
}

/* Tolerance Information */
.rbm-tolerance-info {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.rbm-tolerance-info h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.rbm-tolerance-info ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
}

.rbm-tolerance-info li {
    margin-bottom: 5px;
}

.rbm-tolerance-info p {
    margin: 10px 0 0 0;
    font-style: italic;
    color: #666;
}

/* Contact Suggestions */
.rbm-contact-suggestions {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.rbm-contact-suggestions h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
}

.rbm-contact-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rbm-contact-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.rbm-contact-button:hover {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
}

.rbm-contact-button.phone {
    background-color: #22c55e;
}

.rbm-contact-button.phone:hover {
    background-color: #16a34a;
}

.rbm-contact-button.email {
    background-color: #3b82f6;
}

.rbm-contact-button.email:hover {
    background-color: #2563eb;
}

/* Submit Button States */
.rbm-submit-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #007cba;
    color: #ffffff;
    min-width: 120px;
}

.rbm-submit-button:hover:not(:disabled) {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.rbm-submit-button:disabled,
.rbm-submit-button.disabled {
    background-color: #6c757d;
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

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

.rbm-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.rbm-form-group input,
.rbm-form-group select,
.rbm-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.rbm-form-group input:focus,
.rbm-form-group select:focus,
.rbm-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Input Field Classes */
.rbm-date-picker,
.rbm-time-select,
.rbm-people-input {
    transition: all 0.2s ease;
}

.rbm-date-picker:focus,
.rbm-time-select:focus,
.rbm-people-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Loading States */
.rbm-availability-status.info .rbm-availability-message {
    position: relative;
}

.rbm-availability-status[data-type="checking"] .rbm-availability-message::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #2196f3;
    border-top-color: transparent;
    border-radius: 50%;
    animation: rbm-spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .rbm-availability-status {
        padding: 12px;
        font-size: 13px;
    }
    
    .rbm-contact-options {
        flex-direction: column;
    }
    
    .rbm-contact-button {
        text-align: center;
        justify-content: center;
    }
    
    .rbm-tolerance-info,
    .rbm-contact-suggestions {
        padding: 10px;
    }
    
    .rbm-tolerance-info ul {
        padding-left: 16px;
    }
    
    .rbm-tolerance-info li {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .rbm-availability-status {
        margin: 10px 0;
        padding: 10px;
        font-size: 12px;
    }
    
    .rbm-tolerance-info h4,
    .rbm-contact-suggestions h4 {
        font-size: 13px;
    }
    
    .rbm-tolerance-info li {
        font-size: 11px;
    }
}

/* Restaurant Booking Manager - Frontend Styles */

/* Base form styling */
.rbm-booking-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    line-height: 1.6;
}

/* Popup mode optimizations */
.rbm-elementor-widget .rbm-booking-form,
.popup .rbm-booking-form,
.modal .rbm-booking-form {
    max-width: none;
    margin: 0;
    padding: 15px;
}

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

.rbm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Form row for date/time */
.rbm-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.rbm-form-group-half {
    flex: 1;
    min-width: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rbm-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .rbm-form-group-half {
        min-width: auto;
    }
    
    .rbm-booking-form {
        padding: 15px 10px;
    }
}

/* Input styling */
.rbm-booking-form input[type="text"],
.rbm-booking-form input[type="email"],
.rbm-booking-form input[type="tel"],
.rbm-booking-form input[type="number"],
.rbm-booking-form select,
.rbm-booking-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.rbm-booking-form input:focus,
.rbm-booking-form select:focus,
.rbm-booking-form textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Disabled state for time select */
.rbm-booking-form select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Submit button */
.rbm-submit-button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rbm-submit-button:hover:not(:disabled) {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.rbm-submit-button:disabled,
.rbm-submit-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Primary color button variant */
.primary-color-button {
    background-color: var(--primary-color, #007cba);
}

.primary-color-button:hover:not(:disabled) {
    background-color: var(--primary-color-hover, #005a87);
}

/* Message styling */
.rbm-message {
    margin-top: 20px;
}

.rbm-success {
    padding: 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 6px;
    margin-bottom: 15px;
}

.rbm-pending {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 6px;
    margin-bottom: 15px;
}

.rbm-error {
    padding: 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 6px;
    margin-bottom: 15px;
}

.rbm-loading {
    padding: 15px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}

/* Availability status styling */
.rbm-availability-status {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

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

.rbm-availability-status.success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.rbm-availability-status.warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.rbm-availability-status.error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.rbm-availability-status.info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.rbm-availability-message {
    font-weight: 600;
    margin-bottom: 10px;
}

.rbm-availability-message:last-child {
    margin-bottom: 0;
}

/* Tolerance info styling */
.rbm-tolerance-info {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.rbm-tolerance-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.rbm-tolerance-info ul {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.rbm-tolerance-info li {
    margin-bottom: 5px;
    font-size: 14px;
}

/* Contact suggestions styling */
.rbm-contact-suggestions {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.rbm-contact-suggestions h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.rbm-contact-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rbm-contact-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rbm-contact-button:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.rbm-contact-button.phone {
    background-color: #28a745;
}

.rbm-contact-button.phone:hover {
    background-color: #218838;
}

.rbm-contact-button.email {
    background-color: #6f42c1;
}

.rbm-contact-button.email:hover {
    background-color: #5a32a3;
}

/* Radio and checkbox styling */
.rbm-radio-label,
.rbm-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: normal !important;
    cursor: pointer;
}

.rbm-radio-label input,
.rbm-checkbox-label input {
    width: auto !important;
    margin-right: 10px;
    margin-bottom: 0;
}

/* Flatpickr customizations */
.flatpickr-input {
    cursor: pointer;
}

.flatpickr-input:read-only {
    background-color: white;
}

/* Popup specific optimizations */
.popup .rbm-booking-form,
.modal .rbm-booking-form,
.elementor-popup-modal .rbm-booking-form {
    font-size: 14px;
}

.popup .rbm-form-group,
.modal .rbm-form-group,
.elementor-popup-modal .rbm-form-group {
    margin-bottom: 15px;
}

.popup .rbm-submit-button,
.modal .rbm-submit-button,
.elementor-popup-modal .rbm-submit-button {
    padding: 12px 25px;
    font-size: 15px;
}

.popup .rbm-availability-status,
.modal .rbm-availability-status,
.elementor-popup-modal .rbm-availability-status {
    margin: 15px 0;
    padding: 12px;
    font-size: 13px;
}

/* Ensure proper z-index for Flatpickr in popups */
.popup .flatpickr-calendar,
.modal .flatpickr-calendar,
.elementor-popup-modal .flatpickr-calendar {
    z-index: 99999 !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .rbm-booking-form {
        color: #e0e0e0;
    }
    
    .rbm-form-group label {
        color: #e0e0e0;
    }
    
    .rbm-booking-form input,
    .rbm-booking-form select,
    .rbm-booking-form textarea {
        background-color: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .rbm-booking-form input:focus,
    .rbm-booking-form select:focus,
    .rbm-booking-form textarea:focus {
        border-color: #007cba;
        background-color: #333;
    }
}

/* WhatsApp Button Styling */
.rbm-whatsapp-submit-button {
    background: #25D366 !important;
    color: white !important;
    padding: 12px 24px !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3) !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
    font-size: 16px !important;
    min-height: 50px !important;
}

.rbm-whatsapp-submit-button:hover {
    background: #128C7E !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4) !important;
}

.rbm-whatsapp-submit-button:focus {
    outline: 2px solid #25D366 !important;
    outline-offset: 2px !important;
}

/* Rimuoviamo i vecchi stili WhatsApp non più necessari */
.rbm-whatsapp-button {
    display: none !important;
}

.rbm-whatsapp-link {
    display: none !important;
}

.rbm-debug-info {
    font-size: 0.9em;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

/* Conditional Logic - Hide fields by default until evaluated */
.rbm-form-group.rbm-has-conditional-logic-show,
.elementor-field-group.rbm-has-conditional-logic-show {
    display: none;
}

.rbm-form-group.rbm-hidden,
.elementor-field-group.rbm-hidden {
    display: none !important;
}

/* Smooth transitions for show/hide */
.rbm-form-group,
.elementor-field-group {
    transition: opacity 0.3s ease;
}

/* Print styles */
@media print {
    .rbm-booking-form {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .rbm-submit-button {
        display: none;
    }
    
    .rbm-availability-status {
        box-shadow: none;
        border: 1px solid #ccc;
    }
} 