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

/* ── VARIABLES ─────────────────────────────────────────────────────────── */
:root {
    --nb-primary:    #0a6ebd;
    --nb-primary-dk: #084f8a;
    --nb-accent:     #f59e0b;
    --nb-success:    #10b981;
    --nb-danger:     #ef4444;
    --nb-bg:         #f0f4f8;
    --nb-white:      #ffffff;
    --nb-text:       #1a202c;
    --nb-muted:      #64748b;
    --nb-border:     #e2e8f0;
    --nb-shadow:     0 4px 24px rgba(10,110,189,.12);
    --nb-radius:     14px;
    --nb-font:       'DM Sans', sans-serif;
    --nb-font-head:  'Playfair Display', serif;
}

.newblue-search-widget * {
    box-sizing: border-box;
    font-family: var(--nb-font);
}

/* ── WIDGET WRAPPER ─────────────────────────────────────────────────────── */
.newblue-search-widget {
    max-width: 960px;
    margin: 0 auto;
}

/* ── SEARCH FORM ────────────────────────────────────────────────────────── */
.newblue-form {
    background: var(--nb-white);
    border-radius: var(--nb-radius);
    box-shadow: var(--nb-shadow);
    padding: 28px 28px 22px;
    border: 1px solid var(--nb-border);
}

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

.newblue-field {
    position: relative;
}

.newblue-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--nb-muted);
    margin-bottom: 6px;
}

.newblue-field input,
.newblue-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--nb-border);
    border-radius: 9px;
    font-size: 14px;
    font-family: var(--nb-font);
    color: var(--nb-text);
    background: var(--nb-bg);
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.newblue-field input:focus,
.newblue-field select:focus {
    outline: none;
    border-color: var(--nb-primary);
    box-shadow: 0 0 0 3px rgba(10,110,189,.1);
    background: #fff;
}

/* Select arrow */
.nb-select-wrap {
    position: relative;
}
.nb-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nb-muted);
    pointer-events: none;
    font-size: 13px;
}

/* ── AUTOCOMPLETE DESTINO ───────────────────────────────────────────────── */
.nb-destination-wrap {
    position: relative !important;
}

.nb-destination-wrap input {
    padding-left: 38px;
}

.nb-dest-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}

.nb-autocomplete-list {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff;
    border: 1.5px solid var(--nb-primary);
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 99999 !important;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.nb-autocomplete-list.open {
    display: block;
}

.nb-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--nb-text);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .15s;
}

.nb-autocomplete-item:hover,
.nb-autocomplete-item.active {
    background: #e8f4fd;
    color: var(--nb-primary);
}

.nb-autocomplete-item span.nb-dest-region {
    font-size: 11px;
    color: var(--nb-muted);
    margin-left: auto;
}

/* ── BOTÓN BUSCAR ───────────────────────────────────────────────────────── */
.newblue-btn-search {
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-dk));
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--nb-font);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(10,110,189,.3);
    white-space: nowrap;
}

.newblue-btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10,110,189,.4);
}

.newblue-btn-search:active {
    transform: translateY(0);
}

/* ── LOADING ────────────────────────────────────────────────────────────── */
.newblue-loading {
    text-align: center;
    padding: 30px;
    color: var(--nb-muted);
    font-size: 15px;
}

.newblue-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--nb-border);
    border-top-color: var(--nb-primary);
    border-radius: 50%;
    animation: nb-spin .7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes nb-spin { to { transform: rotate(360deg); } }

/* ── ERROR ──────────────────────────────────────────────────────────────── */
.newblue-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9px;
    padding: 14px 18px;
    color: #991b1b;
    font-size: 14px;
    margin: 12px 0;
}

/* ── SECCIÓN TÍTULO ─────────────────────────────────────────────────────── */
.nb-section-title {
    font-family: var(--nb-font-head);
    font-size: 22px;
    color: var(--nb-text);
    margin: 28px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── CALENDARIO ─────────────────────────────────────────────────────────── */
.nb-calendar-wrap {
    background: var(--nb-white);
    border-radius: var(--nb-radius);
    box-shadow: var(--nb-shadow);
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid var(--nb-border);
}

.nb-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-dk));
    color: #fff;
    padding: 16px 24px;
}

.nb-cal-title {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--nb-font-head);
}

.nb-cal-prev, .nb-cal-next {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nb-cal-prev:hover, .nb-cal-next:hover { background: rgba(255,255,255,.3); }
.nb-cal-prev:disabled { opacity: .3; cursor: not-allowed; }

.nb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid var(--nb-border);
}

.nb-cal-dayname {
    background: #f8fafc;
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--nb-muted);
    border-bottom: 1px solid var(--nb-border);
}

.nb-cal-empty { min-height: 68px; background: #fafafa; border: 1px solid #f5f5f5; }

.nb-cal-day {
    min-height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    padding: 6px 4px;
    transition: all .15s;
    cursor: default;
}

.nb-cal-num {
    font-size: 15px;
    font-weight: 600;
    color: var(--nb-text);
    line-height: 1;
}

.nb-cal-price {
    font-size: 10px;
    font-weight: 700;
    color: var(--nb-primary);
    margin-top: 4px;
    background: #e8f4fd;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.nb-cal-past .nb-cal-num { color: #d1d5db; }
.nb-cal-past { background: #fafafa; }

.nb-cal-avail {
    background: #f0fdf4;
    cursor: pointer;
}

.nb-cal-avail:hover {
    background: #dcfce7;
    transform: scale(1.06);
    z-index: 2;
    position: relative;
    box-shadow: 0 4px 12px rgba(16,185,129,.2);
    border-radius: 8px;
}

.nb-cal-avail .nb-cal-num { color: #065f46; }

.nb-cal-selected {
    background: var(--nb-primary) !important;
    border-radius: 8px;
    z-index: 2;
    position: relative;
    box-shadow: 0 4px 14px rgba(10,110,189,.35);
}

.nb-cal-selected .nb-cal-num { color: #fff !important; }
.nb-cal-selected .nb-cal-price { background: rgba(255,255,255,.2); color: #fff !important; }

.nb-cal-noavail .nb-cal-num { color: #d1d5db; }

.nb-cal-legend {
    display: flex;
    gap: 20px;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--nb-border);
    font-size: 12px;
    color: var(--nb-muted);
}

.nb-leg-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.nb-leg-avail  { background: #10b981; }
.nb-leg-noavail { background: #e5e7eb; }

/* ── NOCHES ─────────────────────────────────────────────────────────────── */
.nb-nights-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--nb-border);
    flex-wrap: wrap;
}

.nb-nights-wrap > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--nb-muted);
}

.nb-nights-btn {
    padding: 7px 18px;
    border: 2px solid var(--nb-primary);
    border-radius: 20px;
    background: transparent;
    color: var(--nb-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: var(--nb-font);
}

.nb-nights-btn:hover, .nb-nights-btn.active {
    background: var(--nb-primary);
    color: #fff;
}

/* ── RESULTADOS ─────────────────────────────────────────────────────────── */
.nb-results-title {
    font-size: 15px;
    color: var(--nb-muted);
    margin: 20px 0 14px;
    font-weight: 500;
}

.newblue-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
    align-items: stretch;
}
.newblue-result-card {
    height: 100% !important;
}

.newblue-result-card {
    background: var(--nb-white);
    border-radius: var(--nb-radius);
    border: 1px solid var(--nb-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

.newblue-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.nb-card-top {
    padding: 14px 16px 8px;
    flex: 1;
    min-height: 0;
}

.newblue-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--nb-text);
    margin: 0 0 5px;
    line-height: 1.3;
}

.newblue-card-subtitle {
    font-size: 13px;
    color: var(--nb-muted);
    margin: 3px 0;
}

.nb-card-bottom {
    padding: 12px 18px;
    border-top: 1px solid var(--nb-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.newblue-card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--nb-primary);
    font-family: var(--nb-font-head);
}

.newblue-card-price small {
    font-size: 11px;
    color: var(--nb-muted);
    font-family: var(--nb-font);
    font-weight: 400;
}

.newblue-btn-select {
    background: var(--nb-accent);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--nb-font);
    transition: background .2s, transform .1s;
    white-space: nowrap;
}

.newblue-btn-select:hover {
    background: #d97706;
    transform: scale(1.03);
}

/* ── FORMULARIO RESERVA ─────────────────────────────────────────────────── */
#newblue-booking-container {
    background: var(--nb-white);
    border-radius: var(--nb-radius);
    box-shadow: var(--nb-shadow);
    padding: 28px;
    margin-top: 20px;
    border: 1px solid var(--nb-border);
}

.newblue-passenger-block {
    border: 1.5px solid var(--nb-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    background: #f8fafc;
}

.newblue-passenger-block h4 {
    margin: 0 0 12px;
    color: var(--nb-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.newblue-price-summary {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--nb-primary-dk);
}

.newblue-btn-book {
    background: linear-gradient(135deg, var(--nb-success), #059669);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-family: var(--nb-font);
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(16,185,129,.3);
}

.newblue-btn-book:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16,185,129,.4);
}

/* ── CONFIRMACIÓN ───────────────────────────────────────────────────────── */
.newblue-booking-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: var(--nb-radius);
    padding: 30px;
    text-align: center;
    color: #065f46;
}

.newblue-booking-success h2 {
    font-family: var(--nb-font-head);
    font-size: 26px;
    margin: 0 0 10px;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .newblue-form { padding: 18px; }
    .newblue-form-row { grid-template-columns: 1fr 1fr; }
    .nb-cal-day { min-height: 52px; }
    .nb-cal-price { font-size: 9px; }
    .nb-cal-num { font-size: 13px; }
    .newblue-results-grid { grid-template-columns: 1fr; }
}

/* ── MODAL HOTELES ─────────────────────────────────────────────── */
.nb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.nb-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.nb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--nb-primary);
    color: #fff;
}
.nb-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}
.nb-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.nb-modal-body {
    overflow-y: auto;
    padding: 20px;
}
.nb-hotels-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.nb-hotel-card {
    display: flex;
    gap: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    align-items: center;
    padding: 12px;
}
.nb-hotel-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.nb-hotel-img-placeholder {
    width: 120px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 36px;
    flex-shrink: 0;
}
.nb-hotel-info {
    flex: 1;
}
.nb-hotel-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--nb-text);
}
.nb-hotel-room, .nb-hotel-meal {
    margin: 2px 0;
    font-size: 13px;
    color: var(--nb-muted);
}
.nb-select-hotel {
    flex-shrink: 0;
}
.newblue-btn-hotels {
    background: transparent;
    border: 2px solid var(--nb-accent);
    color: var(--nb-accent);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    height: 42px;
    display: inline-flex;
    align-items: center;
}
.newblue-btn-hotels:hover {
    background: var(--nb-accent);
    color: #fff;
}
.newblue-btn-select {
    height: 42px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.nb-hotel-no-avail {
    opacity: 0.5;
}
.nb-no-avail-tag {
    font-size: 12px;
    color: #999;
    border: 1px solid #ddd;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

