/* ********************************************************************************************************************
* BODY
* *********************************************************************************************************************/
:root {
    --step: 20px;  /* incremento por nivel a partir del 2 */
    --base: 10px;  /* padding de nivel 2 */
    --icon-font-size: 1.25rem;
    --licitae-offcanvas-body-color: #fff;
    --licitae-offcanvas-width: 38%;
    --licitae-navbar-color: #32a2bd;
    --licitae-navy-blue: #03036a;
    --licitae-teal: #20c997;
    --licitae-kelly-green: #51a52b;
    --licitae-dartmouth-green: #006633;
    --licitae-charcoal: #344055;
    --licitae-pink: #d63384;
    --licitae-yellow: #e1a900;
    --licitae-form-label-color: #3e3e3e;
    --licitae-form-help-color: #585858;
    --licitae-modal-color: #313944;
    --licitae-hover-background-color-nav-items: #ffffff2e;
}

/* ********************************************************************************************************************
* NOTIFICACIONES
* *********************************************************************************************************************/
@keyframes bell-ring-intermittent {
    0%, 20% { transform: rotate(0deg); }
    2% { transform: rotate(-5deg); }
    4% { transform: rotate(5deg); }
    6% { transform: rotate(-5deg); }
    8% { transform: rotate(5deg); }
    10% { transform: rotate(-3deg); }
    12% { transform: rotate(3deg); }
    14% { transform: rotate(-2deg); }
    16% { transform: rotate(2deg); }
    18% { transform: rotate(-1deg); }
    20%, 100% { transform: rotate(0deg); }
}

.notification-bell-ring {
    animation: bell-ring-intermittent 6.5s ease-in-out infinite;
    transform-origin: center top;
}

.notification-bell-indicator::before {
    position: absolute;
    content: "";
    right: -0.175rem;
    top: -0.25rem;
    height: 0.55rem;
    width: 0.55rem;
    border-radius: 50%;
    border: 2px solid var(--falcon-notification-indicator-border-color);
}

/* ********************************************************************************************************************
* NAV
* *********************************************************************************************************************/

.navbar {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.navbar-top {
    min-height: min-content;
}

.nav-link.dropdown-toggle:hover,
.navbar-toggler-humburger-icon:hover,
.navbar-toggler-humburger-icon:focus {
    background-color: var(--licitae-hover-background-color-nav-items) !important;
}

.navbar-toggle-icon .toggle-line,
.navbar-toggle-icon:after,
.navbar-toggle-icon:before {
    background-color: var(--falcon-gray-300);
}

.logo {
    height: auto;
}

.logo-small {
    width: 90px;
}

.logo-large {
    width: 180px;
}

.logo:hover {
    opacity: .65;
    transition: opacity .15s ease-in;
}

.navbar-logo {
    width: 90px;
}

@media (min-width: 992px) {
    .navbar-logo {
        width: 180px;
    }
}

.submodule-selector {
    border-top: 2px solid #00000033;
}

.submodule-selector-item {
    color: inherit;
    border: 0 !important;
    padding: 0.3125rem 0.75rem !important;
}

.submodule-selector-item.active {
    background-color: rgba(206, 208, 239, 0.35);
    font-weight: 600;
}

.submodule-selector-item:hover {
    background-color: var(--licitae-hover-background-color-nav-items);
}

.navbar .dropdown-item:not(.active):hover,
.navbar .dropdown-item:not(.active):focus,
.dropdown-item:not(.active):hover,
.dropdown-item:not(.active):focus {
    background-color: #f1f1f1;
}

a.dropdown-item:hover {
    color: black !important;
}

.dropdown-item.active:hover, .dropdown-item.active:focus {
    background-color: #358afb;
}

.nav-link:hover {
    background-color: #0093ff2b;
}

.nav-tabs .nav-link {
    padding: 0.6rem;
}

/* ********************************************************************************************************************
 * COLORES
 * ********************************************************************************************************************/
.bg-note {
    background: #fcffd2
}

.bg-purple {
    background-color: var(--falcon-purple) !important;
}

.bg-pink {
    background-color: var(--licitae-pink) !important;
}

.bg-charcoal {
    background-color: var(--licitae-charcoal) !important;
}

.bg-orange {
    background-color: var(--falcon-orange) !important;
}

.bg-yellow {
    background-color: var(--licitae-yellow) !important;
}

.bg-licitae-navbar {
    background-color: var(--licitae-navbar-color);
}

.bg-navy-blue {
    background-color: var(--licitae-navy-blue);
}

.bg-teal {
    background-color: var(--licitae-teal) !important;
}

.bg-kelly-green {
    background-color: var(--licitae-kelly-green);
}

.text-dartmouth-green {
    color: var(--licitae-dartmouth-green);
}

.bg-dartmouth-green {
    background-color: var(--licitae-dartmouth-green);
}

.border-dartmouth-green {
    border-color: var(--licitae-dartmouth-green) !important;
}

.obligatorio {
	background-color: lightyellow !important;
}

/* ********************************************************************************************************************
 * LOGIN
 * ********************************************************************************************************************/
.login-panel {
  margin-top: 10% !important;
}

.login-card {
  width: 35%;
}

/* ********************************************************************************************************************
 * Acordeón
 * ********************************************************************************************************************/
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

#accordionAvisosAplicacion .accordion-button::after {
    filter: brightness(0) invert(1); /* Hace el icono blanco */
}

/* ********************************************************************************************************************
 * MODAL
 * ********************************************************************************************************************/
.modal-header .btn-close {
    padding: 0.1rem !important;
}

.modal-body {
    max-height: 45rem
}

.modal-footer {
    padding-top: 0.25rem !important;
    padding-inline: 1rem !important;
}

.modal-content {
    color: var(--licitae-modal-color);
}

.tox-editor-container {
    background-color: white !important;
}

/* ********************************************************************************************************************
 * MODAL de SUGERIR
 * ********************************************************************************************************************/

.suggestion-card {
    flex: 0 0 49%;
    max-width: 49%;
    overflow: hidden;
    transition:
            max-width 0.5s ease-in-out,
            flex-basis 0.5s ease-in-out,
            transform 0.3s ease-out,
            opacity 0.3s ease-out,
            box-shadow 0.3s ease-out;
    will-change: transform, opacity;
}

.suggestion-card.is-active {
    z-index: 2;
    flex-basis: 100%;
    max-width: 100%;
    opacity: 1;
}

.suggestion-card.is-inactive {
    flex-basis: 0;
    max-width: 0;
    max-height: 0;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.modal-dialog {
    transition: max-width 0.3s ease-in-out !important;
}

/* ********************************************************************************************************************
 * TABLAS
 * ********************************************************************************************************************/

.table>:not(caption)>*>* {
    padding: 0.35rem;
    vertical-align: middle;
}

th {
    padding: 0.5rem !important;
}

.table-hover > tbody > tr:hover > * {
    --falcon-table-color-state: #484848;
    --falcon-table-bg-state: #0093ff1c;
}

.offcanvas,
.table > :not(caption) > * > *,
.table a.link-unstyled {
    color: var(--falcon-table-color-state, var(--falcon-table-color-type, #4f5863));
}

.table a:hover {
    color: rgba(var(--falcon-link-color-rgb), var(--falcon-link-opacity, 1));
}

.borderless-top {
    border-top: 0px solid white !important;
}

table th.th-acciones,
table td.td-acciones {
    width: 40px;
}

.no-margin tr td:first-child {
    padding-left: 0.35rem !important;
}

table tr td:last-child {
    padding-right: 0.35rem !important;
}

.table-with-status tr.tr-status--EN_PREPARACION,
.table-with-status tr.tr-status--CONTRATO,
.table-with-status tr.tr-status--LICITACION {
    border-left: 2px solid var(--licitae-navy-blue);
}

.table-with-status tr.tr-status--CANCELADO,
.table-with-status tr.tr-status--DENEGADA,
.table-with-status tr.tr-status--CERRADO,
.table-with-status tr.tr-status--ANULADO,
.table-with-status tr.tr-status--DESIERTO,
.table-with-status tr.tr-status--RENUNCIA,
.table-with-status tr.tr-status--RESCINDIDO,
.table-with-status tr.tr-status--ERROR_ANULADO,
.table-with-status tr.tr-status--ERROR_DENEGADO,
.table-with-status tr.tr-status--ERROR_GENERADA,
.table-with-status tr.tr-status--RECHAZADA,
.table-with-status tr.tr-status--RECHAZADO,
.table-with-status tr.tr-status--RECHAZADO_PORTAFIRMAS,
.table-with-status tr.tr-status--ANULADA {
    border-left: 2px solid var(--falcon-danger);
}

.table-with-status tr.tr-status--PTE_APROBACION,
.table-with-status tr.tr-status--APROBADO,
.table-with-status tr.tr-status--APROBADO_PTE_PUBLICACION,
.table-with-status tr.tr-status--PUBLICADO,
.table-with-status tr.tr-status--EN_VALORACION_OFERTAS,
.table-with-status tr.tr-status--VALORADO_PTE_ADJUDICACION,
.table-with-status tr.tr-status--ADJUDICADO_PTE_FORMALIZACION,
.table-with-status tr.tr-status--FORMALIZADO {
    border-left: 2px solid var(--falcon-primary);
}

.table-with-status tr.tr-status--EN_EJECUCION,
.table-with-status tr.tr-status--ADJUDICADO,
.table-with-status tr.tr-status--REVISADA_CONTABILIDAD,
.table-with-status tr.tr-status--CONFIRMADO_RESERVA_CREDITO,
.table-with-status tr.tr-status--GENERADA,
.table-with-status tr.tr-status--RESUELTO,
.table-with-status tr.tr-status--RECIBIDA_DESTINO,
.table-with-status tr.tr-status--CONFORMADA,
.table-with-status tr.tr-status--CONTABILIZADA_OBLIGACION {
    border-left: 2px solid var(--licitae-kelly-green);
}

.table-with-status tr.tr-status--DESISTIDO,
.table-with-status tr.tr-status--DESIERTO,
.table-with-status tr.tr-status--RENUNCIADO {
    border-left: 2px solid black;
}

.table-with-status tr.tr-status--RETIRADO_PORTAFIRMAS,
.table-with-status tr.tr-status--ESPERANDO_REVISION,
.table-with-status tr.tr-status--DESLICITAR,
.table-with-status tr.tr-status--ESPERANDO_OFERTAS_Y_VALORACION {
    border-left: 2px solid var(--falcon-orange);
}

.table-with-status tr.tr-status--PENDIENTE_PORTAFIRMAS,
.table-with-status tr.tr-status--REGISTRADA,
.table-with-status tr.tr-status--REGISTRADA_EN_RCF {
    border-left: 2px solid var(--falcon-info);
}

.table-with-status tr.tr-status--FIRMADO_PORTAFIRMAS,
.table-with-status tr.tr-status--VERIFICADA_EN_RCF,
.table-with-status tr.tr-status--PAGADA {
    border-left: 2px solid var(--licitae-dartmouth-green);
}


.table-with-status tr.tr-status--PENDIENTE_CESION,
.table-with-status tr.tr-status--ACEPTADA_CESION,
.table-with-status tr.tr-status--RECHAZADA_CESION {
    border-left: 2px solid var(--falcon-purple);
}

tr.tarea-child-hidden {
    display: none !important;
}

tr.total-amounts {
    border-left: 0;
    border-top: 2px solid rgba(var(--falcon-dark-rgb), 1) !important;
    border-right: 0;
    border-bottom: 0;
    font-weight: 700 !important;
    text-align: right !important;
}

tr.total-amounts > td {
    border-left: 0;
    border-right: 0;
}

/* *************************
* NIVELES
* **************************/
.nivel-0 { --nivel: 0; }
.nivel-1 { --nivel: 1; }
.nivel-2 { --nivel: 2; }
.nivel-3 { --nivel: 3; }
.nivel-4 { --nivel: 4; }

td.nivel-2 > *:first-child::before,
td.nivel-3 > *:first-child::before,
td.nivel-4 > *:first-child::before {
    content: '⤷';
    color: #666;
    margin-left: -5px;
    padding-right: 5px;
}

td:is(.nivel-2, .nivel-3, .nivel-4) > *:first-child {
    padding-left: calc((var(--nivel) - 2) * var(--step) + var(--base));
}

/* ********************************************************************************************************************
 * TIMELINE
 * ********************************************************************************************************************/
.timeline-vertical .timeline-item {
    position: relative;
    height: 2.5em;
}

.timeline-vertical .timeline-item:not(:last-child)::before {
    left: 4% !important;
}

.timeline-vertical .timeline-icon {
    left: 4% !important;
}

.timeline-vertical .timeline-item-start .timeline-item-time {
    padding-left: 10rem;
}

.timeline-vertical .timeline-item-time {
    margin-top: 0 !important;
}

.help-block-timeline {
    color: var(--licitae-form-help-color);
    font-size: 0.9rem;
    margin-left: 1.5rem;
}

/* ********************************************************************************************************************
 * ICONOS
 * ********************************************************************************************************************/
.icon-item-estado {
    align-items: start;
    border: none !important;
}

.rotated-icon-fijar-cabeceras {
  transform: rotate(35deg);
}

.icon-width-1em {
    width: 1em !important;
}

.icon-xxs {
    font-size: calc(0.6 * var(--icon-font-size));
}

.icon-xs {
    font-size: calc(0.7 * var(--icon-font-size));
}

.icon-sm {
    font-size: calc(0.8 * var(--icon-font-size));
}

.icon-md {
    font-size: calc(1 * var(--icon-font-size));
}

a.animated-icon-hover {
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

a.animated-icon-hover .animated-icon {
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

a.animated-icon-hover:hover .animated-icon {
    opacity: 1;
    transform: translateX(0);
}

a.animated-icon-hover:hover {
    color: var(--falcon-primary);
}

/* ********************************************************************************************************************
 * OFFCANVAS
 * ********************************************************************************************************************/
.offcanvas {
    --licitae-offcanvas-bg-opacity: 1;
    background-color: var(--licitae-offcanvas-body-color), var(--licitae-offcanvas-bg-opacity);
}

.offcanvas-title {
    font-weight: 500;
}

.offcanvas-header-color {
    background-color: var(--licitae-navbar-color);
}

.offcanvas-body {
  background-color: white;
  height: 100%;
}

.offcanvas.offcanvas-end {
 	width: var(--licitae-offcanvas-width);
}

.offcanvas-open {
    padding-right: 38%;
    transition: padding 350ms;
}

.offcanvas-close {
    transition: padding 350ms;
}

.element-with-offcanvas-open {
    background-color: #9fd0ff91 !important;
}

.element-with-offcanvas-open .btn-link {
    color: #000000
}

.offcanvas-header .btn-close-falcon:after,
.offcanvas-header .btn-close-falcon:before {
    background-color: white !important;
}

@media (width <= 1400px) {
    .offcanvas.offcanvas-end {
        width: clamp(320px, 90vw, 420px);
        max-width: 100vw;
    }

    .offcanvas-open {
        padding-right: 0 !important;
    }

    .offcanvas-close {
        transition: none;
    }
}

/* ********************************************************************************************************************
* CARD
* *********************************************************************************************************************/

.card-header,
.card-body {
    color: var(--licitae-modal-color);
}

.detail-card {
    width: 100%;
    max-width: 1500px;
}

/* ********************************************************************************************************************
 * BOTONES WELCOME
 * ********************************************************************************************************************/

.button-welcome {
    border-radius: 1rem;
    width: 220px;
    height: 220px;
}

.button-welcome:hover {
    opacity: 0.85;
    transition: opacity .15s ease-in;
}

.button-welcome > img {
    height: 110px;
}

/* ********************************************************************************************************************
 * BOTONES WELCOME
 * ********************************************************************************************************************/

.buttonIaStyle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    background: linear-gradient(60deg, #32A2BD, #32A2BD, #33c7da, #32A2BD, #32A2BD);
    background-size: 200% 100%;
    animation: gradient-move 12s ease infinite;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.buttonIaStyle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.6);
    text-decoration: none;
    color: #fff;
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.buttonIaStyle .logoLicitaeIa {
    height: 22px;
    filter: brightness(0) invert(1); /* asegura contraste sobre fondo */
}

/* ********************************************************************************************************************
* FORMULARIOS
* ********************************************************************************************************************/

.help-block {
    color: var(--licitae-form-help-color);
    font-size: 0.9rem;    
}

.form-label {
    color: var(--licitae-form-label-color);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.form-file-dropzone {
    position: relative;
    width: 100%;
    min-height: 8rem;
    padding: 1.5rem;
    border: 2px dashed var(--falcon-gray-400, #cbd5e1);
    background-color: #fff;
    color: var(--falcon-gray-700, #495057);
    text-align: center;
    cursor: pointer;
    border-radius: var(--falcon-border-radius);
    height: auto;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-file-dropzone-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 100%;
}

.form-file-dropzone-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    background-color: var(--falcon-blue, #0d6efd);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0.35rem 0.8rem rgba(13, 110, 253, 0.2);
    white-space: nowrap;
    pointer-events: none;
}

.form-file-dropzone-text {
    font-size: 0.95rem;
    color: var(--falcon-gray-600, #5c636a);
    max-width: 100%;
    word-break: break-word;
}

.form-file-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.form-file-dropzone-input:focus {
    outline: none;
}

.form-file-dropzone--required {
    border-color: lightgray;
    background-color: lightyellow;
}

.form-file-dropzone:hover,
.form-file-dropzone:focus-within,
.form-file-dropzone--dragging {
    border-color: var(--falcon-blue, #0d6efd);
    background-color: #f0f7ff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-file-dropzone:hover .form-file-dropzone-button,
.form-file-dropzone:focus-within .form-file-dropzone-button,
.form-file-dropzone--dragging .form-file-dropzone-button {
    background-color: #0b5ed7;
}

.form-file-dropzone--has-file .form-file-dropzone-text {
    color: var(--falcon-gray-800, #343a40);
    font-weight: 600;
}

textarea.field-sizing-content {
    field-sizing: content;
}

.icono-card {
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
}

.icono-card:hover {
    border-color: #ccc;
}

input[type="radio"]:checked + .icono-card {
    border-color: #007bff;
    background-color: #e9f3ff;
    box-shadow: 0 0 0 2px #007bff33;
}

/* ********************************************************************************************************************
* Select2
* ********************************************************************************************************************/

span.select2-selection.obligatorio {
    background-color: lightyellow !important;
}

span.select2-selection.obligatorio > .select2-selection__rendered {
    background-color: lightyellow !important;
}

span.select2-selection.obligatorio > .select2-search > .select2-search__field {
    background-color: lightyellow !important;
}

/* ********************************************************************************************************************
 * CHARTS
 * ********************************************************************************************************************/

.echart {
    width: 100%;
}

/* ********************************************************************************************************************
 * VARIOS
 * ********************************************************************************************************************/
.dropzone {
    border: none;
}

.striped:nth-child(odd) {
    background: #d8e2ef33;
}

.link-disabled {
    pointer-events: none;
    color: grey
}

.breadcrumb-text > a {
    color: inherit;
}

.sangriaConFlecha:before {
    content: "⤷";
}

.loading-screen {
    margin: 0;
    z-index: 9999;
    position: fixed;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background: rgba(0,0,0,0.25)
}

.tabular-nums {
    font-variant: tabular-nums;
}

.zindex-one {
    z-index: 1;
}

.overflow-unset {
    overflow: unset !important;
}

.firefox .overflow-unset {
    overflow: unset !important;
}

.spinner-proyecto {
    --falcon-spinner-width: 3rem;
    --falcon-spinner-height: 3rem;
    background-color: transparent;
    opacity: 0;
}

.spinner-grow {
    --falcon-spinner-width: 2rem;
    --falcon-spinner-height: 2rem;
    --falcon-spinner-vertical-align: -0.125em;
    --falcon-spinner-animation-speed: 0.75s;
    --falcon-spinner-animation-name: spinner-grow;
    background-color: currentcolor;
    opacity: 0;
}

.hr-border-like {
    margin-bottom: 1rem;
    color: var(--falcon-border-color);
    border: 0;
    border-bottom: 1px solid;
    opacity: 1;
}

.w-fit-content {
    width: fit-content;
}

.hidden {
    display: none !important;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #e8f0fe;
    color: #111827;
    border: 1px solid #e8e8ef;
    border-radius: 999px;
    padding: .4rem .8rem;
    margin-left: 10px;
    font-size: .875rem;
}

.clickable {
    cursor: pointer;
}

.text-xs {
    font-size: 0.5rem;
}

.text-s {
    font-size: 0.75rem;
}

.text-l {
    font-size: 1.25rem;
}

.text-xl {
    font-size: 1.25rem;
}

/* ********************************************************************************************************************
 * MENÚ DE ACCIONES - BOTÓN PRINCIPAL + DROPDOWN
 * ********************************************************************************************************************/

td.td-acciones .btn-group .btn {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.dropdown-separator {
    border-left: 1px solid rgba(0, 0, 0, 0.15);
}

/* Mantener estilos de botón en hover dentro de tablas */
.table a.btn:hover,
.table a.btn:focus {
    color: var(--falcon-btn-hover-color) !important;
    background-color: var(--falcon-btn-hover-bg);
    border-color: var(--falcon-btn-hover-border-color);
}
