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

/* Reset CSS per prevenire interferenze dal tema */
.bh-calendar-container *,
.bh-calendar-container *::before,
.bh-calendar-container *::after {
    box-sizing: border-box;
}

.bh-instructions {
    padding: 15px;
    background: #f0f8ff;
    border-left: 4px solid #2271b1;
    margin-bottom: 20px;
    border-radius: 4px;
}

.bh-booking-steps {
    position: relative;
}

.bh-step {
    animation: fadeIn 0.3s ease-in;
}

.bh-step h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

/* Calendar Styles */
.bh-calendar-container {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.bh-calendar-container > * {
    max-width: 100%;
}

.bh-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.bh-calendar-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bh-calendar-prev,
.bh-calendar-next {
    background: #2271b1;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bh-calendar-prev:hover,
.bh-calendar-next:hover {
    background: #135e96;
}

.bh-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.bh-calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 10px 0;
    font-size: 14px;
}

.bh-calendar-days {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 5px;
    width: 100%;
}

/* Reset eventuali stili che potrebbero interferire */
.bh-calendar-days * {
    box-sizing: border-box;
}

.bh-calendar-day {
    aspect-ratio: 1 / 1 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    box-sizing: border-box;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Forza dimensioni uniformi per tutte le caselle indipendentemente dalla posizione */
.bh-calendar-day:nth-child(n) {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
}

.bh-calendar-day-number {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.bh-calendar-day-price {
    font-size: 11px;
    color: #2271b1;
    font-weight: 600;
    margin-top: 2px;
}

.bh-calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.bh-calendar-day.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.bh-calendar-day.available:hover {
    background: #e3f2fd;
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34,113,177,0.2);
}

.bh-calendar-day.selected {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.bh-calendar-day.selected .bh-calendar-day-number,
.bh-calendar-day.selected .bh-calendar-day-price {
    color: #fff;
}

/* Regole specifiche per garantire che sabato (6) e domenica (7) abbiano le stesse dimensioni */
.bh-calendar-day:nth-child(7n),
.bh-calendar-day:nth-child(7n+6) {
    aspect-ratio: 1 / 1 !important;
    grid-column: auto !important;
}

/* Forza tutte le caselle ad avere lo stesso comportamento nel grid */
.bh-calendar-days > .bh-calendar-day {
    width: 100%;
    max-width: 100%;
}

.bh-calendar-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    border-radius: 8px;
    display: none;
}

.bh-calendar-loading.active {
    display: flex;
}

.bh-calendar-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bh-selected-date-info {
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    margin-top: 15px;
}

.bh-selected-date-info p {
    margin: 5px 0;
}

.bh-time-slots {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.bh-time-slots h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.bh-time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.bh-time-slot {
    padding: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.bh-time-slot:hover {
    background: #e3f2fd;
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34,113,177,0.2);
}

.bh-time-slot.selected {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.bh-selected-slot-info {
    padding: 15px;
    background: #e8f5e9;
    border-radius: 6px;
    margin-top: 15px;
}

.bh-selected-slot-info p {
    margin: 5px 0;
}

.bh-btn-continue-to-details {
    margin-top: 15px;
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
}

.bh-btn-continue-to-details:hover {
    background: #135e96;
}

/* Form Styles */
.bh-form-fields {
    margin: 20px 0;
}

.bh-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.bh-form-field {
    display: flex;
    flex-direction: column;
}

.bh-form-field-full {
    grid-column: 1 / -1;
}

.bh-form-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.bh-form-field .required {
    color: #d00;
}

.bh-form-field input,
.bh-form-field textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.bh-form-field input:focus,
.bh-form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.bh-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.bh-btn-back,
.bh-btn-continue {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
}

.bh-btn-continue {
    background: #2271b1;
    color: #fff;
    border: none;
}

.bh-btn-continue:hover {
    background: #135e96;
}

/* Summary Styles */
.bh-booking-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.bh-summary-section {
    margin-bottom: 20px;
}

.bh-summary-section:last-child {
    margin-bottom: 0;
}

.bh-summary-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2271b1;
}

.bh-summary-section p {
    margin: 5px 0;
}

/* Error Message */
.bh-error-message {
    padding: 15px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
    margin-top: 15px;
    color: #c62828;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .bh-calendar-container {
        padding: 15px;
    }

    .bh-calendar-day {
        padding: 5px;
    }

    .bh-calendar-day-number {
        font-size: 12px;
    }

    .bh-calendar-day-price {
        font-size: 10px;
    }

    .bh-time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .bh-time-slot {
        min-height: 45px;
        padding: 10px;
        font-size: 14px;
    }

    .bh-form-row {
        grid-template-columns: 1fr;
    }

    .bh-form-actions {
        flex-direction: column;
    }

    .bh-form-actions button {
        width: 100%;
    }
}
