/**
 * B&B Rooms CSS - Card Layout
 * Blue Apulia Child Theme
 * 
 * Stili per le card delle camere B&B con layout orizzontale ottimizzato
 */

/* =============================================================================
   SEZIONE CAMERE B&B
   ============================================================================= */

.bb-rooms-section {
    margin: 2rem 0;
}

.bb-rooms-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Lista camere (layout verticale) */
.bb-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Card Camera - Layout Orizzontale */
.bb-room-card-horizontal {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    min-height: 280px; /* Altezza minima invece di max-height */
}

.bb-room-card-horizontal:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* COLONNA SINISTRA: Galleria Foto */
.room-gallery-column {
    flex: 0 0 auto;
    width: 420px; /* Larghezza fissa */
    height: 280px; /* Altezza fissa uguale alla card */
    aspect-ratio: 4 / 3; /* Proporzione 4:3 */
    position: relative;
    background: #f5f5f5;
}

.room-gallery-slider {
    width: 100%;
    height: 100%;
    min-height: unset;
}

.room-gallery-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.room-gallery-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-gallery-slider .swiper-button-next,
.room-gallery-slider .swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.room-gallery-slider .swiper-button-next:after,
.room-gallery-slider .swiper-button-prev:after {
    font-size: 18px;
}

.room-gallery-slider .swiper-pagination {
    bottom: 10px;
}

.room-gallery-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}

.room-gallery-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background: #007bff;
}

/* Placeholder quando non ci sono foto */
.room-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.room-no-image span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.room-no-image p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

/* COLONNA DESTRA: Informazioni - LAYOUT ORIZZONTALE */
.room-info-column {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 280px; /* Altezza fissa uguale alla gallery */
    overflow-y: auto; /* Scroll se necessario */
}

.room-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #222;
    line-height: 1.3;
}

.room-description {
    color: #666;
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* Dettagli Camera - LAYOUT ORIZZONTALE */
.room-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: auto;
}

.room-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #444;
    min-width: 120px;
    flex: 0 0 auto;
}

.room-detail-item .icon {
    font-size: 1.1rem;
}

/* Servizi Camera - LAYOUT ORIZZONTALE */
.room-services {
    padding-top: 0.75rem;
    margin-bottom: 0.5rem;
}


.room-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.room-service-tag {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: none;
    color: #3f8bc9;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #3f8bc9;
}

/* Prezzi e Costi - LAYOUT ORIZZONTALE */
.room-pricing {
    margin-top: auto; /* Push al fondo */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.room-price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.price-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3f8bc9;
}

.price-period {
    font-size: 0.9rem;
    color: #666;
}

.room-price-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.price-detail-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #555;
}

.price-detail-item .icon {
    font-size: 1rem;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 992px) {
    .bb-room-card-horizontal {
        flex-direction: column;
        min-height: auto;
    }

    .room-gallery-column {
        flex: none;
        width: 100%;
        height: 300px;
        aspect-ratio: 4 / 3;
    }

    .room-info-column {
        height: auto;
        padding: 1.5rem;
    }

    .room-details {
        flex-direction: column;
    }

    .room-detail-item {
        min-width: 100%;
    }

    .room-pricing {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .bb-rooms-section h2 {
        font-size: 1.5rem;
    }

    .room-title {
        font-size: 1.5rem;
    }

    .room-gallery-column {
        height: 250px;
        aspect-ratio: 4 / 3;
    }

    .room-info-column {
        padding: 1rem;
        gap: 0.75rem;
    }

    .price-amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .room-gallery-column {
        height: 200px;
        aspect-ratio: 4 / 3;
    }

    .room-title {
        font-size: 1.25rem;
    }

    .room-details {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .room-detail-item {
        font-size: 0.85rem;
    }

    .room-service-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .price-amount {
        font-size: 1.3rem;
    }
}

/* =============================================================================
   INFORMAZIONI DINAMICHE - DISPONIBILITÀ E PREZZI
   ============================================================================= */

/* Container per info dinamiche */
.room-dynamic-info {
    padding: 0;
    background: none   ;
    border-radius: 0 ;
    border: none    ;
}

/* Stato iniziale - seleziona date */
.room-dynamic-placeholder {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Loading state */
.room-dynamic-loading {
    margin: 0;
    font-size: 0.9rem;
    color: #007bff;
    text-align: center;
}

/* Camera disponibile - layout prezzo */
.room-available-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.room-available-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.room-price-large {
    font-size: 2rem;
    font-weight: bold;
    color: #2d8a4e;
    white-space: nowrap;
}

.room-period-info {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.3;
}

.room-period-dates {
    color: #666;
}

.room-scarcity-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: #fff3e0;
    color: #e65100;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid #ffe0b2;
}

/* Bottone Seleziona camera */
.room-select-btn {
    padding: 0.5rem 1.5rem;
    background: #3f8bc9;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.room-select-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.room-select-btn.selected {
    background: #28a745;
}

.room-select-btn.selected:hover {
    background: #218838;
}

/* Camera non disponibile */
.room-unavailable-container {
    background: #fef8f8;
    border: 1px solid #e8b4b8;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    text-align: center;
}

.room-unavailable-text {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8b1e3f;
}

/* Errore nel caricamento */
.room-error-container {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    text-align: center;
}

.room-error-text {
    margin: 0;
    font-size: 0.9rem;
    color: #856404;
}

/* Responsive adjustments per info dinamiche */
@media (max-width: 768px) {
    .room-available-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .room-price-large {
        font-size: 1.75rem;
    }

    .room-period-info {
        font-size: 0.875rem;
    }
}

/* =============================================================================
   RIEPILOGO PRENOTAZIONE - BOOKING SUMMARY
   ============================================================================= */

/* Container principale riepilogo */
.booking-summary-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #e7f3ff;
    border-radius: 8px;
    border: 1px solid #4c7291;
}

.booking-summary-container.error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.booking-summary-container.placeholder {
    background: #f8f9fa;
    border-color: #dee2e6;
    text-align: center;
}

/* Titolo riepilogo */
.booking-summary-title {
    margin: 0 0 0.5rem 0;
    color: #4c7291;
    font-size: 1.1rem;
}

/* Date check-in/out */
.booking-summary-date {
    margin: 0;
    font-size: 0.9rem;
}

/* Loading text */
.booking-summary-loading {
    margin: 0.5rem 0 0 0;
    font-size: 0.8rem;
    color: #4c7291;
}

/* Error text */
.booking-summary-error {
    margin: 0;
    font-size: 0.9rem;
    color: #721c24;
}

/* Placeholder text */
.booking-summary-placeholder-text {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Prezzo totale evidenziato */
.booking-price-highlight {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #4c7291;
    text-align: center;
}

.booking-price-amount {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #4c7291;
}

.booking-price-label {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* Dettagli prezzo toggle */
.booking-details-toggle-wrapper {
    margin-top: 1rem;
}

.booking-toggle-btn {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid #7c9cb6;
    border-radius: 6px;
    color: #7c9cb6;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.booking-toggle-btn:hover {
    background: rgba(124, 156, 182, 0.1);
}

.booking-toggle-btn.active {
    background: #7c9cb6;
    color: #fff;
}

/* Dettagli prezzo contenuto */
.booking-price-details {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.booking-price-details.show {
    display: block;
}

/* Breakdown container */
.booking-breakdown {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.booking-breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid #dee2e6;
}

.booking-breakdown-total {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    margin-top: 0.5rem;
    font-size: 1rem;
    border-top: 2px solid #4c7291;
}

.booking-breakdown-total .amount {
    color: #4c7291;
}

/* Responsive per riepilogo */
@media (max-width: 768px) {
    .booking-price-amount {
        font-size: 1.5rem;
    }

    .booking-summary-container {
        padding: 0.875rem;
    }
}

/* =============================================================================
   CARRELLO CAMERE B&B
   ============================================================================= */

/* Container carrello */
.rooms-cart-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #007bff;
}

.rooms-cart-title {
    margin: 0 0 1rem 0;
    color: #007bff;
    font-size: 1.1rem;
    font-weight: 600;
}

.rooms-cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Lista camere nel carrello */
.rooms-cart-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cart-room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.cart-room-info {
    flex: 1;
}

.cart-room-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.cart-room-dates {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.cart-room-price {
    color: #2d8a4e;
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-room-remove {
    padding: 0.25rem 0.75rem;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-room-remove:hover {
    background: #c82333;
}

/* Totale carrello */
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 2px solid #007bff;
    margin-bottom: 1rem;
}

.cart-total-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.cart-total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
}

/* Bottone prenota */
.cart-book-btn {
    width: 100%;
    padding: 1rem;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-book-btn:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.cart-book-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Responsive per carrello */
@media (max-width: 768px) {
    .cart-room-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cart-room-remove {
        align-self: flex-end;
    }

    .cart-total-amount {
        font-size: 1.3rem;
    }
}
