/* Biblioteca de Estilos para Botones */

/* Variables para Botones */
:root {
    --text: #bfc2c5;
    --muted-border: rgba(255, 255, 255, 0.06);
    --input-padding: 10px;
    --transition: 0.3s;
    --radius-lg: 25px;
    --accent: linear-gradient(135deg, #07498b, #4ba1f7);
    --success: linear-gradient(135deg, #0e6922, #49df67);
    --naranja: linear-gradient(135deg, #804501, #e49d33);
    --morado: linear-gradient(135deg, #3c0180, #ac33e4);
    --menor: linear-gradient(135deg, #484902, #90b825);
    --medio: linear-gradient(135deg, #725311, #d8bc3e);
    --mayor: linear-gradient(135deg, #8f2403, #d36922);
    --danger: linear-gradient(135deg, #7c1815, #e44433);
    --elegant: linear-gradient(135deg, #3f3f4b, #7a8899);
    --radius-pill: 200px;
}

/* General Button Styles */
button {
    padding: var(--input-padding);
    font-size: 16px;
    color: var(--text);
    border-radius: var(--radius-lg);
    border: 2px solid var(--muted-border);
    background-clip: padding-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: Arial, sans-serif;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all var(--transition) ease;
    background-color: transparent;
    box-shadow: none;
    cursor: pointer;
    border: none;
    color: white;
}

button:focus {
    outline: none;
    border-color: rgba(0, 123, 255, 0.25);
    box-shadow: 0 0 8px 2px rgba(0, 123, 255, 0.15);
}

/* Base Button */
.btn {
    flex:1;
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: white;
    font-weight: 600;
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.2);
}

/* Color Variants */
.verde {
    background: var(--success);
}

.azul {
    background: var(--accent);
}

.naranja {
    background: var(--naranja);
}

.morado {
    background: var(--morado);
}

.rojo {
    background: var(--danger);
}

/* Version Variants */
.menor {
    background: var(--menor);
}

.medio {
    background: var(--medio);
}

.mayor {
    background: var(--mayor);
}

/* Special Variants */
.elegant {
    background: var(--elegant);
    border-radius: 0.5rem;
}

@keyframes botonactivo {
    0%,100% {
        box-shadow: 0 0 9px rgba(231, 40, 40, 0.1);
    }
    50% {
        box-shadow: 0 0 13px rgba(231, 40, 40, 0.6);
    }
}
@keyframes botonhover {
    0%,100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

/* Button States */
.btn:hover {
    /* filter: brightness(1.2); */
    box-shadow: 0 0px 20px rgba(0, 0, 0, 0.5);
    transform: scale(1.03);
    /* animation: botonhover 1s ease-in-out infinite; */
}

.btn.active {
    outline: 1px solid rgb(255, 0, 0);
    /* box-shadow: 0 0 12px rgba(231, 40, 40, 0.6); */
    transform: scale(1.1);
    animation: botonactivo 3s ease-in-out infinite;
}

/* Special Button: Registrar */
.btn-registrar {
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 30px;
    background-color: #0259b6;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 210px;
}

.btn-registrar:hover:not(:disabled) {
    background-color: #2d92ff;
    box-shadow: 0 0px 18px rgba(18, 132, 255, 0.4);
    transform: scale(1.05);
}

.btn-registrar:disabled {
    background-color: #444;
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
    box-shadow: none;
}

.btn-registrar:disabled:hover {
    background-color: #302c2c;
    transform: none;
    box-shadow: none;
}

.btn-registrar.loading {
    pointer-events: none;
    background-color: #444 !important;
    opacity: 0.4 !important;
    transform: none;
    box-shadow: none;
}

/* Spinner and Loading */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.btn-registrar.loading .spinner {
    display: inline-block;
}

.btn-registrar.loading .texto-boton {
    visibility: hidden;
    position: absolute;
}

/* Button Containers */
.botones-proyecto {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.botones-navegacion {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
