/* ─────────────────────────────────────────────────────
   GestorFin — css_shortcode_mis_dashboards.css
   ───────────────────────────────────────────────────── */

.gf-md-wrap {
    width: 100%;
    font-family: var(--gf-fuente-texto, 'Roboto', sans-serif);
}

/* ══════════════════════════════════════════════════════
   FILAS DE EMPRESAS
   ══════════════════════════════════════════════════════ */

.gf-md-empresas {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
}

/* ── Fila (empresa + pills) ── */
.gf-md-fila {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px 14px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0,0,0,.06) !important;
}

.gf-md-fila:last-child {
    border-bottom: none !important;
}

/* ── Info empresa (logo + nombre) ── */
.gf-md-empresa-info {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}

/* ── Logo empresa ── */
.gf-md-logo {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: rgba(0,0,0,.04) !important;
    overflow: hidden !important;
}

.gf-md-logo img {
    max-width: 50px !important;
    max-height: 50px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.gf-md-logo i {
    font-size: 22px !important;
    color: var(--gf-color-acento, #FF006E) !important;
}

/* ── Nombre empresa ── */
.gf-md-empresa-nombre {
    font-family: var(--gf-fuente-encabezado, 'Roboto', sans-serif) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--gf-color-texto, #1e293b) !important;
    line-height: 1.2 !important;
}

/* ── Separador visual entre empresa y pills ── */
.gf-md-empresa-info::after {
    content: '|' !important;
    color: var(--gf-color-primario, #3A86FF) !important;
    font-weight: 300 !important;
    font-size: 1.2em !important;
    opacity: .4 !important;
    margin-left: 4px !important;
}

/* Ocultar separador cuando no hay pills */
.gf-md-fila:not(:has(.gf-md-pills)) .gf-md-empresa-info::after {
    display: none !important;
}

/* ── Toggle móvil (oculto en desktop) ── */
.gf-md-toggle-movil {
    display: none !important;
}

/* ══════════════════════════════════════════════════════
   PILLS DE DASHBOARDS
   ══════════════════════════════════════════════════════ */

.gf-md-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Pill base — outline con color primario */
.gf-md-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 7px 18px !important;
    background: transparent !important;
    color: var(--gf-color-primario, #3A86FF) !important;
    border: 2px solid var(--gf-color-primario, #3A86FF) !important;
    border-radius: 50px !important;
    font-family: var(--gf-fuente-encabezado, 'Roboto', sans-serif) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .2s, color .2s, transform .1s, box-shadow .2s !important;
    box-shadow: none !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

.gf-md-pill:hover {
    background: var(--gf-color-primario, #3A86FF) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(58,134,255,.25) !important;
}

/* Pill activo — relleno con color primario */
.gf-md-pill.gf-md-pill--activo {
    background: var(--gf-color-primario, #3A86FF) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(58,134,255,.3) !important;
    transform: none !important;
}

/* ══════════════════════════════════════════════════════
   ÁREA VIEWER (PLACEHOLDER + IFRAME)
   ══════════════════════════════════════════════════════ */

.gf-md-viewer {
    width: 100% !important;
    margin-top: 8px !important;
}

/* Placeholder "Selecciona un dashboard" */
.gf-md-placeholder {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 48px 32px !important;
    border: 2px dashed #e2e8f0 !important;
    border-radius: 14px !important;
    color: #94a3b8 !important;
    text-align: center !important;
}

.gf-md-placeholder i {
    font-size: 44px !important;
    opacity: .3 !important;
    color: var(--gf-color-primario, #3A86FF) !important;
}

.gf-md-placeholder p {
    margin: 0 !important;
    font-size: 16px !important;
    font-family: var(--gf-fuente-texto, 'Roboto', sans-serif) !important;
}

/* ══════════════════════════════════════════════════════
   CLASES DE CONTROL (JS las añade/quita)
   ══════════════════════════════════════════════════════ */

/* Ocultar placeholder al seleccionar dashboard */
.gf-md--oculto {
    display: none !important;
}

/* iframe-wrap oculto por defecto; visible solo con clase JS */
.gf-md-iframe-wrap {
    display: none !important;
    width: 100% !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.08) !important;
}

.gf-md-iframe-wrap.gf-md--visible {
    display: block !important;
}

/* Contenedor del iframe — aspect ratio 16:9 */

.gf-md-iframe-inner {
    position: relative !important;
    width: 100% !important;
    padding-top: 56.25% !important; /* 16:9 */
}

.gf-md-iframe-inner iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤768px)
   ══════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    .gf-md-empresa-nombre {
        font-size: 16px !important;
    }

    .gf-md-pill {
        font-size: 16px !important;
        padding: 6px 14px !important;
    }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — MÓVIL (≤480px)
   ══════════════════════════════════════════════════════ */

@media (max-width: 480px) {

    .gf-md-empresa-nombre {
        font-size: 12px !important;
    }

    /* Mostrar toggle y ocultar separador */
    .gf-md-toggle-movil {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        background: none !important;
        border: 1.5px solid var(--gf-color-primario, #3A86FF) !important;
        border-radius: 50% !important;
        color: var(--gf-color-primario, #3A86FF) !important;
        cursor: pointer !important;
        font-size: 12px !important;
        transition: transform .25s, background .2s, color .2s !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
    }

    .gf-md-toggle-movil.gf-md-toggle--abierto {
        background: var(--gf-color-primario, #3A86FF) !important;
        color: #fff !important;
    }

    .gf-md-toggle-movil.gf-md-toggle--abierto i {
        transform: rotate(180deg) !important;
    }

    .gf-md-empresa-info::after {
        display: none !important;
    }

    /* Fila en columna: empresa arriba, pills debajo */
    .gf-md-fila {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }

    /* Pills ocultas por defecto en móvil, visibles al abrir */
    .gf-md-pills {
        display: none !important;
        width: 100% !important;
        padding: 10px 0 4px !important;
        gap: 6px !important;
    }

    .gf-md-pills.gf-md-pills--visible {
        display: flex !important;
    }

    .gf-md-pill {
        font-size: 12px !important;
        padding: 5px 12px !important;
    }
}
