/* General Objects */
html {
    height: 100%; /* HTML use all height */
}

body {
    display: flex;             /* 1. Activate Flexbox */
    flex-direction: column;    /* 2. Stack childs vertically (header, main, footer) */
    min-height: 100vh;         /* 3. The body needs to use at least the full height of the viewport */
    margin: 0;
    padding-top: 50px; /* To avoid content being hidden under the fixed navbar */                
}


/* Classes */
.main-content {
    flex-grow: 1;   /* Push content to fill all the available space */
}


header, .mi-footer {
    background-color: #f1f1f1;
    padding: 10px;
    text-align: center;
}


/* Identifiers */
#btn-alert-close { /* Flash messages alerts */
    padding: 0.6rem; /* Adjust padding */
    font-size: 0.6rem; /* Reduce 'x' icon size */
    height: 0.5rem;
    width: 0.5rem;
    margin: auto 0; /* Center vertically */
}


/* Modern base refinements */
body {
    background-color: #fcfcfc;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1; /* Pushes footer to bottom */
}

.mi-footer {
    border-top: 1px solid #eee;
    background-color: #fff !important;
}

/* Improved Toast Styling */
.toast {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toast-body {
    padding: 1rem;
    font-weight: 500;
}

/* Main content transitions */
.main-content {
    transition: opacity 0.3s ease;
}

/* Contact Badge - Improve visibility */
.contact-badge {
    display: inline-block;
    padding: 2px 8px;
    /* Más espacio interno */
    border-radius: 11px;
    font-size: 12px;
    /* Antes 10px */
    font-weight: bold;
    color: white;
    margin-right: 5px;
    margin-bottom: 4px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Bootstrap Tooltip */
[data-tooltip] {
    position: relative;
    --tooltip-bg: rgba(20, 20, 20, 0.95);
}

/* Tooltip box */
[data-tooltip]::before {
    /* Position */
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    display: none;
    transform: translateX(-50%) scale(0.9);
    z-index: 10005;
    max-width: 350px; /* Or any reasonable size */
    white-space: normal; /* Allow text to wrap into multiple lines */
    word-wrap: break-word;
    width: max-content;

    /* Initial state */
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    
    /* Estilo visual */
    opacity: 0;
    background-color: var(--tooltip-bg);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}
[data-tooltip]:not(.tooltip-top)::before {
    bottom: auto;
    top: 125%;
}
.tooltip-top::before {
    bottom: 125%; /* Se desplaza hacia arriba */
}
.tooltip-bottom::before {
    bottom: auto;
    top: 125%; /* Se desplaza hacia abajo */
}

/* Show on Hover */
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    display: block;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}