/* ============================================================
   BIKE MOTIONS - FORMULARIO DE ALQUILER
   Diseño limpio y responsive
   ============================================================ */


/* ============================================================
   VARIABLES
   ============================================================ */

:root {
    --bm-blue: #1f4e79;
    --bm-blue-dark: #163b5d;
    --bm-blue-light: #eef5fa;

    --bm-text: #263238;
    --bm-muted: #66737d;

    --bm-border: #d9e0e5;
    --bm-border-light: #e9edf0;

    --bm-background: #f3f5f7;
    --bm-white: #ffffff;

    --bm-green: #2e7d32;
    --bm-red: #c62828;

    --bm-radius: 10px;
    --bm-shadow:
        0 4px 20px rgba(0, 0, 0, 0.07);
}


/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
}


html {
    margin: 0;
    padding: 0;
    background: var(--bm-background);
}


body {
    margin: 0;
    padding: 35px 20px 60px;

    background: var(--bm-background);

    color: var(--bm-text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 15px;

    line-height: 1.5;
}


/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */

#container {
    width: 100%;
    max-width: 980px;

    margin: 0 auto;
}


/* ============================================================
   FORMULARIO
   ============================================================ */

#rentalForm {

    width: 100%;

    background: var(--bm-white);

    border-radius: 14px;

    box-shadow: var(--bm-shadow);

    padding: 0 34px 40px;

    overflow: hidden;
}


/* ============================================================
   CABECERA
   ============================================================ */

.contract-header {
    margin: 0 -34px 30px;
    padding: 27px 34px;
    background: #d71820;
    border-bottom: 4px solid #d71820;
    text-align: center;
}


.contract-header h1 {

    margin: 0;

    color: #ffffff;

    font-size: 27px;

    font-weight: 700;

    line-height: 1.3;
}
.logo-container {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.contract-logo {
    max-width: 200px; /* Puedes ajustar el tamaño del logo cambiando este valor */
    height: auto;
    display: inline-block;
}


/* ============================================================
   SECCIONES
   ============================================================ */

.contract-section {

    margin-bottom: 24px;

    padding: 24px;

    background: #ffffff;

    border:
        1px solid var(--bm-border-light);

    border-radius: var(--bm-radius);
}


/* ============================================================
   TÍTULOS DE SECCIÓN
   ============================================================ */

.contract-section h2 {

    margin: 0 0 20px;

    padding-bottom: 12px;

    color: var(--bm-black);

    border-bottom:
        2px solid var(--bm-black);

    font-size: 19px;

    font-weight: 700;

    line-height: 1.35;
}


/* ============================================================
   LABELS
   ============================================================ */

.contract-section > label {

    display: block;

    margin:
        14px 0 6px;

    color: var(--bm-text);

    font-size: 14px;

    font-weight: 600;
}


/* ============================================================
   INPUTS GENERALES
   ============================================================ */

.contract-section input[type="text"],
.contract-section input[type="email"],
.contract-section input[type="tel"],
.contract-section input[type="date"],
.contract-section input[type="time"],
.contract-section select {

    width: 100%;

    height: 46px;

    padding:
        0 13px;

    background: #ffffff;

    color: var(--bm-text);

    border:
        1px solid var(--bm-border);

    border-radius: 7px;

    outline: none;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 15px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.contract-section input[type="text"]:focus,
.contract-section input[type="email"]:focus,
.contract-section input[type="tel"]:focus,
.contract-section input[type="date"]:focus,
.contract-section input[type="time"]:focus,
.contract-section select:focus {

    border-color:
        var(--bm-black);

    box-shadow:
        0 0 0 3px
        rgba(31, 78, 121, .10);
}


/* ============================================================
   PLACEHOLDER
   ============================================================ */

input::placeholder {

    color: #9aa4aa;

    opacity: 1;
}


/* ============================================================
   DATOS CLIENTE
   ============================================================ */

#name,
#email,
#mobile,
#address,
#city,
#country {

    margin-bottom: 3px;
}


/* ============================================================
   ACTIVIDADES
   ============================================================ */

.activity-options {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}


.activity-option {

    position: relative;

    display: flex;

    align-items: center;

    min-height: 62px;

    padding: 15px 18px;

    background:
        #f8fafb;

    border:
        1px solid var(--bm-border);

    border-radius: 8px;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}


.activity-option:hover {

    border-color:
        var(--bm-black);

    background:
        var(--bm-black);
}


.activity-option input[type="radio"] {

    width: 18px;

    height: 18px;

    margin: 0 11px 0 0;

    accent-color:
        var(--bm-black);
}


.activity-option span {

    color: var(--bm-text);

    font-size: 15px;

    font-weight: 600;
}


/* ============================================================
   RADIO GROUP
   ============================================================ */

.radio-group {

    display: flex;

    flex-direction: column;

    gap: 10px;
}


.radio-group > label {

    display: flex;

    align-items: center;

    min-height: 48px;

    padding: 11px 14px;

    background:
        #f8fafb;

    border:
        1px solid var(--bm-border-light);

    border-radius: 7px;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease;
}


.radio-group > label:hover {

    background:
        var(--bm-black);

    border-color:
        #c5d6e5;
}


.radio-group input[type="radio"] {

    width: 18px;

    height: 18px;

    margin:
        0 11px 0 0;

    flex-shrink: 0;

    accent-color:
        var(--bm-black);
}


.radio-label {

    color: var(--bm-text);

    font-size: 15px;
}


/* ============================================================
   BICICLETAS
   ============================================================ */

.bike-table {

    display: flex;

    flex-direction: column;

    gap: 8px;
}


.bike-row,
.extra-row {

    display: grid;

    grid-template-columns:
        1fr 90px;

    align-items: center;

    min-height: 50px;

    padding:
        7px 10px 7px 14px;

    border:
        1px solid var(--bm-border-light);

    border-radius: 7px;

    background:
        #ffffff;
}


.bike-row:hover {

    background:
        #f8fafb;
}


.bike-row > span,
.extra-row > span {

    color: var(--bm-text);

    font-size: 15px;

    font-weight: 600;
}


/* ============================================================
   CANTIDADES
   ============================================================ */

.quantity,
.extra-quantity {

    width: 70px !important;

    height: 38px !important;

    margin-left: auto;

    padding:
        0 8px !important;

    text-align: center;

    border:
        1px solid var(--bm-border) !important;

    border-radius: 6px !important;

    font-size: 15px !important;
}


/* ============================================================
   EXTRAS
   ============================================================ */

.extra-row {

    background:
        #f7f8f9;
}


.extra-row > span {

    color:
        var(--bm-muted);

    font-weight: 500;
}


.extra-quantity[readonly] {

    background:
        #e9edf0 !important;

    color:
        #59656c;

    cursor:
        not-allowed;
}


/* ============================================================
   SELECT
   ============================================================ */

select {

    cursor: pointer;
}


/* ============================================================
   APP DE RUTAS
   ============================================================ */

#routingAppContainer {

    margin-top: 16px;

    padding: 16px;

    background:
        var(--bm-black);

    border:
        1px solid #d5e2ed;

    border-radius: 8px;

    animation:
        fadeIn .2s ease;
}


#routingAppContainer label {

    display: block;

    margin-bottom: 7px;

    color: var(--bm-blue);

    font-size: 14px;

    font-weight: 600;
}


@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

}


/* ============================================================
   INFORMACIÓN NIVEL TÉCNICO
   ============================================================ */

.technical-level-info {

    margin-top: 17px;

    padding: 16px 18px;

    background:
        #f8fafb;

    border-left:
        4px solid var(--bm-blue);

    border-radius: 6px;
}


.technical-level-info p {

    margin:
        0 0 10px;

    color:
        var(--bm-muted);

    font-size: 13px;

    line-height: 1.55;
}


.technical-level-info p:last-child {

    margin-bottom: 0;
}


.technical-level-info strong {

    color:
        var(--bm-text);
}


/* ============================================================
   CONSEJOS
   ============================================================ */

.tips-content {

    padding: 18px;

    background:
        #f8fafb;

    border-radius: 8px;

    border:
        1px solid var(--bm-border-light);
}


.tips-content p {

    margin:
        0 0 12px;

    color:
        var(--bm-muted);

    font-size: 14px;

    line-height: 1.6;
}


.tips-content p:last-child {

    margin-bottom: 0;
}


.tips-content strong {

    color:
        var(--bm-blue);
}


/* ============================================================
   FIRMA
   ============================================================ */

.signature-section {

    background:
        #ffffff;
}


#signatureCanvas {

    display: block;

    width: 100%;

    height: 190px;

    background:
        #ffffff;

    border:
        1px solid var(--bm-border);

    border-radius: 8px;

    cursor: crosshair;

    touch-action: none;
}


/* ============================================================
   BOTÓN LIMPIAR FIRMA
   ============================================================ */

#clearSignature {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    margin-top: 12px;

    min-height: 40px;

    padding:
        0 18px;

    background:
        #f3f5f6;

    color:
        var(--bm-text);

    border:
        1px solid var(--bm-border);

    border-radius: 6px;

    cursor: pointer;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 14px;

    transition:
        background .2s ease,
        border-color .2s ease;
}


#clearSignature:hover {

    background:
        #e8ecef;

    border-color:
        #c5cdd2;
}


/* ============================================================
   TOTAL
   ============================================================ */

.total-price-section {

    background:
        var(--bm-blue-light);

    border-color:
        #d5e2ed;

    text-align: center;
}


.total-price-section h2 {

    border-bottom:
        0;

    margin-bottom: 5px;
}


.price-box {

    margin:
        4px auto 8px;

    color:
        var(--bm-blue-dark);

    font-size: 36px;

    font-weight: 700;

    line-height: 1.2;
}


.price-note {

    color:
        var(--bm-muted);

    font-size: 12px;
}


/* ============================================================
   MENSAJES
   ============================================================ */

#message {

    min-height: 24px;

    margin:
        12px 0;

    padding:
        0 5px;

    font-size: 14px;

    font-weight: 600;

    text-align: center;
}


/* ============================================================
   CAMPOS INVÁLIDOS
   ============================================================ */

.invalid-input {

    border-color:
        var(--bm-red) !important;

    box-shadow:
        0 0 0 3px
        rgba(198, 40, 40, .08) !important;
}


/* ============================================================
   BOTÓN ENVIAR
   ============================================================ */

#rentalForm > button[type="submit"] {

    display: block;

    width: 100%;

    min-height: 54px;

    margin-top: 20px;

    padding:
        0 25px;

    background:
        #d71820;;

    color:
        #ffffff;

    border:
        0;

    border-radius: 8px;

    cursor: pointer;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 16px;

    font-weight: 700;

    transition:
        background .2s ease,
        transform .1s ease,
        box-shadow .2s ease;
}


#rentalForm > button[type="submit"]:hover {

    background:
        var(--bm-blue-dark);

    box-shadow:
        0 5px 15px
        rgba(31, 78, 121, .20);
}


#rentalForm > button[type="submit"]:active {

    transform:
        translateY(1px);
}


/* ============================================================
   INPUT NUMBER - QUITAR FLECHAS EN ALGUNOS NAVEGADORES
   ============================================================ */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {

    opacity: .6;

}


/* ============================================================
   RESPONSIVE TABLET
   ============================================================ */

@media (max-width: 760px) {

    body {

        padding:
            15px 10px 35px;

    }


    #rentalForm {

        padding:
            0 18px 25px;

        border-radius:
            10px;

    }


    .contract-header {

        margin:
            0 -18px 20px;

        padding:
            22px 18px;

    }


    .contract-header h1 {

        font-size:
            21px;

    }


    .contract-section {

        padding:
            18px;

        margin-bottom:
            17px;

    }


    .contract-section h2 {

        font-size:
            17px;

    }


    .activity-options {

        grid-template-columns:
            1fr;

    }


    .price-box {

        font-size:
            32px;

    }

}


/* ============================================================
   RESPONSIVE MÓVIL
   ============================================================ */

@media (max-width: 480px) {

    body {

        padding:
            8px 6px 25px;

        font-size:
            14px;

    }


    #rentalForm {

        padding:
            0 10px 20px;

        border-radius:
            8px;

    }


    .contract-header {

        margin:
            0 -10px 15px;

        padding:
            18px 10px;

    }


    .contract-header h1 {

        font-size:
            18px;

        line-height:
            1.35;

    }


    .contract-section {

        padding:
            15px;

        margin-bottom:
            12px;

    }


    .contract-section h2 {

        font-size:
            16px;

        padding-bottom:
            9px;

        margin-bottom:
            15px;

    }


    .contract-section input[type="text"],
    .contract-section input[type="email"],
    .contract-section input[type="tel"],
    .contract-section input[type="date"],
    .contract-section input[type="time"],
    .contract-section select {

        height:
            44px;

        font-size:
            14px;

    }


    .bike-row,
    .extra-row {

        grid-template-columns:
            1fr 75px;

        min-height:
            48px;

        padding:
            6px 8px 6px 10px;

    }


    .bike-row > span,
    .extra-row > span {

        font-size:
            14px;

    }


    .quantity,
    .extra-quantity {

        width:
            62px !important;

        height:
            36px !important;

    }


    .radio-group > label {

        min-height:
            45px;

        padding:
            9px 11px;

    }


    .technical-level-info,
    .tips-content {

        padding:
            13px;

    }


    .technical-level-info p,
    .tips-content p {

        font-size:
            12.5px;

    }


    #signatureCanvas {

        height:
            160px;

    }


    .price-box {

        font-size:
            30px;

    }


    #rentalForm > button[type="submit"] {

        min-height:
            50px;

        font-size:
            15px;

    }

}

/* ============================================================
   CAMPOS DE ALTURA POR BICICLETA
   ============================================================ */

.bike-heights-container {
    margin-top: 18px;
    padding: 18px;
    background: #f7f7f7;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
}


/* Título */

.bike-heights-title {
    margin-bottom: 14px;
    font-size: 17px;
    font-weight: 600;
    color: #234f73;
}


/* Lista */

.bike-heights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Cada bicicleta */

.bike-height-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
}


/* Nombre de la bicicleta */

.bike-height-row label {
    flex: 1;
    margin: 0;
    font-weight: 500;
    color: #333;
}


/* Campo altura */

.bike-height-input {
    width: 150px !important;
    min-width: 150px;
    max-width: 150px;
    box-sizing: border-box;
    padding: 10px 12px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: #fff !important;
    font-size: 15px;
    color: #333;
    text-align: center;
}


/* Placeholder */

.bike-height-input::placeholder {
    color: #999;
    opacity: 1;
}


/* Campo seleccionado */

.bike-height-input:focus {
    outline: none;
    border-color: #234f73 !important;
    box-shadow: 0 0 0 2px rgba(35, 79, 115, 0.12);
}


/* Campo con error */

.bike-height-input.invalid-input {
    border: 2px solid #d93025 !important;
    background: #fff5f5 !important;
}


/* Texto de ayuda para cm */

.bike-height-input::after {
    content: "cm";
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {

    .bike-heights-container {
        padding: 12px;
        margin-top: 14px;
    }


    .bike-heights-title {
        font-size: 15px;
        line-height: 1.4;
    }


    .bike-height-row {
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        padding: 12px;
    }


    .bike-height-row label {
        font-size: 14px;
    }


    .bike-height-input {
        width: 100% !important;
        min-width: 0;
        max-width: none;
        text-align: left;
    }

}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-option a {
    color: #0066cc;
    text-decoration: underline;
}

/* ==================================================
   SECCIÓN CONDICIONES / CHECKBOX OBLIGATORIOS
   ================================================== */

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.terms-links {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
}

.terms-links a {
    color: #0066cc;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #0066cc;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.terms-links a:hover {
    background: #0066cc;
    color: #ffffff;
}