/* Estilos para o fluxo de reserva */
.reserva-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: flex-start; /* Alinha no topo para evitar corte em telas pequenas */
    padding: 20px 0;
}

.reserva-content {
    background-color: #fff;
    margin: 0 auto; /* Removido margin top/bottom para usar o padding do pai */
    padding: 0;
    border-radius: 15px;
    width: 95%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
}

.reserva-header {
    background-color: #073763;
    color: white;
    padding: 20px;
    text-align: center;
}

.reserva-header h2 {
    margin: 0;
    color: white !important;
    font-family: 'Playfair Display', serif;
}

.reserva-body {
    padding: 30px;
    max-height: 65vh; /* Reduzi um pouco para garantir visibilidade do rodapé */
    overflow-y: auto;
    min-height: 300px;
}

.reserva-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    background: #f9f9f9;
}

.close-reserva {
    position: absolute;
    right: 20px;
    top: 15px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Cabin List */
.cabin-item {
    display: flex;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
}

.cabin-item:hover {
    transform: translateY(-5px);
    border-color: #3d85c6;
}

.cabin-item.selected {
    border: 3px solid #3d85c6;
    background-color: #f0f7ff;
}

.cabin-img {
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.cabin-info {
    padding: 15px;
    flex-grow: 1;
}

.cabin-info h3 {
    margin-top: 0;
    color: #073763;
}

.cabin-price {
    font-weight: bold;
    color: #3d85c6;
    font-size: 1.2em;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #073763;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.date-row {
    display: flex;
    gap: 20px;
}

.date-row > div {
    flex: 1;
}

/* Counters */
.guest-counter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.counter-btns {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.counter-btns button {
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.counter-btns button:hover {
    background: #e0e0e0;
}

.counter-btns span {
    padding: 0 20px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

/* Summary */
.summary-box {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #3d85c6;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-total {
    border-top: 2px solid #3d85c6;
    margin-top: 15px;
    padding-top: 15px;
    font-weight: bold;
    font-size: 1.3em;
}

.summary-pix {
    color: #28a745;
    font-weight: bold;
}

/* Pix Section */
.pix-container {
    text-align: center;
    padding: 20px;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: #eee;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
}

.pix-code {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    word-break: break-all;
    font-family: monospace;
    margin: 15px 0;
    border: 1px solid #ddd;
    position: relative;
}

.copy-btn {
    background: #3d85c6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

/* Buttons */
.btn-next, .btn-prev, .btn-finish {
    padding: 12px 25px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
}

.btn-next, .btn-finish {
    background-color: #3d85c6;
    color: white;
}

.btn-prev {
    background-color: #ccc;
    color: #333;
}

.btn-reserva-main {
    background-color: #3d85c6;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s;
    border: 2px solid #3d85c6;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-reserva-main:hover {
    background-color: transparent;
    color: #3d85c6;
    transform: scale(1.02);
}

/* Customização Flatpickr para datas ocupadas */
.flatpickr-day.flatpickr-disabled, 
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 0, 0, 0.5) !important;
    position: relative;
    cursor: not-allowed !important;
}

.flatpickr-day.flatpickr-disabled::after {
    content: "X";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: red;
    font-weight: bold;
    font-size: 1.2em;
    pointer-events: none;
}

.capacity-warning {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.btn-reserva-inline {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 30px;
    padding: 12px !important;
    font-size: 0.9em !important;
}

.cabin-item-wrapper {
    margin-bottom: 20px;
}

.cabin-item.selected {
    border: 3px solid #3d85c6;
    background-color: #f0f7ff;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .reserva-content {
        width: 95%;
        margin: 2% auto;
    }

    .reserva-header h2 {
        font-size: 1.2em !important; /* Texto do cabeçalho menor */
    }

    .reserva-body {
        padding: 15px;
        max-height: 80vh;
    }

    .reserva-body h3 {
        font-size: 1.1em !important; /* Títulos dos passos menores */
        text-align: center;
    }

    .reserva-body p, .reserva-body label {
        font-size: 0.9em !important; /* Textos de apoio menores */
        text-align: center;
    }

    .cabin-info h3 {
        font-size: 1em !important;
        text-align: left;
    }

    .cabin-info p {
        font-size: 0.85em !important;
        text-align: left;
    }

    .cabin-price {
        font-size: 1em !important;
    }

    .cabin-img {
        width: 100%;
        height: 220px; /* Altura um pouco maior para melhor proporção */
        object-fit: cover; /* Garante que a imagem preencha o espaço sem esticar */
        object-position: center;
    }

    .cabin-item {
        flex-direction: column;
        border-radius: 12px; /* Cantos mais arredondados */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Leve sombra para destacar o card */
    }

    .cabin-info {
        padding: 10px;
    }

    .date-row {
        flex-direction: column;
        gap: 10px;
    }

    .reserva-footer {
        flex-direction: column-reverse;
        gap: 10px;
        padding: 15px;
    }

    .reserva-footer button {
        width: 100%;
        padding: 15px; /* Botões maiores para touch */
    }

    .guest-counter {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .counter-btns {
        width: 100%;
        justify-content: space-between;
    }

    .counter-btns button {
        flex: 1;
        padding: 15px;
    }

    .summary-row {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
    }

    .summary-row span {
        font-size: 0.9em;
        color: #666;
    }

    .btn-reserva-main {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* Centralizar e diminuir logo no mobile */
    .cs-widget.cs-image-widget {
        text-align: center !important;
        width: 100% !important;
        flex: 1 !important;
        order: 2 !important; /* Logo no meio */
    }

    .cs-widget.cs-image-widget img {
        max-width: 120px !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Centralizar logo no rodapé */
    footer .cs-widget.cs-image-widget {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    footer .cs-widget.cs-image-widget img {
        margin: 0 auto !important;
    }

    /* Ajuste de fonte para seção Hospedagem Romântica no mobile */
    #3d6afb9b-134e-453d-aa25-9716f7c3884c h2 span span {
        font-size: 28px !important;
    }

    #01866b03-d24d-405e-83a1-2ff0f42abbc1 p span span {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    /* Ajuste de fonte para a seção descritiva no mobile */
    #localizacao-maps h2 {
        font-size: 1.4em !important;
        margin-bottom: 20px !important;
    }

    #localizacao-maps div[style*="font-family: 'Bitter'"] {
        font-size: 0.85em !important;
        line-height: 1.6 !important;
    }

    #localizacao-maps h3 {
        font-size: 1.1em !important;
        margin-top: 30px !important;
    }

    /* Ajustar layout do cabeçalho mobile */
    #c4bb3958-65ae-43c1-9289-fff5bd9b2d99 {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px !important;
        display: flex !important;
    }

    /* Menu mobile no canto esquerdo */
    .cs-nav-toggle-container {
        order: 1 !important;
        margin: 0 !important;
    }

    /* Espaço vazio no canto direito para equilibrar o MENU | LOGO */
    #c4bb3958-65ae-43c1-9289-fff5bd9b2d99::after {
        content: "";
        order: 3;
        width: 40px; /* Mesma largura aproximada do ícone de menu */
    }

    /* Remover botão de reserva do cabeçalho */
    .btn-reserva-header-mobile {
        display: none !important;
    }

    /* Esconder o botão original dentro do menu no mobile se necessário */
    .cs-menu-items .btn-reserva-main {
        display: none !important;
    }
    
    /* Ajuste para o Flatpickr em telas pequenas */
    .flatpickr-calendar.inline {
        width: 100% !important;
        max-width: 320px;
        margin: 0 auto;
    }
}

/* Estilos extras para o calendário inline do usuário */
#userInlinePicker .flatpickr-calendar {
    box-shadow: none;
    background: #1a1a1a;
    border: 1px solid #333;
}

.reserva-page {
    padding-top: 110px;
    padding-bottom: 60px;
}

.reserva-page__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5%;
}

.reserva-page__header {
    text-align: center;
    margin-bottom: 24px;
}

.reserva-page__header h1 {
    font-family: 'Playfair Display', serif;
    color: #073763;
    margin: 0 0 10px;
}

.reserva-page__header p {
    margin: 0;
    color: #4a4a4a;
    font-family: 'Inter', sans-serif;
}

.reserva-page__card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(7,55,99,0.12);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.reserva-page__top {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.reserva-page__field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #073763;
    font-family: 'Inter', sans-serif;
}

.reserva-page__field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: #fff;
}

.reserva-page__selected {
    font-weight: 600;
    color: #3d85c6;
    font-family: 'Inter', sans-serif;
}

.reserva-page__steps {
    padding: 22px 20px;
}

.reserva-page__steps h3 {
    font-family: 'Playfair Display', serif;
    color: #073763;
    margin-top: 0;
}

.reserva-page__hint {
    margin: 0 0 12px;
    color: #666;
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
}

.reserva-page__calendar {
    display: flex;
    justify-content: center;
    margin: 10px 0 14px;
}

.reserva-page__time {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 10px 0 14px;
}

.reserva-page__time input[type="time"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: #fff;
}

.reserva-page__time input[type="time"][disabled] {
    background: #f1f3f5;
    color: #666;
}

.reserva-page__diarias {
    font-weight: 700;
    color: #3d85c6;
    text-align: center;
    margin: 0;
}

.reserva-page__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #f9f9f9;
}

@media (min-width: 900px) {
    .reserva-page__top {
        grid-template-columns: 340px 1fr;
        align-items: end;
    }
    .reserva-page__time {
        grid-template-columns: 1fr 1fr;
        align-items: end;
    }
}

@media (max-width: 768px) {
    .reserva-page__footer {
        flex-direction: column-reverse;
    }
    .reserva-page__footer button {
        width: 100%;
    }
}
