/**
 * BM Woo Quote Generator - Stylesheet
 * Version: 2.3.0
 */


/** ////////////////////////////////////////////////////////////////////
01 - Contenedor principal y distribución general del cotizador.
////////////////////////////////////////////////////////////////////*/

#bm-quote-generator-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-width: 1200px;
    margin: 20px auto;
}

.bm-quote-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.bm-quote-column {
    flex: 1;
    min-width: 280px;
}


/** ////////////////////////////////////////////////////////////////////
02 - Columnas específicas: configuración, detalles y resumen.
////////////////////////////////////////////////////////////////////*/

.bm-quote-config {
    flex-basis: 30%;
    flex-grow: 1;
}

.bm-quote-details {
    flex-basis: 40%;
    flex-grow: 1;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0 20px;
}

.bm-quote-summary {
    flex-basis: 30%;
    flex-grow: 1;
}


/** ////////////////////////////////////////////////////////////////////
03 - Tipografía y títulos del cotizador.
////////////////////////////////////////////////////////////////////*/

.bm-quote-container h3,
.bm-quote-container h4 {
    color: #c1121f;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.bm-quote-container h3 {
    font-size: 24px;
    border-bottom: 2px solid #c1121f;
    padding-bottom: 10px;
}

.bm-quote-container h4 {
    font-size: 20px;
}


/** ////////////////////////////////////////////////////////////////////
04 - Formularios: etiquetas, campos y selectores.
////////////////////////////////////////////////////////////////////*/

.bm-form-group {
    margin-bottom: 20px;
}

.bm-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.bm-form-group input[type="date"],
.bm-form-group input[type="number"],
.bm-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.bm-form-group select:disabled {
    background-color: #ececec;
    cursor: not-allowed;
}


/** ////////////////////////////////////////////////////////////////////
05 - Pasajeros: distribución de adultos, niños e infantes.
////////////////////////////////////////////////////////////////////*/

.bm-pax-selectors {
    display: flex;
    gap: 10px;
}

.bm-pax-selectors div {
    flex: 1;
}

.bm-pax-selectors label {
    font-size: 14px;
    text-align: center;
}


/** ////////////////////////////////////////////////////////////////////
06 - Detalles del tour: imagen, descripción y enlaces.
////////////////////////////////////////////////////////////////////*/

.bm-tour-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
    max-height: 250px;
}

.bm-tour-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.bm-tour-description ul {
    padding-left: 20px;
}

.bm-tour-description li {
    margin-bottom: 8px;
}

.bm-details-link,
.bm-home-link {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    font-weight: 500;
}

.bm-details-link {
    color: #c1121f;
}

.bm-home-link {
    font-size: 24px;
    margin-left: 15px;
    vertical-align: middle;
}


/** ////////////////////////////////////////////////////////////////////
07 - Resumen: precio total y botón principal en la primera columna.
////////////////////////////////////////////////////////////////////*/

.bm-summary-moved {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
}

.bm-total-price-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.bm-btn {
    background-color: #c1121f;
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
}

.bm-btn:hover:not(:disabled) {
    background-color: #e07015;
    transform: translateY(-2px);
}

.bm-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


/** ////////////////////////////////////////////////////////////////////
08 - Mensajes de estado e indicadores de carga.
////////////////////////////////////////////////////////////////////*/

#bm-quote-messages {
    margin-top: 15px;
    min-height: 24px;
}

.bm-success {
    color: #28a745;
    font-weight: 500;
}

.bm-error {
    color: #dc3545;
    font-weight: 500;
}

.bm-loader,
.bm-loader-small {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c1121f;
    border-radius: 50%;
    animation: bm-spin 1s linear infinite;
    margin: 20px auto;
}

.bm-loader {
    width: 40px;
    height: 40px;
}

.bm-loader-small {
    width: 20px;
    height: 20px;
}

@keyframes bm-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/** ////////////////////////////////////////////////////////////////////
09 - Mini carrito: productos, cantidades, total y botón de pago.
////////////////////////////////////////////////////////////////////*/

#bm-mini-cart-container {
    text-align: left;
}

#bm-mini-cart-container .widget_shopping_cart_content {
    padding: 0;
}

#bm-mini-cart-container .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0;
}

#bm-mini-cart-container .woocommerce-mini-cart-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

#bm-mini-cart-container .woocommerce-mini-cart-item:last-child {
    border-bottom: none;
}

#bm-mini-cart-container .woocommerce-mini-cart-item img {
    max-width: 50px !important;
    height: auto !important;
    border-radius: 4px;
}

#bm-mini-cart-container .woocommerce-mini-cart-item a:not(.remove) {
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

#bm-mini-cart-container .woocommerce-mini-cart-item .quantity {
    font-size: 13px;
    color: #777;
}

#bm-mini-cart-container .woocommerce-mini-cart-item .remove {
    color: #dc3545 !important;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    margin-left: auto;
}

#bm-mini-cart-container .woocommerce-mini-cart__total {
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

#bm-mini-cart-container .woocommerce-mini-cart__buttons a.button:not(.checkout) {
    display: none !important;
}

#bm-mini-cart-container .woocommerce-mini-cart__buttons .button.checkout {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin-bottom: 0;
    background-color: #28a745;
    color: #fff;
    padding: 10px 15px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#bm-mini-cart-container .woocommerce-mini-cart__buttons .button.checkout:hover {
    background-color: #218838;
}


/** ////////////////////////////////////////////////////////////////////
10 - Enlace “Seguir comprando” y distribución responsive.
////////////////////////////////////////////////////////////////////*/

.bm-keep-shopping-link {
    display: none;
    /* Oculto por defecto en escritorio */
    text-align: center;
    padding: 10px;
    margin-top: 15px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-top: 1px solid #e0e0e0;
}

.bm-keep-shopping-link:hover {
    color: #c1121f;
}

@media (max-width: 992px) {
    .bm-quote-details {
        border-left: none;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
        padding: 20px 0;
    }
}

@media (max-width: 768px) {
    .bm-quote-container {
        flex-direction: column;
    }

    .bm-quote-details {
        padding: 20px 0;
    }

    .bm-keep-shopping-link {
        display: block;
        /* Visible en móvil */
    }
}


/** ////////////////////////////////////////////////////////////////////
11 - Formularios: evita el recorte de texto en selectores e inputs.
Conserva la altura automática y el espacio vertical de los controles.
////////////////////////////////////////////////////////////////////*/

#bm-quote-generator-app select,
#bm-quote-generator-app input[type="date"],
#bm-quote-generator-app input[type="number"],
#bm-quote-generator-app input[type="text"] {
    height: auto !important;
    line-height: 1.5 !important;
    padding-top: 10px !important;
    padding-bottom: 12px !important;
}


/** ////////////////////////////////////////////////////////////////////
12 - Corrección móvil: mantiene el campo de fecha dentro del formulario.
Limita el ancho de las columnas y centra el control sin desbordamientos.
////////////////////////////////////////////////////////////////////*/

/** ////////////////////////////////////////////////////////////////////
12 - Corrección móvil: mantiene el campo de fecha dentro del formulario.
Limita las columnas y ajusta el control nativo de fecha en Safari/iPhone.
////////////////////////////////////////////////////////////////////*/

@media (max-width: 768px) {

    #bm-quote-generator-app,
    #bm-quote-generator-app .bm-quote-container,
    #bm-quote-generator-app .bm-quote-column,
    #bm-quote-generator-app #bm-quote-form,
    #bm-quote-generator-app .bm-form-group {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    #bm-quote-generator-app .bm-quote-container,
    #bm-quote-generator-app .bm-quote-column {
        width: 100%;
    }

    #bm-quote-generator-app .bm-pax-selectors > div {
        min-width: 0;
    }

    #bm-quote-generator-app #bm-tour-date {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;

        -webkit-appearance: none;
        appearance: none;

        min-height: 48px;
        padding-left: 0 !important;
        padding-right: 0 !important;

        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    #bm-quote-generator-app #bm-tour-date::-webkit-date-and-time-value {
        min-height: 1.5em;
        text-align: center;
    }
}