/**
 * Hotel Reserva Bar - Desktop Styles
 * Premium design with glassmorphism and smooth animations
 * Version: 1.0.0
 */

/* ========================================
   CSS Variables
   ======================================== */
   :root {
    /* Colors - Desktop */
    --hrb-bg: #FFFFFF;
    --hrb-ink: #465A50;
    --hrb-ink-light: rgba(70, 90, 80, 0.7);
    --hrb-ink-lighter: rgba(70, 90, 80, 0.5);
    --hrb-divider: rgba(70, 90, 80, 0.15);
    --hrb-btn-bg: #465A50;
    --hrb-btn-hover: #F8AE5C;
    --hrb-btn-text: #FFFFFF;
    --hrb-btn-text-hover: #222222;

    /* Calendar Colors */
    --hrb-cal-selected: #465A50;
    --hrb-cal-selected-text: #FFFFFF;
    --hrb-cal-range: rgba(70, 90, 80, 0.15);
    --hrb-cal-hover: rgba(70, 90, 80, 0.1);
    --hrb-cal-disabled: rgba(70, 90, 80, 0.3);
    --hrb-cal-border: rgba(70, 90, 80, 0.2);

    /* Spacing */
    --hrb-gap: 40px;
    --hrb-padding: 40px;
    --hrb-field-gap: 4px;

    /* Typography */
    --hrb-font-title: 'MinervaModern', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hrb-font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --hrb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hrb-transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --hrb-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --hrb-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --hrb-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Border Radius */
    --hrb-radius-sm: 4px;
    --hrb-radius-md: 8px;
    --hrb-radius-lg: 12px;
    --hrb-radius-xl: 20px;
}

/* ========================================
   Font Loading
   ======================================== */
@font-face {
    font-family: 'MinervaModern';
    src: url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;500;600;700&display=swap');

/* ========================================
   Base Wrapper
   ======================================== */
.hotel-reserva-bar-wrapper {
    position: relative;
    width: 100%;
    font-family: var(--hrb-font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: visible;
    z-index: 1;
}

/* ========================================
   Desktop Reservation Bar
   ======================================== */
.hrb-desktop-bar {
    display: inline-flex;
    align-items: center;
    gap: var(--hrb-gap);
    padding: 0 var(--hrb-padding);
    height: 100px;
    background: var(--hrb-bg);
    border-radius: 0px 30px 0 30px;
    box-shadow: var(--hrb-shadow-md);
    transition: var(--hrb-transition);
}

.hrb-desktop-bar:hover {
    box-shadow: var(--hrb-shadow-lg);
}

/* ========================================
   Title
   ======================================== */
.hrb-title {
    font-family: MinervaModern;
    font-weight: 400;
    font-style: normal;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
    color: var(--hrb-ink);
    white-space: nowrap;
    user-select: none;
    margin-right: 8px;
}

/* Hide mobile bar on desktop */
.hrb-mobile-bar {
    display: none;
}

/* ========================================
   Field Styles
   ======================================== */
.hrb-field {
    display: flex;
    flex-direction: column;
    gap: var(--hrb-field-gap);
    min-width: 140px;
    cursor: pointer;
    transition: var(--hrb-transition-fast);
}

.hrb-field:hover {
    transform: translateY(-2px);
}

.hrb-field-coupon {
    cursor: pointer;
}

.hrb-field-coupon:hover {
    transform: translateY(-2px);
}

/* ========================================
   Label Styles
   ======================================== */
.hrb-label {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    cursor: pointer;
}

.hrb-label-text {
    font-family: 'Quicksand', var(--hrb-font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0%;
    color: #465A50;
}

/* ========================================
   Icon Styles
   ======================================== */
.hrb-icon {
    flex-shrink: 0;
    color: var(--hrb-ink);
    transition: var(--hrb-transition-fast);
}

.hrb-icon-calendar,
.hrb-icon-user,
.hrb-icon-coupon {
    width: 20px;
    height: 20px;
}

.hrb-icon-chevron {
    display: none;
    width: 16px;
    height: 16px;
}

.hrb-field:hover .hrb-icon {
    color: var(--hrb-btn-hover);
}

/* ========================================
   Input Wrapper
   ======================================== */
.hrb-input-wrapper {
    position: relative;
    display: none;
    align-items: center;
    gap: 8px;
    border: none;
}

.hrb-input-wrapper.visible {
    display: flex;
}

/* ========================================
   Input Styles
   ======================================== */
.hrb-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: Quicksand, var(--hrb-font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--hrb-ink);
    outline: none;
    cursor: pointer;
    transition: var(--hrb-transition-fast);
}

.hrb-input::placeholder {
    color: var(--hrb-ink-lighter);
    font-weight: 400;
}

.hrb-field-coupon .hrb-input {
    cursor: text;
}

.hrb-input:focus {
    color: var(--hrb-btn-hover);
}

/* ========================================
   Divider
   ======================================== */
.hrb-divider {
    width: 1px;
    height: 25px;
    background: var(--hrb-divider);
}

/* ========================================
   Search Button
   ======================================== */
.hrb-btn-search {
    width: 160px;
    height: 51px;
    border: none;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #465A50;
    color: #FFFFFF;
    font-family: MinervaModern;
    font-size: 21px;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0px;
    text-align: center;
    text-transform: none;
    padding: 13px 39px;
    cursor: pointer;
    transition: var(--hrb-transition);
    box-shadow: var(--hrb-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hrb-btn-search:hover {
    background: var(--hrb-btn-hover);
    color: var(--hrb-btn-text-hover);
    transform: translateY(-2px);
    box-shadow: var(--hrb-shadow-md);
}

.hrb-btn-search:active {
    transform: translateY(0);
    box-shadow: var(--hrb-shadow-sm);
    background: #465A50;
}

/* ========================================
   Calendar Popup - Desktop
   ======================================== */
.hrb-calendar-popup {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    z-index: 1000;
    width: 640px;
    background: var(--hrb-bg);
    background-color: #FFFFFF;
    border-radius: 0;
    box-shadow: var(--hrb-shadow-lg);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -10px);
    transition: var(--hrb-transition);
    overflow: hidden;
}

.hrb-calendar-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    display: block;
}

/* ========================================
   Calendar Container
   ======================================== */
.hrb-calendar-container {
    position: relative;
    width: 100%;
    background: var(--hrb-bg);
    background-color: #FFFFFF;
    z-index: 1;
}

/* ========================================
   Calendar Header
   ======================================== */
.hrb-calendar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0;
    padding-bottom: 0;
    position: relative;
    background: transparent;
}

.hrb-calendar-months {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: space-between;
    position: relative;
}

.hrb-calendar-month-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 16px;
    position: relative;
}

.hrb-calendar-month-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--hrb-cal-border);
}

.hrb-calendar-month {
    font-family: MinervaModern, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 400;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: var(--hrb-ink);
    text-transform: capitalize;
    width: 100%;
}

.hrb-calendar-month-divider {
    display: none;
}

/* ========================================
   Calendar Navigation
   ======================================== */
.hrb-calendar-nav {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--hrb-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hrb-transition-fast);
}

.hrb-calendar-nav:hover {
    background: var(--hrb-cal-hover);
    color: var(--hrb-btn-hover);
}

.hrb-calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================
   Calendar Body
   ======================================== */
.hrb-calendar-body {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hrb-cal-border);
    position: relative;
    overflow: hidden; /* impede o divisor de ultrapassar o rodapé */
    background: transparent;
}

.hrb-calendar-month-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* ========================================
   Calendar Footer
   ======================================== */
.hrb-calendar-footer {
    padding-top: 20px;
    background: transparent;
}

.hrb-calendar-footer-text {
    font-family: MinervaModern, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #343935;
    margin: 0;
    text-align: left;
}

.hrb-calendar-divider {
    width: 1px;
    position: absolute;
    top: 20px;
    bottom: 16px; /* termina antes do padding/borda inferior */
    left: 50%;
    transform: translateX(-50%);
    background: var(--hrb-cal-border);
    z-index: 1;
}

/* ========================================
   Calendar Grid
   ======================================== */
.hrb-calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: #F8F8F8;
}

/* ========================================
   Calendar Day Names
   ======================================== */
.hrb-calendar-day-name {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    background: #FFFFFF;
    font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 15.6px;
    letter-spacing: 0%;
    text-align: center;
    color: var(--hrb-ink-light);
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* ========================================
   Calendar Day Cell
   ======================================== */
.hrb-calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: transparent;
    font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 15.6px;
    letter-spacing: 0%;
    text-align: center;
    color: var(--hrb-ink);
    cursor: pointer;
    transition: var(--hrb-transition-fast);
    user-select: none;
}

.hrb-calendar-day:hover:not(.disabled):not(.selected) {
    background: var(--hrb-cal-hover);
}

.hrb-calendar-day.disabled {
    color: var(--hrb-cal-disabled);
    cursor: not-allowed;
}

.hrb-calendar-day.selected {
    background: var(--hrb-cal-selected);
    color: var(--hrb-cal-selected-text);
    font-weight: 600;
}

.hrb-calendar-day.in-range {
    background: var(--hrb-cal-range);
}

.hrb-calendar-day.other-month {
    opacity: 0.3;
}

/* ========================================
   Guests Popup - Desktop
   ======================================== */
.hrb-guests-popup {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    z-index: 1000;
    width: 360px;
    background: var(--hrb-bg);
    border-radius: 0;
    box-shadow: var(--hrb-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--hrb-transition);
    /* Posição será calculada dinamicamente via JavaScript */
}

.hrb-guests-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========================================
   Guests Container
   ======================================== */
.hrb-guests-container {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================================
   Guests Row
   ======================================== */
.hrb-guests-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
}

/* Apenas a primeira linha (Adultos) tem borda inferior */
.hrb-guests-row:first-child {
    border-bottom: none;
}

/* ========================================
   Guests Label
   ======================================== */
.hrb-guests-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hrb-guests-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--hrb-ink);
}

.hrb-guests-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: var(--hrb-ink-light);
}

/* ========================================
   Guests Counter
   ======================================== */
.hrb-guests-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.hrb-counter-value {
    min-width: 128px;
    height: 64px;
    padding: 20px 32.8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--hrb-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border: none;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ========================================
   Counter Buttons
   ======================================== */
.hrb-counter-btn {
    width: 80.6px;
    height: 64px;
    padding: 20px 32.8px;
    border: none;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #FFFFFF;
    color: var(--hrb-ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hrb-transition-fast);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hrb-counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================
   Children Ages
   ======================================== */
.hrb-children-ages {
    margin-top: 16px;
}

.hrb-children-ages-title {
    font-family: 'Quicksand', var(--hrb-font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0%;
    color: #465A50;
    margin: 0 0 12px 0;
    text-align: center;
}

.hrb-child-age-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    width: 100%;
}

.hrb-child-age-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--hrb-ink);
    flex: 1;
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrb-child-age-select {
    flex: 1;
    min-width: 0;
    width: auto;
    min-width: 140px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--hrb-cal-border);
    border-radius: var(--hrb-radius-sm);
    background: var(--hrb-bg);
    font-family: var(--hrb-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--hrb-ink);
    cursor: pointer;
    transition: var(--hrb-transition-fast);
}

.hrb-child-age-select:hover {
    border-color: var(--hrb-ink);
}

.hrb-child-age-select:focus {
    outline: none;
    border-color: var(--hrb-btn-hover);
    box-shadow: 0 0 0 3px rgba(248, 174, 92, 0.1);
}

/* ========================================
   Responsive - Tablet
   ======================================== */
@media (max-width: 1024px) {
    .hrb-desktop-bar {
        gap: 24px;
        padding: 0 24px;
    }

    .hrb-field {
        min-width: 120px;
    }

    .hrb-btn-search {
        width: 130px;
        font-size: 18px;
    }
}

/* ========================================
   Responsive - Hide Desktop on Mobile
   ======================================== */
@media (max-width: 768px) {

    .hrb-desktop-bar,
    .hrb-calendar-popup,
    .hrb-guests-popup {
        display: none !important;
    }

    .hrb-mobile-bar {
        display: flex;
    }
}

/* ========================================
   Accessibility
   ======================================== */
.hrb-input:focus-visible,
.hrb-btn-search:focus-visible,
.hrb-calendar-nav:focus-visible,
.hrb-counter-btn:focus-visible {
    outline: 2px solid var(--hrb-btn-hover);
    outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {

    .hrb-calendar-popup,
    .hrb-guests-popup,
    .hrb-mobile-modal {
        display: none !important;
    }
}

/* ========================================
   Animation Keyframes
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.hrb-hidden {
    display: none !important;
}

.hrb-visible {
    display: block !important;
}

.hrb-no-scroll {
    overflow: hidden;
}