﻿/*------------------------------------------------ LAYOUT ------------------------------------------------*/

/* 1. Variables de Bootstrap customizadas */
:root {
    --bs-primary: #ff5722;
    --bs-secondary: #ffad38;
}

/* 2. Reset y tipografía general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f9f9f9;
    color: #333;
}

/* 3. Navbar (header)*/
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand img {
    height: 40px;
}

/* 4. Botón “Volver a la web” completo */
.btn-volver {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--bs-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

    .btn-volver:hover {
        background-color: #ee8971;
    }

/* 5. Botón icono para móvil */
.btn-volver-icon {
    /* flex inline con prefijos */
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--bs-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

    .btn-volver-icon:hover {
        background-color: #ee8971;
        /* transform prefijado */
        -webkit-transform: translateY(-1px);
        -moz-transform: translateY(-1px);
        transform: translateY(-1px);
    }

/* 6. Footer */
.site-footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.875rem;
}

    .site-footer a {
        color: #ccc;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s;
    }

        .site-footer a:visited {
            color: #ccc;
        }

        .site-footer a:hover,
        .site-footer a:focus {
            color: #fff;
            text-decoration: underline;
        }

/* 7. Helpers adicionales */
.site-content,
.container.site-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/*------------------------------------------------ COMPONENTES ------------------------------------------------*/

.btn-primary {
    background-color: var(--bs-primary);
    border: none;
}

    .btn-primary:hover {
        background-color: #ee8971;
    }

.btn-warning {
    background-color: var(--bs-secondary);
    border: none;
    color: #fff;
}

    .btn-warning:hover {
        background-color: #ffc738;
    }

/* Inputs focus */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(255,87,34,0.15);
}

/* Modal-overlay y spinner */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    /* animación fadeIn con prefijos */
    -webkit-animation: fadeIn 0.3s ease forwards;
    -moz-animation: fadeIn 0.3s ease forwards;
    animation: fadeIn 0.3s ease forwards;
}

    /* Mostrar el modal-overlay */
    .modal-overlay.active {
        /* flex con prefijos */
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
    }

.modal-content {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

    .modal-content h2 {
        margin-bottom: 1rem;
        font-size: 1.5rem;
        color: var(--bs-primary);
    }

    .modal-content p {
        margin-bottom: 1.5rem;
        color: #333;
        font-size: 1rem;
    }

/* Spinner */
.spinner {
    margin: 1.5rem auto 0;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--bs-primary);
    border-radius: 50%;
    /* animación spin con prefijos */
    -webkit-animation: spin 1s linear infinite;
    -moz-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

/* Iconos naranja en login */
.form-label i.text-primary {
    color: var(--bs-primary) !important;
}

/* Botón “Entrar” */
.btn-primary {
    background-color: var(--bs-primary);
    border: none;
}

    .btn-primary:hover {
        background-color: #ee8971;
    }

/* Botón “Nuevo cliente” */
.btn-warning {
    background-color: var(--bs-secondary);
    border: none;
    color: #fff;
}

    .btn-warning:hover {
        background-color: #ffc738;
    }

    .btn-warning i {
        color: #fff;
    }

/*------------------------------------------------ FORMULARIO ------------------------------------------------*/

/* Card principal */
.card.shadow-sm {
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Títulos de card */
.card .h5,
.card .card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

/* Sub-bloque “Datos de alta” */
.alt-color {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Separador de sección */
.section-separator {
    position: relative;
    text-align: center;
    margin: 2.5rem 0 1rem;
}

    .section-separator span {
        position: relative;
        z-index: 1;
        background: #fff;
        padding: 0 1rem;
        color: var(--bs-primary);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

    .section-separator::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--bs-primary);
        transform: translateY(-50%);
        z-index: 0;
    }

/* Iconos dentro de labels */
.form-label i {
    color: var(--bs-primary);
    margin-right: 0.75rem;
    width: 1em;
    text-align: center;
    vertical-align: middle;
}

/* Focus en inputs */
.form-control:focus,
.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

/* Resumen de validación global */
#validationSummary {
    margin-bottom: 1rem;
}

/* Descripción previa al checkbox */
.form-description {
    font-size: 0.85rem;
    color: #555;
    margin: 1.5rem 0;
    line-height: 1.5;
    text-align: center;
}

    .form-description a {
        color: var(--bs-primary);
        font-weight: 600;
        text-decoration: none;
    }

        .form-description a:hover {
            text-decoration: underline;
        }

/* Contenedor usuario + logout */
.user-info-container {
    /* flex inline con prefijos */
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
    background-color: var(--bs-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

    .user-info-container i {
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }

/* Botón logout / volver en header */
.btn-link.text-primary,
.logout-button {
    color: var(--bs-primary);
    text-decoration: none;
}

.logout-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0;
    cursor: pointer;
}

    .logout-button:hover,
    .btn-link.text-primary:hover {
        color: #ee8971;
        text-decoration: none;
    }

/* Botones primarios (repetidos) */
.btn-primary {
    background-color: var(--bs-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

    .btn-primary:hover {
        background-color: #ee8971;
    }

/* Feedback de consentimiento */
#consentError {
    margin-top: 0.25rem;
}

/* Spinner y modal (repetido) */
.modal-overlay {
    /* ya definido arriba */
}

.modal-content {
    /* ya definido arriba */
}

.spinner {
    /* ya definido arriba */
}

/* Keyframes prefijados para animaciones */
@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
    }
}

@-moz-keyframes spin {
    to {
        -moz-transform: rotate(360deg);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@-moz-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Separador vertical entre Entrega y Recogida */
@media (min-width: 992px) {
    .entrega-recogida > .col-lg-6 + .col-lg-6 {
        border-left: 1px solid rgba(0,0,0,0.1);
        padding-left: 1.5rem;
    }

    .entrega-recogida > .col-lg-6 {
        padding-right: 1.5rem;
    }
}
