div:has(.ai-agents) {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #f5f7fa;
    color: #333;
}

.agent-header {
    background-color: #2c3e50;
    color: white;
}
main {
    height: calc(100% - 50px);
    overflow-y: auto;
}

form:has(button[type="submit"]:disabled) label[disabled] {
    pointer-events: none;
    background-color: #e9ecef;
    opacity: 1;
}
.text-inline {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.no-shadow {
    box-shadow: none !important;
    outline: none !important;
}
.btn.btn-xs {
    padding: .20rem .4rem;
    font-size: .725rem;
    border-radius: .1rem;
}
.btn-agent {
    background-color: #3498db;
    color: white;
}
.btn-agent:hover {
    color: white;
}
.btn-outline-agent {
    color: #3498db;
    border-color: #3498db;
}
.btn-outline-agent:hover {
    background-color: #3498db;
    color: white;
}
.btn-check:active+.btn-outline-agent, .btn-check:checked+.btn-outline-agent, .btn-outline-agent.active, .btn-outline-agent.dropdown-toggle.show, .btn-outline-agent:active {
    background-color: #3498db;
    color: white;
}

.avatar {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
}
/* PERMISOS */
/* oucultar */
.sections-agentes section button
{
    display: inline-block;
}
.sections-agentes section:not(.read):not(.write)
{
    display: none;
}
.sections-agentes section:not(.write) button
{
    display: none;
}
.sections-agentes section:has(.write)
{
    display: block;
}

.sections-agentes section:has(.write) button.agent-admin:not(.write),
.sections-agentes section:has(.write) a.agent-admin:not(.write)
{
    display: none;
}

#section-adaptativo:not(:has(.write)),
#section-canales:not(:has(.write)),
#section-avanzadas:not(:has(.write))
{
    display: none;
} 
/* =========================================================== */
/* FULL SCREEN */
.fullscreen-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}
.fullscreen-bar 
{
    /* background: #007bff; */
    /* color: #fff; */
    padding: 8px 12px;
    padding-bottom: 0;
    display: flex;
    justify-content: end;
    gap: 2px;
    align-items: center;
}
.fullscreen-content {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.fullscreen-content textarea {
    flex: 1;
    width: 100%;
    resize: none;
    font-size: 16px;
    padding: 10px;
}
/* ========================= */
.card-item {
    /* min-width: 250px; */
    /* min-height: 130px; */
    text-decoration: none;
    background-color: white;
    color: black;
    outline: 1px solid transparent;
    border: 1px solid #DDD;
    transition: .3s;
}
.card-item img {
    width: 150px;
}
.card-item .card-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.card-item:hover {
    box-shadow: 3px 3px 9px 0 #DDD;
    outline: 1px solid #DDD;
    color: black;
}

.card-item-2 {
    /* min-width: 250px; */
    /* min-height: 130px; */
    text-decoration: none;
    background-color: white;
    color: black;
    padding: 1rem;
    border-radius: .5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.card-item-2:hover {
    color: black;
    transform: scale(1.02);
}
.card-item-3
{
    border-radius: .75rem; 
    transition: transform .18s ease, box-shadow .18s ease;
}
.card-item-3:hover
{
    transform: translateY(-6px);
     box-shadow: 0 10px 30px rgba(15,23,42,.12);
}
.dialog {
    border: 1px solid #dee2e6;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
    margin: 1.75rem auto;
    width: 100%;
}
.dialog-centered {
    margin: revert;
}

tbody tr td :last-child { margin-bottom: 0; }
tr.selected *
{
    background-color: #3D75DD !important;
    color: #FFF !important;
}

.spin-in-process {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.spin-in-process::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}
.spin-in-process::after {
    position: absolute;
    top: 55%;
    content: "Por favor, espere...";
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #000;
}

@keyframes spinner
{
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width:575px)
{
    main {
        height: calc(100% - 70px);
    }

    table {
        overflow-x: hidden;
        
        & .table-responsive { all: revert; }
    }
    table thead { display: none; }
    table tbody tr {
        display: block;
        transition: .3s;
        border: 1px solid #DDD;
        border-radius: 8px;
        margin-bottom: .5rem;
    }
    table tbody tr:hover { box-shadow: 3px 3px 9px 0 #DDD; }
    table tbody tr td {
        display: flex;
        flex-wrap: wrap;
        gap: .25rem;
        padding: .3rem;
        border: none;
    }
    table tbody tr td * {
        /* white-space: pre-wrap; */      /* Mantiene saltos de línea y permite ajustar texto */
        overflow-wrap: break-word;  /* Rompe palabras largas si exceden el ancho */
        word-break: break-word;     /* Compatibilidad adicional con navegadores antiguos */
        max-width: 100%;            /* Evita que el texto crezca más allá de la burbuja */
        box-sizing: border-box;     /* Asegura que los márgenes y bordes no inflen el ancho real */
    }
    table tbody tr td::before {
        content: attr(data-label) ": ";
        font-weight: bold;
    }
}

@media (min-width:576px) {
    .dialog {
        max-width: 500px;
    }

    .dialog-sm {
        max-width: 300px
    }
}

@media (min-width:992px) {

    .dialog-lg,
    .dialog-xl {
        max-width: 800px
    }
}

@media (min-width:1200px) {
    .dialog-xl {
        max-width: 1140px
    }
}