/* ===== Estilos del formulario Gestiona tu reserva (actualizado) ===== */
.gr-search-form {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Red Hat Display', 'Red Hat Display Fallback', Arial, sans-serif;
}

/* Wrapper del campo (icono absolute + input) */
.gr-field-wrap {
    position: relative;
    margin-bottom: 35px;
}

/* Icono absolute a la izquierda */
.gr-icon-wrap {
    position: absolute;
    left: 14px;
    top: 35%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.gr-icon-wrap img {
    width: 18px;
    height: auto;
    display: block;
    opacity: 0.95;
}

/* Input general - centrado del texto y espacio izquierdo grande para icono */
.gr-field {
    width: 100%;
    padding: 14px 16px;
    padding-left: 76px;
    /* <-- espacio izquierdo amplio para icon + margen */
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    background: #fff;
    box-sizing: border-box;
    text-align: center;
    /* placeholder y texto centrados */
    font-family: 'Red Hat Display', 'Red Hat Display Fallback', Arial, sans-serif;
}

/* Hover y focus - verde */
.gr-field:hover {
    border-color: #23c847;
}

.gr-field:focus {
    border-color: #23c847;
    box-shadow: 0 0 6px rgba(35, 200, 71, 0.12);
}

/* Label flotante (centrado sobre input) */
.gr-label {
    position: absolute;
    top: 21%;
    left: 40px;
    pointer-events: none;
    color: #777;
    font-size: 15px;
    transition: all 0.16s ease;
    background: transparent;
    padding: 0 6px;
    white-space: nowrap;
}

/* Cuando input tiene valor o focus, el label sube y se queda centrado */
.gr-field:focus+.gr-label,
.gr-field:not(:placeholder-shown)+.gr-label,
.gr-field.filled+.gr-label {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #23c847;
    background: #fff;
}

/* Placeholder - se muestra tal y como lo escribas (minúsculas si lo escribes así) */
.gr-field::placeholder {
    text-transform: none;
    color: #777;
    font-size: 15px;
    opacity: 1;
}

/* Mensajes bajo el input (centrados) */
.gr-field-msg {
    font-size: 13px;
    color: #555;
    margin-top: 6px;
    text-align: left;
}

/* Estados: error y success */
.gr-field.error {
    border-color: #ff1c46 !important;
    box-shadow: none;
}

.gr-field.error+.gr-label {
    color: #ff1c46 !important;
}

.gr-field-msg.error {
    color: #ff1c46;
}

.gr-field.success {
    border-color: #23c847 !important;
}

.gr-field-msg.success {
    color: #23c847;
}

/* Botones con anchura 50% y centrados */
.gr-buttons-row {
    display: flex;
    gap: 12px;
    margin-top: 42px;
    justify-content: center;
}

.gr-btn {
    padding: 10px 18px;
    border-radius: 6px;
    border: 0;
    cursor: pointer;
    font-size: 15px;
    font-family: 'Red Hat Display', 'Red Hat Display Fallback', Arial, sans-serif;
}

.gr-btn--primary {
    background: #1b1b1b;
    color: #fff;
    width: 50%;
    font-size: 20px;
    font-weight: 700;
    border-radius: 50px;
}

.gr-btn--primary:hover {
    background: #3b3b3b;
}

.gr-btn--secondary {
    background: #fff;
    color: #111;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    width: 50%;
    justify-content: center;
    border: 2px #1b1b1b solid;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 700;
}

.gr-btn--secondary:hover {
    background: #ddd;
}

/* Rutas alternativas si usas background en input (NO recomendado con nuestra estructura) */
#gr-codigo.bg-icon {
    background: url('../img/events.svg') no-repeat 12px center;
    background-size: 18px;
    padding-left: 76px;
}

#gr-apellidos.bg-icon {
    background: url('../img/person.svg') no-repeat 12px center;
    background-size: 18px;
    padding-left: 76px;
}

/* Responsive: botones en columna en móvil */
@media (max-width: 480px) {
    .gr-buttons-row {
        flex-direction: column-reverse;
    }

    .gr-field {
        padding-left: 20px;
        text-align: center;
    }

    .gr-field-msg {
        margin-left: 0;
    }
    
    .gr-btn--secondary{
        width: 100%;
    }
    .gr-btn--primary{
        width: 100%;
    }
}

/* Clase para aplicar mayúsculas por JS (no afecta placeholder en algunos navegadores) */
.gr-field.js-uppercase {
    text-transform: uppercase;
}