/* =========================
   CSSMios/Menu.css
   Barra superior fija + dropdowns
   ========================= */
:root {
    --topbar-h: 56px;
    --bar: rgba(18,18,18,.92);
    --stroke: rgba(255,255,255,.10);
    --btn: rgba(255,255,255,.10);
    --btn2: rgba(255,255,255,.14);
    --txt: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.70);
    --shadow: 0 12px 34px rgba(0,0,0,.35);
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    background: var(--bar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--stroke);
    z-index: 1000;
    color: var(--txt);
}

.left, .right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.right {
    margin-left: auto;
}

/* ---- Botón genérico ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: var(--btn);
    color: var(--txt);
    font-size: .93rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background .2s, transform .12s ease, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}

    .btn:hover {
        background: var(--btn2);
    }

    /* Efecto "se hunde" al pulsar */
    .btn:active {
        transform: scale(.92) translateY(2px);
        box-shadow: inset 0 3px 8px rgba(0,0,0,.4);
        background: rgba(255,255,255,.05);
        transition: transform .06s ease, box-shadow .06s ease;
    }

.logoDot {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow: var(--shadow);
    flex: 0 0 auto;
}

.btn .caret {
    display: none !important;
}

/* ---- Dropdown base ---- */
.dd {
    position: relative;
    display: inline-flex;
}

.dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    min-width: 260px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(20,20,20,.97);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03);
    z-index: 2000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.94);
    transition: opacity .25s ease, transform .25s cubic-bezier(.22,1,.36,1), visibility .25s ease;
    pointer-events: none;
}

.dd.open .dd-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ---- Items del dropdown ---- */
.dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 14px;
    border-radius: 14px;
    color: var(--txt);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 650;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: background .18s, transform .12s ease, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}

    .dd-item:hover {
        background: rgba(255,255,255,.08);
        transform: translateX(3px);
    }

    /* Efecto "se hunde" en items */
    .dd-item:active {
        transform: scale(.94) translateY(1px);
        background: rgba(255,255,255,.04);
        box-shadow: inset 0 2px 6px rgba(0,0,0,.3);
        transition: transform .06s ease, box-shadow .06s ease;
    }

.dd-sep {
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 6px 6px;
}

/* ---- Emoji en items ---- */
.dd-emoji {
    font-size: 1.2rem;
    flex: 0 0 auto;
    width: 26px;
    text-align: center;
    line-height: 1;
}

/* ---- Botón logo ---- */
.btn-logo {
    padding: 0 10px;
}

    .btn-logo img {
        height: 26px;
        width: auto;
        display: block;
        pointer-events: none;
    }

/* ---- Iconos en menús ---- */
.dd-ico {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 6px;
}

    .dd-ico.is-on {
        filter: drop-shadow(0 0 10px rgba(250,204,21,.70)) drop-shadow(0 0 18px rgba(251,191,36,.45));
    }

    .dd-ico.is-off {
        filter: grayscale(1) brightness(.85) opacity(.75);
    }

.btn .dd-ico {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 6px;
    flex: 0 0 auto;
}

/* Símbolo + (glyph) */
.dd-glyph {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    font-size: .88rem;
    line-height: 1;
    flex: 0 0 auto;
}

    .dd-glyph.plus {
        color: #e0f2fe;
        background: rgba(56,189,248,.18);
        border: 1px solid rgba(56,189,248,.55);
        box-shadow: 0 0 12px rgba(56,189,248,.35);
    }

/* ---- User dropdown: abre desde la derecha ---- */
#ddUser .dd-menu {
    right: 0;
    left: auto;
}

/* ---- Responsive ---- */
@media (max-width:520px) {
    .btn {
        padding: 0 12px;
        height: 40px;
        font-size: .88rem;
    }

    .btn-logo img {
        height: 22px;
    }

    .dd-menu {
        min-width: 230px;
        padding: 8px;
    }

    .dd-item {
        padding: 12px 12px;
        font-size: .92rem;
    }

    #ddUser .dd-menu {
        right: -4px;
    }
}

.dd-ico-glyph { font-size: 1.1em; line-height: 1; display: inline-flex; align-items: center; }
