/* =========================================================
   GPS ESCOLAR · BOTONES
   Estilos reutilizables
   ========================================================= */


/* =========================================================
   BOTÓN GENERAL
   ========================================================= */

.boton-general {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 7px 12px;
    border: 0;
    border-radius: 14px;
    box-sizing: border-box;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
}


/* =========================================================
   TEXTOS GENERALES
   ========================================================= */

.boton-textos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.boton-titulo {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.05;
}

.boton-subtitulo {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.1;
}


/* =========================================================
   BOTÓN PRINCIPAL · AZUL
   ========================================================= */

.boton-principal {
    background: linear-gradient(
        90deg,
        #1264b5 0%,
        #079bd5 100%
    );
    color: #fff;
}

.boton-principal .boton-icono {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    margin-right: 12px;
    border-radius: 50%;
    background: #fff;
    color: #1264b5;
    font-size: 23px;
    font-weight: 800;
}


/* =========================================================
   BOTÓN SECUNDARIO · CELESTE
   ========================================================= */

.boton-secundario {
    border: 1px solid #b9d9ee;
    background: #f0f9fe;
    color: #0b4d7d;
}

.boton-secundario .boton-icono {
    flex-shrink: 0;
    margin-right: 10px;
    font-size: 22px;
}

.boton-secundario .boton-subtitulo {
    color: #68859d;
    font-weight: 500;
}


/* =========================================================
   BOTONES DE ACCIÓN · BASE GPS / STOP
   ========================================================= */

.boton-accion {
    position: relative;
    min-height: 58px;
    padding: 7px 54px 7px 10px;
    overflow: hidden;
    color: #fff;
}

.boton-accion-gps {
    background: linear-gradient(
        90deg,
        #087f68 0%,
        #08ad83 55%,
        #0abb91 100%
    );
}

.boton-accion-stop {
    background: linear-gradient(
        90deg,
        #b71c1c 0%,
        #df2929 55%,
        #ef4444 100%
    );
}


/* =========================================================
   ICONO IZQUIERDO · GPS / STOP
   ========================================================= */

.boton-accion-icono {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    margin-right: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}


/* =========================================================
   TEXTOS · GPS / STOP
   ========================================================= */

.boton-accion .boton-estado {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .4px;
    opacity: .9;
}

.boton-accion .boton-estado::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: #fff;
}

.boton-accion .boton-titulo {
    font-size: 15px;
    font-weight: 900;
}

.boton-accion .boton-subtitulo {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    opacity: .95;
}


/* =========================================================
   ICONO DERECHO · GPS / STOP
   ========================================================= */

.boton-accion-derecha {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    font-size: 17px;
    font-weight: 900;
    transform: translateY(-50%);
}

.boton-accion-gps .boton-accion-derecha {
    color: #079b78;
}

.boton-accion-stop .boton-accion-derecha {
    color: #d62828;
}


/* =========================================================
   ICONO PIN · GPS / STOP
   ========================================================= */

.gps-pin {
    position: relative;
    z-index: 3;
    width: 15px;
    height: 15px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.gps-pin::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
}


/* =========================================================
   GPS ACTIVO · ONDAS / PULSO · GPS Y STOP

   ESTADO ACTIVO:
   Agregar la clase gps-activo al botón.

   ESTADO INACTIVO:
   Quitar la clase gps-activo del botón.

   Compatible con ambos botones:
   - boton-accion-gps
   - boton-accion-stop

   ========================================================= */

.boton-accion.gps-activo .boton-accion-icono::before,
.boton-accion.gps-activo .boton-accion-icono::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    opacity: 0;
    animation: pulso-gps 2s ease-out infinite;
}

.boton-accion.gps-activo .boton-accion-icono::after {
    animation-delay: 1s;
}

@keyframes pulso-gps {
    0% {
        width: 24px;
        height: 24px;
        opacity: .9;
    }

    70%,
    100% {
        width: 46px;
        height: 46px;
        opacity: 0;
    }
}


/* =========================================================
   BOTÓN CIRCULAR
   --tamano controla el diámetro completo.
   ========================================================= */

.boton-circular {
    --tamano: 50px;
    width: var(--tamano);
    height: var(--tamano);
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    box-sizing: border-box;
    font-family: inherit;
    font-size: calc(var(--tamano) * .46);
    cursor: pointer;
}


/* =========================================================
   BOTÓN FLOTANTE

   Esta clase solamente activa el comportamiento flotante.

   La ubicación se define en línea en el HTML:
   left / right  = posición horizontal
   top / bottom  = posición vertical
   ========================================================= */

.boton-flotante {
    position: fixed;
    z-index: 1000;
}


/* =========================================================
   EFECTO AL PRESIONAR
   ========================================================= */

.boton-general:active,
.boton-circular:active {
    transform: scale(.97);
}