/* ============================================================
   TocToc Beds24 API Sync — Frontend Styles
   ============================================================ */

.toctoc-b24-status {
    margin-bottom: 20px;
}

.toctoc-b24-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.toctoc-b24-status--available .toctoc-b24-badge {
    background-color: #e6ffec;
    color: #1a6605;
    border: 1px solid #1a6605;
}

.toctoc-b24-status--unavailable .toctoc-b24-badge {
    background-color: #fff0f0;
    color: #c00;
    border: 1px solid #c00;
}

.toctoc-b24-inline-status {
    font-weight: 600;
}

.toctoc-b24-inline-status.toctoc-b24-status--available { color: #1a6605; }
.toctoc-b24-inline-status.toctoc-b24-status--unavailable { color: #c00; }

.toctoc-b24-calendar-wrapper {
    margin-top: 30px;
    max-width: 900px;
}

.toctoc-b24-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.toctoc-b24-nav-label {
    font-weight: 600;
    font-size: 16px;
    color: #444;
}

.toctoc-b24-months-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.toctoc-b24-calendar-card {
    flex: 1;
    min-width: 320px;
    max-width: 400px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.toctoc-b24-calendar-header h4 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 18px;
    color: #333;
    text-transform: capitalize;
}

.toctoc-b24-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #f0f0f0;
    border-radius: 50%;
    text-decoration: none !important;
    color: #333 !important;
    font-weight: bold;
    transition: background 0.2s;
}

.toctoc-b24-nav-btn:hover {
    background: #30ab95;
    color: #fff !important;
}

.toctoc-b24-calendar-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 4px !important;
    table-layout: fixed !important;
    user-select: none !important; /* Evitar selección de texto al arrastrar */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.toctoc-b24-calendar-table th {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding-bottom: 8px;
    font-weight: normal;
}

.toctoc-b24-calendar-table td.toctoc-b24-day {
    text-align: center;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.2s;
    border: none;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--empty { background: transparent; }

.toctoc-b24-calendar-table td.toctoc-b24-day--available {
    background-color: #f1fcf9 !important;
    color: #1a6605 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1px solid #e0f2f1 !important;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--available:hover {
    background-color: #30ab95 !important;
    color: #fff !important;
    transform: scale(1.05) !important;
    z-index: 2 !important;
    position: relative !important;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--blocked {
    background-color: #fff8f8 !important;
    color: #ccacac !important;
    text-decoration: line-through !important;
    opacity: 0.6 !important;
    cursor: default !important;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--past {
    background-color: #f8f8f8 !important;
    color: #ddd !important;
    cursor: default !important;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--today {
    box-shadow: inset 0 0 0 2px #30ab95 !important;
    position: relative !important;
    font-weight: bold !important;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--selected {
    background-color: #218c74 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 0 !important;
}

.toctoc-b24-calendar-table td.toctoc-b24-day--in-range {
    background-color: rgba(33, 140, 116, 0.15) !important;
    color: #218c74 !important;
    border-radius: 0 !important;
}

.toctoc-b24-calendar-legend {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.toctoc-b24-calendar-legend .toctoc-b24-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toctoc-b24-calendar-legend .toctoc-b24-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.toctoc-b24-calendar-top-summary {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 20px !important;
    border: 1px solid #e0f2f1 !important;
    border-radius: 12px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
    
    transition: margin 0.3s ease, border-radius 0.3s ease, border 0.3s ease, background 0.3s ease;
    
    /* Default confined width */
    width: 100% !important;
    box-sizing: border-box !important;
}

.toctoc-b24-calendar-top-summary.is-sticky {
    position: fixed !important;
    /* top is dynamically managed by JS */
    left: 0 !important;
    z-index: 9999 !important;
    
    /* Full width edge-to-edge ONLY when sticky */
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 2px solid #30ab95 !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.toctoc-b24-calendar-top-summary.is-sticky .toctoc-b24-summary-prices {
    width: auto !important;
    flex: 1;
    margin-left: 40px !important;
}

.toctoc-b24-summary-placeholder {
    color: #666 !important;
    font-size: 16px !important;
    margin: 0 !important;
    text-align: center !important;
}

.toctoc-b24-calendar-top-summary.is-sticky:has(.toctoc-b24-summary-placeholder) {
    display: none !important;
}

.toctoc-b24-calendar-top-summary.is-sticky .toctoc-b24-summary-placeholder {
    display: none !important;
}

.toctoc-b24-selection-summary {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    max-width: 1108px !important;
    margin: 0 auto !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.toctoc-b24-summary-dates {
    font-size: 16px !important;
    color: #333 !important;
}

.toctoc-b24-summary-prices {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
    margin: 0 !important;
}

.toctoc-b24-unit-price {
    font-size: 14px !important;
    color: #666 !important;
}

.toctoc-b24-total-price {
    font-size: 16px !important;
    color: #333 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.toctoc-b24-total-price strong {
    font-size: 24px !important;
    color: #30ab95 !important;
    display: inline !important;
}

@media (max-width: 767px) {
    .toctoc-b24-selection-summary {
        flex-direction: column !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 10px !important;
    }
    .toctoc-b24-summary-prices {
        justify-content: center !important;
        gap: 15px !important;
        margin: 0 auto !important;
    }
}

.toctoc-b24-box--available { background-color: #f1fcf9; border: 1px solid #1a6605; }
.toctoc-b24-box--blocked { background-color: #fff8f8; border: 1px solid #ccacac; }
.toctoc-b24-box--past { background-color: #f8f8f8; border: 1px solid #ddd; }

/* Habitaciones Page Styles */
.habitacion-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
    height: 100%;
}

.habitacion-card img {
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.habitacion-card img:hover {
    transform: scale(1.02);
}

.toctoc-btn-booking {
    display: inline-block !important;
    background-color: #30ab95 !important;
    color: #fff !important;
    padding: 7px 20px 7px 35px !important;
    border-radius: 2px !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    text-align: left !important;
    margin-top: 20px !important;
    transition: all 0.2s !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    line-height: 22px !important;
    box-shadow: rgba(0,0,0,0.1) 0px -2px 0px 0px inset !important;
    background-image: url('https://toctoc.hanka.es/wp-content/themes/Hotec/assets/images/icon-date.png') !important;
    background-position: 12px 10px !important;
    background-repeat: no-repeat !important;
    font-family: 'Lato', sans-serif !important;
    max-width: fit-content;
}

.toctoc-btn-booking:hover {
    background-color: #218c74 !important;
    color: #fff !important;
    box-shadow: rgba(0,0,0,0.2) 0px -2px 0px 0px inset !important;
}
