/* Cloudmersive – Docs hover mega menu
   Prefix: .cm-docs-megamenu  (avoids collision with Products menu)
   Mobile: hide (tap still navigates to api.cloudmersive.com).
*/

.cm-docs-megamenu {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 10000;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    box-shadow: 0 20px 45px rgba(0,0,0,.15);
    padding: 18px 18px 12px;
    width: fit-content;
    max-width: 90vw;
    display: none;
    animation: cm-docs-fade-slide .12s ease-out;
}

    .cm-docs-megamenu.cm-show {
        display: block;
    }

@keyframes cm-docs-fade-slide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3 explicit flex columns — each sizes to its own content */
.cm-docs-megamenu__grid {
    display: flex;
    align-items: flex-start;
    gap: 0 24px;
}

.cm-docs-megamenu__column-wrap {
    flex: 0 0 auto;
}

/* Each category block within a column */
.cm-docs-megamenu__col {
    margin: 0 0 10px 0;
}

/* Column header */
.cm-docs-megamenu__heading {
    margin: 2px 0 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #666;
}

/* List */
.cm-docs-megamenu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .cm-docs-megamenu__list::after {
        content: "";
        display: block;
        height: 18px;
    }

.cm-docs-megamenu__item + .cm-docs-megamenu__item {
    margin-top: 2px;
}

/* Simple item link (single <a>) */
.cm-docs-megamenu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: #333;
    line-height: 1.25;
    transition: background .12s ease;
}

    .cm-docs-megamenu__link:hover,
    .cm-docs-megamenu__link:focus {
        background: #f7f7f7;
        outline: none;
    }

/* Dual-link row (API docs + explorer) — a <div> not <a> */
.cm-docs-megamenu__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 7px;
    line-height: 1.25;
    transition: background .12s ease;
}

    .cm-docs-megamenu__row:hover {
        background: #f7f7f7;
    }

.cm-docs-megamenu__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.cm-docs-megamenu__label {
    font-weight: 600;
    font-size: 13px;
    word-break: break-word;
    flex: 1 1 auto;
    color: #333;
    text-decoration: none;
}

a.cm-docs-megamenu__label:hover {
    color: #2563eb;
}

/* Pill actions for dual-link rows */
.cm-docs-megamenu__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.cm-docs-megamenu__action {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.6;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease;
}

/* "Docs" pill — outlined subtle */
.cm-docs-megamenu__action--docs {
    border: 1px solid #ccc;
    color: #555;
    background: transparent;
}

    .cm-docs-megamenu__action--docs:hover {
        background: #f0f0f0;
        color: #333;
    }

/* "Explorer" pill — filled blue (emphasized) */
.cm-docs-megamenu__action--explorer {
    border: 1px solid #2563eb;
    color: #fff;
    background: #2563eb;
}

    .cm-docs-megamenu__action--explorer:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
    }

/* Footer row */
.cm-docs-megamenu__footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(0,0,0,.06);
    margin-top: 12px;
    padding-top: 10px;
}

    .cm-docs-megamenu__footer a {
        font-weight: 600;
        text-decoration: none;
    }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cm-docs-megamenu {
        animation: none;
    }
}

/* Hide mega menu on devices without hover / mobile */
@media (hover: none), (pointer: coarse), (max-width: 992px) {
    .cm-docs-megamenu {
        display: none !important;
    }
}
