/* static/css/theme.css */

/*
 * =========================================
 *           TAVATA "BEE THEME"
 * =========================================
 * Define nuestras variables de color personalizadas
 * y las usamos para sobrescribir las de Bootstrap.
 */

:root {
    /* 1. Definimos nuestros colores base */
    --tavata-yellow: #ffc107;
    --tavata-dark: #212529;
    --tavata-light: #f8f9fa;

    /* 2. Sobrescribimos las variables de color principales de Bootstrap */
    --bs-primary: var(--tavata-yellow);       /* El color primario ahora es nuestro amarillo */
    --bs-primary-rgb: 255, 193, 7;           /* La versión RGB para transparencias (muy importante) */

    --bs-dark: var(--tavata-dark);
    --bs-dark-rgb: 33, 37, 41;

    --bs-light: var(--tavata-light);
    --bs-light-rgb: 248, 249, 250;

    /* Ajustamos el color del texto sobre nuestro color primario para mejor contraste */
    --bs-body-color-rgb: 33, 37, 41; /* Texto principal oscuro */
}

.text-tavata-yellow-outlined {
    color: var(--tavata-yellow);
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.5);
}
/* 3. Pequeños ajustes y clases de utilidad */
img.zoomable {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

/* Overlay modal para imagen ampliada */
.image-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.image-modal-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
  cursor: zoom-out;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

/* Asegurarnos de que el texto en botones primarios sea negro para legibilidad */
.btn-primary {
    /* 1. Definimos explícitamente el color de fondo normal */
    --bs-btn-bg: var(--tavata-yellow);
    --bs-btn-border-color: var(--tavata-yellow);

    /* 2. Definimos el color del texto para buen contraste */
    --bs-btn-color: var(--tavata-dark);
    --bs-btn-hover-color: var(--tavata-dark);
    --bs-btn-active-color: var(--tavata-dark);

    /* 3. Definimos los colores para el estado :hover */
    --bs-btn-hover-bg: #e6ac00; /* Un dorado un poco más oscuro al pasar el ratón */
    --bs-btn-hover-border-color: #e6ac00;
}

/* --- NEW THEME UTILITY CLASS --- */
/* A background class for our primary theme color with dark text for contrast */
.bg-tavata-primary {
    background-color: var(--tavata-yellow) !important;
    color: var(--tavata-dark) !important;
}

/* Ensure links within this background are also dark */
.bg-tavata-primary a {
    color: var(--tavata-dark) !important;
    transition: opacity 0.2s ease-in-out;
}

.bg-tavata-primary a:hover {
    opacity: 0.75;
}
/* --- END NEW CLASS --- */

/* Clases de utilidad para usar nuestros colores directamente */
.text-tavata-yellow {
    color: var(--tavata-yellow) !important;
}

.bg-tavata-dark {
    background-color: var(--tavata-dark) !important;
}


/* --- Collapsible Widget Icon (Bootstrap Native Rotation) --- */

.TAVATA-collapse-icon {
    transition: transform 0.25s ease-in-out;
}

/* Cuando el botón NO está colapsado (es decir, el contenido es visible)... */
[aria-expanded="true"] .TAVATA-collapse-icon {
    /* ...la flecha apunta hacia arriba. */
    transform: rotate(-180deg);
}

/* --- Bootstrap Multi-level Dropdown --- */
.dropdown-menu li {
    position: relative;
}
.dropdown-menu .dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -7px;
}
.dropdown-menu .dropdown-submenu-left {
    right: 100%;
    left: auto;
}
.dropdown-menu > li:hover > .dropdown-submenu {
    display: block;
}

/* --- BOOTSTRAP MULTI-LEVEL DROPDOWN SUPPORT --- */

.dropdown-menu li {
    position: relative;
}

/* Style for the nested submenu */
.dropdown-menu .dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -7px; /* Adjust this value to vertically align the submenu */
}

/* Show the nested submenu on hover */
.dropdown-menu > li:hover > .dropdown-submenu {
    display: block;
}

/* Optional: add an arrow to items that have a submenu */
.dropdown-submenu-toggle::after {
    content: '▸';
    display: inline-block;
    margin-left: .5em;
    vertical-align: middle;
}
/* --- END MULTI-LEVEL DROPDOWN --- */

.breadcrumb-wrapper {
  width: 90%;
  margin: 0 auto;
  padding: 0 2rem;
}

.breadcrumb {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  border: 1px solid #dee2e6;
  background-color: #f9f9f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}