/* static/css/base.css */

/* Estilos generales */
:root {
    --btn-color-mlp: #14498C;
}

html, body {
    height: 100%;
}

.toggle-widget-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1001;
}

.custom-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
    z-index: 1000;
    font-size: 22px;
    font-weight: bold;
    color: #000;
    width: auto;
    height: auto;
    max-height: 70%;
    overflow-y: auto;
    display: none; /* oculto por defecto */
}

.custom-widget-header {
    background: #007bff;
    color: white;
    padding: 12px;
    border-radius: 12px 12px 0 0; /* esquinas superiores redondeadas */
    margin: -20px -20px 15px -20px; /* sobresale del contenedor */
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}


.custom-widget.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-outline-primary {
    --bs-btn-color: var(--btn-color-mlp);
    --bs-btn-border-color: var(--btn-color-mlp);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--btn-color-mlp);
    --bs-btn-hover-border-color: var(--btn-color-mlp);
    --bs-btn-focus-shadow-rgb: 20,73,140;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--btn-color-mlp);
    --bs-btn-active-border-color: var(--btn-color-mlp);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--btn-color-mlp);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--btn-color-mlp);
    --bs-gradient: none;
}

h1.text-primary {
    color:#1CA3BB !important;
    font-weight: 300 !important;
}

body {
    /* FUENTE ROBOTO con fallbacks */
    font-family: 'Roboto', 'Roboto-Local', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 120px;
}

main {
    flex: 1 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    border-bottom: 1px solid #eaeaea;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.header-hidden {
    transform: translateY(-100%);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo img {
    height: 40px;
    width: auto;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-greeting {
    margin-right: 15px;
    font-size: 0.9rem;
}

.btn-logout, .btn-login {
    background: none;
    border: 1px solid #333;
    color: #333;
    padding: 5px 15px;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover, .btn-login:hover {
    background-color: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
}

/* Navegación principal */
.main-nav {
    border-top: 1px solid #eaeaea;
    padding-top: 15px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-right: 20px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #1CA3BB;
    font-weight: 600;
}

/* Mobile user actions */
.mobile-user-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

.mobile-user-greeting {
    display: block;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.mobile-logout-form {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        align-items: center;
    }

    .site-header {
    border-bottom: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eaeaea;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .main-nav .container {
        position: relative;
    }
}

/* Alertas */

.alert.alert-danger {
    position: relative;
    z-index: 9999;
   
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-dismissible {
    padding-right: 35px;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 15px;
    color: inherit;
}

/* Footer */
.site-footer {
    flex-shrink: 0;
    background-color: #f8f9fa;
    padding: 20px 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}