/* Reset básico para evitar conflictos */
.hbs-booking-container,
.hbs-booking-form-wrapper,
.hbs-selected-room,
.hbs-room-list,
.hbs-popup {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Contenedor principal */
.hbs-booking-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 40px auto;
    gap: 20px;
    align-items: stretch;
    padding: 0 15px;
}

/* Contenedor del formulario */
.hbs-booking-form-wrapper {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    min-width: 300px;
}

/* Estilo del formulario */
.hbs-booking-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hbs-form-group {
    margin-bottom: 15px;
}

.hbs-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.hbs-form-group input,
.hbs-form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background: #f9f9f9;
    transition: border-color 0.2s;
}

.hbs-form-group input[type="file"] {
    padding: 3px;
    background: #fff;
}

.hbs-form-group input:focus,
.hbs-form-group select:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
}

/* Estilo para los horarios y descripciones */
.hbs-form-group .description {
    font-size: 13px;
    color: #777;
    margin-top: 5px;
}

/* Campos de adultos y niños en grid */
.hbs-form-group.hbs-people-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hbs-form-group.hbs-people-group div {
    margin-bottom: 0;
}

/* Campo de cupón */
.hbs-coupon-wrapper {
    display: flex;
    gap: 10px;
}

.hbs-coupon-wrapper input {
    flex: 1;
}

.hbs-coupon-apply {
    padding: 8px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.hbs-coupon-apply:hover {
    background-color: #0056b3;
}

.hbs-coupon-message {
    margin-top: 5px;
    font-size: 14px;
}

.hbs-coupon-message.success {
    color: #2e7d32;
}

.hbs-coupon-message.error {
    color: #d32f2f;
}

/* Campo de términos y condiciones */
.hbs-form-group.hbs-terms-group {
    display: flex;
    align-items: center;
}

.hbs-form-group.hbs-terms-group label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 0;
}

.hbs-form-group.hbs-terms-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.hbs-form-group.hbs-terms-group a {
    color: #007bff;
    text-decoration: underline;
}

.hbs-form-group.hbs-terms-group a:hover {
    color: #0056b3;
}

/* Secciones de políticas y extras */
.hbs-policies,
.hbs-extras {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.hbs-policies h3,
.hbs-extras h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.hbs-policies-content,
.hbs-extras-content {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Botón de enviar */
.hbs-submit {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    display: block;
}

.hbs-submit:hover {
    background-color: #0056b3;
}

/* Panel de habitación seleccionada */
.hbs-selected-room {
    flex: 1;
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    min-width: 300px;
    max-width: 400px;
}

.hbs-selected-room h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.hbs-selected-room #selected-room-details {
    text-align: left;
}

.hbs-selected-room .hbs-room-images {
    position: relative;
    margin-bottom: 15px;
}

.hbs-selected-room .hbs-room-images img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: none;
}

.hbs-selected-room .hbs-room-images img.active {
    display: block;
}

.hbs-selected-room .hbs-room-images .hbs-room-prev,
.hbs-selected-room .hbs-room-images .hbs-room-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}

.hbs-selected-room .hbs-room-images .hbs-room-prev {
    left: 5px;
}

.hbs-selected-room .hbs-room-images .hbs-room-next {
    right: 5px;
}

.hbs-selected-room h4 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 10px 0;
}

.hbs-selected-room p {
    font-size: 14px;
    color: #555;
    margin: 0 0 5px 0;
}

.hbs-selected-room .reservation-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.hbs-selected-room .reservation-details h4 {
    color: #2e7d32;
    font-size: 16px;
    margin-bottom: 10px;
}

.hbs-selected-room .cost-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.hbs-selected-room .cost-details p.total {
    font-weight: 600;
    color: #333;
}

.hbs-selected-room .cost-details p.discount {
    color: #2e7d32;
}

.hbs-selected-room .cost-details p.final {
    font-weight: 600;
    color: #007bff;
}

/* Lista de habitaciones */
.hbs-room-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.hbs-room-list h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

.hbs-room {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hbs-room .hbs-room-images {
    position: relative;
    margin-bottom: 10px;
}

.hbs-room .hbs-room-images img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
    display: none;
}

.hbs-room .hbs-room-images img.active {
    display: block;
}

.hbs-room .hbs-room-images .hbs-room-prev,
.hbs-room .hbs-room-images .hbs-room-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}

.hbs-room .hbs-room-images .hbs-room-prev {
    left: 5px;
}

.hbs-room .hbs-room-images .hbs-room-next {
    right: 5px;
}

.hbs-room h4 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 10px 0;
}

.hbs-room p {
    font-size: 14px;
    color: #555;
    margin: 0 0 5px 0;
}

/* Estilos para el popup */
.hbs-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow: auto;
}

.hbs-popup-content {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 380px;
    width: 90%;
    animation: hbs-fadeIn 0.3s ease-in-out;
}

.hbs-popup-content p {
    font-size: 15px;
    color: #333;
    margin: 0 0 15px 0;
}

.hbs-popup-content p.success {
    color: #2e7d32;
}

.hbs-popup-content p.error {
    color: #d32f2f;
}

.hbs-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
}

.hbs-popup-close:hover {
    color: #333;
}

@keyframes hbs-fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Estilos para mensajes de administración */
.notice-success {
    background-color: #e6f4ea;
    border-left-color: #2e7d32;
    padding: 10px;
    margin: 10px 0;
}

.notice-error {
    background-color: #fce4e4;
    border-left-color: #d32f2f;
    padding: 10px;
    margin: 10px 0;
}

/* Estilos para la gestión de imágenes en el administrador */
.hbs-existing-images,
.hbs-admin-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hbs-image-preview {
    position: relative;
    display: inline-block;
}

.hbs-image-preview img {
    max-width: 100px;
    border-radius: 4px;
}

.hbs-image-preview .hbs-remove-image {
    display: block;
    margin-top: 5px;
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

.hbs-image-preview .hbs-remove-image:hover {
    background: #b71c1c;
}

/* Estilo para la columna y resumen de comisiones */
.hbs-commission {
    background-color: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}

.hbs-commission-summary {
    margin-bottom: 20px;
}

.hbs-commission-summary th,
.hbs-commission-summary td {
    background-color: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}

/* Estilo para los campos de sucursales en el administrador */
.hbs-branch-field {
    margin-bottom: 10px;
}

.hbs-branch-field label {
    display: inline-block;
    width: 100px;
    font-weight: 500;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .hbs-booking-container {
        flex-direction: column;
        gap: 15px;
    }

    .hbs-booking-form-wrapper,
    .hbs-selected-room {
        min-width: 100%;
        max-width: 100%;
    }

    .hbs-selected-room {
        margin-top: 15px;
    }

    .hbs-form-group.hbs-people-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hbs-booking-form-wrapper,
    .hbs-selected-room {
        padding: 15px;
    }

    .hbs-submit {
        padding: 8px;
        font-size: 14px;
    }

    .hbs-selected-room h3,
    .hbs-room-list h3 {
        font-size: 16px;
    }

    .hbs-selected-room h4,
    .hbs-room h4 {
        font-size: 15px;
    }

    .hbs-popup-content {
        padding: 20px;
        max-width: 320px;
    }

    .hbs-popup-content p {
        font-size: 14px;
    }

    .hbs-coupon-wrapper {
        flex-direction: column;
        gap: 5px;
    }

    .hbs-coupon-apply {
        width: 100%;
    }

    .hbs-form-group.hbs-terms-group label {
        font-size: 13px;
    }

    .hbs-room .hbs-room-images img {
        max-width: 100%;
    }

    .hbs-policies,
    .hbs-extras {
        padding: 10px;
    }

    .hbs-policies h3,
    .hbs-extras h3 {
        font-size: 15px;
    }
}