@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --benencia-primary: #0046be;
    --benencia-primary-hover: #003796;
    --benencia-accent: #e91e63;
    --benencia-text: #1a1a1a;
    --benencia-text-light: #666666;
    --benencia-bg: #ffffff;
    --benencia-border: #e2e8f0;
    --benencia-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --benencia-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --benencia-radius: 12px;
    --benencia-radius: 12px;
    --benencia-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base resets for the container */
.benencia-booking-container {
    font-family: var(--benencia-font);
    color: var(--benencia-text);
    line-height: 1.4;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    /* Reduced base */
}

.benencia-booking-container * {
    box-sizing: border-box;
}

/* Widget Styling */
.benencia-widget {
    max-width: 380px;
    /* Slightly smaller */
    background: var(--benencia-bg);
    border: 1px solid var(--benencia-border);
    border-radius: var(--benencia-radius);
    padding: 20px;
    box-shadow: var(--benencia-shadow);
    margin: 20px 0;
}

.benencia-full {
    max-width: 1000px;
    margin: 20px auto;
}

/* Controls */
.benencia-controls {
    margin-bottom: 24px;
}

.benencia-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Toggle Switch Premium Look */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin: 0 !important;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background-color: var(--benencia-primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Select Styling */
.benencia-month-filter select {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 12px 16px !important;
    border: 1px solid var(--benencia-border) !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    font-size: 14px !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* Cards */
.benencia-booking-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--benencia-border);
    gap: 12px;
}

.benencia-widget .benencia-booking-card {
    flex-direction: column;
    align-items: flex-start;
}

.benencia-card-details {
    flex: 1;
}

.benencia-date-info {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.benencia-status-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.status-badge.disponible {
    color: #059669;
    font-weight: 600;
}

.spots-left {
    color: var(--benencia-text-light);
}

.benencia-promo-badge {
    background: var(--benencia-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.05em;
    line-height: 1;
}

.benencia-price-info {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
}

.benencia-price-info .price-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--benencia-primary);
    line-height: 1;
}

.benencia-price-suffix {
    font-size: 13px;
    color: var(--benencia-text-light);
    font-weight: 400;
}

/* Qty Selector - ABSOLUTE OVERRIDE */
.benencia-qty-selector {
    display: flex !important;
    align-items: center !important;
    border: 1px solid var(--benencia-border) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    height: 32px !important;
    /* Smaller height */
    width: fit-content !important;
    background: white !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    padding: 0 !important;
    margin-bottom: 0px !important;
    /* Managed by row if multiple */
}

.benencia-qty-selector .qty-btn {
    width: 28px !important;
    /* Smaller width */
    height: 32px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: var(--benencia-text-light) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    transition: all 0.2s !important;
    user-select: none !important;
    box-shadow: none !important;
}

.benencia-qty-selector .qty-btn:hover {
    background: #f1f5f9 !important;
    color: var(--benencia-primary) !important;
}

.benencia-qty-selector .qty-input {
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    border-left: 1px solid var(--benencia-border) !important;
    border-right: 1px solid var(--benencia-border) !important;
    text-align: center !important;
    font-weight: 600 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 13px !important;
    background: white !important;
    color: var(--benencia-text) !important;
    appearance: textfield !important;
}

/* --- New Person Selector (Mocking Screenshot) --- */
.benencia-people-dropdown-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.benencia-people-trigger {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.benencia-people-trigger:hover,
.benencia-people-trigger.active {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.benencia-people-summary-text {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--benencia-text);
}

.benencia-trigger-arrow {
    font-size: 16px;
    color: var(--benencia-text-light);
    transition: transform 0.2s;
}

.benencia-people-trigger.active .benencia-trigger-arrow {
    transform: rotate(180deg);
}

.benencia-people-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--benencia-border);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    /* Above other elements */
    margin-top: 8px;
    padding: 16px;
}

.benencia-people-dropdown-content.show {
    display: block;
}

.benencia-person-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.benencia-person-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.benencia-person-info {
    display: flex;
    flex-direction: column;
}

.person-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--benencia-text);
}

.person-desc {
    font-size: 13px;
    color: var(--benencia-text-light);
    margin-top: 2px;
}

/* Circular Buttons UI */
.benencia-qty-selector.circular {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
    gap: 12px !important;
}

.qty-btn.circular {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    color: var(--benencia-primary) !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
}

.qty-btn.circular:hover {
    border-color: var(--benencia-primary) !important;
    background: #f8fafc !important;
}

.benencia-qty-selector.circular .qty-input {
    width: 30px !important;
    border: none !important;
    background: transparent !important;
    font-size: 16px !important;
    color: var(--benencia-text) !important;
    padding: 0 !important;
    text-align: center !important;
}

/* Book Button */
.benencia-btn-book {
    background: var(--benencia-primary) !important;
    color: white !important;
    text-decoration: none !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
    flex: none !important;
    min-width: 100px !important;
    border: none !important;
    box-shadow: none !important;
}

.benencia-btn-book:hover {
    background: var(--benencia-primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.benencia-widget .benencia-card-action {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.benencia-btn-outline {
    width: 100% !important;
    background: transparent !important;
    border: 2px solid var(--benencia-primary) !important;
    color: var(--benencia-primary) !important;
    padding: 12px 20px !important;
    border-radius: 30px !important;
    /* Rounded like the screenshot */
    font-weight: 700 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin-top: 20px !important;
    text-transform: none !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.benencia-btn-outline:hover {
    background: var(--benencia-primary) !important;
    color: white !important;
}

/* --- MODAL STYLES (CRITICAL FIX) --- */
.benencia-modal-overlay {
    display: none !important;
    position: fixed !important;
    z-index: 100000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.benencia-modal-overlay.show {
    display: flex !important;
    opacity: 1;
}

.benencia-modal-container {
    background: white;
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: var(--benencia-shadow-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.benencia-modal-overlay.show .benencia-modal-container {
    transform: scale(1);
}

.benencia-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: var(--benencia-text-light);
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.benencia-modal-content {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.benencia-modal-sidebar {
    width: 320px;
    padding: 40px;
    border-right: 1px solid var(--benencia-border);
    background: #f8fafc;
    flex-shrink: 0;
}

.benencia-modal-sidebar h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 30px !important;
    color: var(--benencia-text) !important;
    line-height: 1.2 !important;
}

.benencia-modal-main {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.benencia-month-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--benencia-border);
    color: var(--benencia-text);
}

.benencia-items-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.benencia-items-group .benencia-booking-card {
    border: 1px solid var(--benencia-border);
    padding: 20px;
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
}

.benencia-items-group .benencia-card-action {
    width: 100%;
    flex-direction: row;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benencia-loading-text {
    text-align: center;
    padding: 40px;
    color: var(--benencia-text-light);
}

/* Responsive */
@media (max-width: 900px) {
    .benencia-modal-content {
        flex-direction: column;
    }

    .benencia-modal-sidebar {
        width: 100%;
        padding: 30px;
        border-right: none;
        border-bottom: 1px solid var(--benencia-border);
    }

    .benencia-modal-main {
        padding: 30px;
    }
}

/* --- Dynamic Total Price --- */
.benencia-dynamic-total {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--benencia-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.benencia-dynamic-total .total-label {
    font-size: 14px;
    color: var(--benencia-text-light);
    font-weight: 500;
    text-transform: uppercase;
}

.benencia-inputs-group {
    flex: 1;
    margin-right: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- PREMIUM TIME SELECTOR --- */
.benencia-time-wrapper {
    margin-bottom: 12px;
    width: 100%;
}

select.benencia-time-select {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid var(--benencia-border) !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--benencia-primary) !important;
    appearance: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230046be'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

select.benencia-time-select:hover {
    border-color: var(--benencia-primary) !important;
    background-color: #fff !important;
}

select.benencia-time-select:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 70, 190, 0.2) !important;
    border-color: var(--benencia-primary) !important;
}

/* --- VALIDATION ERROR --- */
.benencia-validation-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: benenciaShake 0.4s ease-in-out;
}

.benencia-validation-error::before {
    content: "⚠️";
    font-size: 14px;
}

@keyframes benenciaShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* --- TOAST NOTIFICATIONS --- */
.benencia-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benencia-toast {
    background: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.benencia-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.benencia-toast.error {
    background: #ef4444;
}

.benencia-toast-icon {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* =====================================================
   BENENCIA CALENDAR CLEAN (BCC) STYLES
   YITH-Inspired Clean Design
   ===================================================== */

.bcc-form {
    font-family: var(--benencia-font);
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 450px;
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.bcc-form.bcc-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Header */
.bcc-header {
    margin-bottom: 24px;
}

.bcc-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

/* Discount Alert */
.bcc-discount-alert {
    background: #f0f9ff;
    border-left: 4px solid #0046be;
    padding: 12px 16px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
}

.bcc-alert-badge {
    display: block;
    font-weight: 700;
    color: #0046be;
    font-size: 14px;
    margin-bottom: 4px;
}

.bcc-alert-text {
    font-size: 13px;
    color: #374151;
}

.bcc-alert-text strong {
    color: #059669;
}

/* Fields */
.bcc-field {
    margin-bottom: 20px;
}

.bcc-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* Input Wrapper */
.bcc-input-wrapper {
    position: relative;
}

.bcc-date-input {
    width: 100%;
    padding: 14px 16px !important;
    padding-right: 44px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a2e !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.bcc-date-input:focus {
    outline: none !important;
    border-color: #0046be !important;
    box-shadow: 0 0 0 3px rgba(0, 70, 190, 0.1) !important;
}

.bcc-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

/* Select Wrapper */
.bcc-select-wrapper {
    position: relative;
}

.bcc-time-select {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a2e !important;
    background: #ffffff !important;
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
}

.bcc-time-select:focus {
    outline: none !important;
    border-color: #0046be !important;
}

.bcc-select-check {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-weight: bold;
    display: none;
}

/* Duration */
.bcc-duration-value {
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
}

/* Persons Grid - YITH Style (side by side) */
.bcc-persons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.bcc-person-field {
    display: flex;
    flex-direction: column;
}

.bcc-person-field .bcc-label {
    margin-bottom: 8px;
}

.bcc-person-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    background: #ffffff !important;
    text-align: left !important;
    -moz-appearance: textfield !important;
}

.bcc-person-input::-webkit-outer-spin-button,
.bcc-person-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bcc-person-input:focus {
    outline: none !important;
    border-color: #0046be !important;
    box-shadow: 0 0 0 3px rgba(0, 70, 190, 0.1) !important;
}

/* Simple persons (single input) */
.bcc-persons-simple {
    max-width: 100px;
}

/* Price Box */
.bcc-price-box {
    background: #fffbeb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.bcc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bcc-price-row span:first-child {
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

.bcc-total-price {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #0046be !important;
}

.bcc-total-price small {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-left: 4px;
}

/* Submit Button */
.bcc-submit-btn {
    width: 100% !important;
    padding: 16px 24px !important;
    background: #0046be !important;
    color: white !important;
    border: none !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.bcc-submit-btn:hover:not(:disabled) {
    background: #003d9e !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 70, 190, 0.3) !important;
}

.bcc-submit-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Messages */
.bcc-messages {
    margin-top: 16px;
}

.bcc-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.bcc-msg-success {
    background: #d1fae5;
    color: #065f46;
}

.bcc-msg-error {
    background: #fee2e2;
    color: #991b1b;
}

/* jQuery UI Datepicker Override */
.ui-datepicker {
    font-family: var(--benencia-font) !important;
}

.bcc-unavailable {
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 480px) {
    .bcc-form {
        padding: 20px;
        margin: 10px;
    }

    .bcc-persons-grid {
        grid-template-columns: 1fr;
    }

    .bcc-title {
        font-size: 18px !important;
    }
}

/* Stepper Styles for Calendar Shortcode - REFINED */
.bcc-input-stepper {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 2px !important;
    gap: 0 !important;
    width: fit-content !important;
    background: white !important;
    overflow: hidden !important;
}

.bcc-stepper-btn {
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    background: #f8fafc !important;
    color: var(--benencia-text) !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.bcc-stepper-btn:hover {
    background: var(--benencia-primary) !important;
    color: white !important;
}

.bcc-person-input {
    width: 40px !important;
    height: 32px !important;
    text-align: center !important;
    border: none !important;
    padding: 0 !important;
    font-weight: 600 !important;
    color: var(--benencia-text) !important;
    background: transparent !important;
    margin: 0 !important;
    font-size: 15px !important;
    -moz-appearance: textfield !important;
    border-left: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Remove arrows chrome/safari */
.bcc-person-input::-webkit-outer-spin-button,
.bcc-person-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Person Field Layout Override */
.bcc-person-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.bcc-persons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}

/* jQuery UI Datepicker Theme Override - Scoped to avoid leaking */
.benencia-datepicker-theme#ui-datepicker-div,
.benencia-datepicker-theme.ui-datepicker {
    font-family: var(--benencia-font) !important;
    background: white !important;
    border: 1px solid var(--benencia-border) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: var(--benencia-shadow-lg) !important;
    width: 300px !important;
    z-index: 9999 !important;
}

.benencia-datepicker-theme .ui-datepicker-header {
    background: var(--benencia-primary) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 8px 0 !important;
    margin-bottom: 8px !important;
}

.benencia-datepicker-theme .ui-datepicker-title {
    font-weight: 700 !important;
    font-size: 15px !important;
    text-transform: capitalize !important;
}

.benencia-datepicker-theme .ui-datepicker-prev,
.benencia-datepicker-theme .ui-datepicker-next {
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
}

.benencia-datepicker-theme .ui-datepicker-prev span,
.benencia-datepicker-theme .ui-datepicker-next span {
    filter: invert(1) brightness(100) !important;
}

.benencia-datepicker-theme .ui-datepicker-prev:hover,
.benencia-datepicker-theme .ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
}

.benencia-datepicker-theme .ui-datepicker-calendar th {
    color: var(--benencia-text-light) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 8px 0 !important;
}

.benencia-datepicker-theme .ui-datepicker-calendar td {
    padding: 2px !important;
}

/* AVAILABLE DAYS (GREEN) */
.benencia-datepicker-theme .ui-datepicker-calendar td a,
.benencia-datepicker-theme .ui-datepicker-calendar td span {
    border: 1px solid #10b981 !important;
    /* Emerald Green Border */
    background: #ecfdf5 !important;
    /* Light Green Background */
    color: #047857 !important;
    /* Dark Green Text */
    border-radius: 6px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    margin: 0 auto !important;
    text-align: center !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.benencia-datepicker-theme .ui-datepicker-calendar td a:hover {
    background: #10b981 !important;
    /* Emerald Green Hover */
    color: white !important;
}

/* Selected Day */
.benencia-datepicker-theme .ui-datepicker-current-day a {
    background: #10b981 !important;
    /* Emerald Green Selected */
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3) !important;
}

/* Unavailable / Disabled / Blocked (Native & Sync Support) */
.benencia-datepicker-theme .ui-datepicker-calendar td.ui-datepicker-unselectable span,
.benencia-datepicker-theme .ui-datepicker-calendar td.ui-datepicker-unselectable a,
.benencia-datepicker-theme .ui-datepicker-calendar td.benencia-blocked span,
.benencia-datepicker-theme .ui-datepicker-calendar td.benencia-blocked a,
.benencia-datepicker-theme .ui-datepicker-calendar td.bcc-unavailable span,
.benencia-datepicker-theme .ui-datepicker-calendar td.bcc-unavailable a {
    background: #f1f5f9 !important;
    /* Slate 100 */
    color: #94a3b8 !important;
    /* Slate 400 (visible gray) */
    text-decoration: line-through !important;
    opacity: 1 !important;
    /* Full opacity to see the gray clearly */
    cursor: not-allowed !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    /* Light gray border */
    pointer-events: none !important;
}

/* Ensure TD itself handles visual state if empty or specific */
.benencia-datepicker-theme .ui-datepicker-calendar td.benencia-blocked,
.benencia-datepicker-theme .ui-datepicker-calendar td.bcc-unavailable {
    background-color: transparent !important;
    cursor: not-allowed !important;
}

/* Today */
.benencia-datepicker-theme .ui-datepicker-today a {
    border: 1px solid #10b981 !important;
    background: white !important;
    color: #10b981 !important;
}

.benencia-datepicker-theme .ui-datepicker-current-day.ui-datepicker-today a {
    background: #10b981 !important;
    color: white !important;
}