/* ==========================================================================
   KOOR Hamburger Menu Widget — base styles
   ========================================================================== */

/* ---------- Hamburger trigger ---------- */
.koor-hamburger-wrap {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
}

.koor-hamburger {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px;
    height: 48px;
    padding: 0 !important;
    border: none !important;
    background: transparent;
    cursor: pointer;
    color: #222;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    z-index: 99999; /* above overlay so the same button serves as the close (X) button */
}

.koor-hamburger:hover {
    transform: scale(1.05);
}

.koor-hamburger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.koor-hamburger i {
    line-height: 1;
}

.koor-hamburger svg {
    display: block;
}

/* Dual-icon swap: hamburger ↔ close, driven by aria-expanded on the trigger */
.koor-hamburger__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.koor-hamburger__icon--close { display: none; }
.koor-hamburger[aria-expanded="true"] .koor-hamburger__icon--open  { display: none; }
.koor-hamburger[aria-expanded="true"] .koor-hamburger__icon--close { display: inline-flex; }

/* ---------- Overlay (backdrop) ---------- */
.koor-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    background-color: rgba(0, 0, 0, 0.45);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    box-sizing: border-box;
}

.koor-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Position-specific alignment of panel inside overlay */
.koor-overlay[data-koor-position="right"]      { justify-content: flex-end; align-items: stretch; }
.koor-overlay[data-koor-position="left"]       { justify-content: flex-start; align-items: stretch; }
.koor-overlay[data-koor-position="top"]        { justify-content: center; align-items: flex-start; padding: 0; }
.koor-overlay[data-koor-position="center"]     { justify-content: center; align-items: center; }
.koor-overlay[data-koor-position="fullscreen"] { justify-content: stretch; align-items: stretch; padding: 0 !important; }

/* ---------- Panel container ---------- */
.koor-panel {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: 520px;
    background-color: #2b2b2b;
    color: #fff;
    border-radius: 18px;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100%;
    transform: translateX(0);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1), opacity 0.25s ease;
}

.koor-panel * { box-sizing: border-box; }

/* Entry animations per position */
.koor-overlay[data-koor-position="right"] .koor-panel      { transform: translateX(20px); }
.koor-overlay[data-koor-position="left"]  .koor-panel      { transform: translateX(-20px); }
.koor-overlay[data-koor-position="top"]   .koor-panel      { transform: translateY(-100%); opacity: 1; }
.koor-overlay[data-koor-position="center"] .koor-panel,
.koor-overlay[data-koor-position="fullscreen"] .koor-panel { transform: scale(0.96); }

.koor-overlay.is-open .koor-panel {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
}

.koor-panel--fullscreen,
.koor-overlay[data-koor-position="fullscreen"] .koor-panel {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

/* Top dropdown — full-bleed width inside its overlay; border-radius handled via Elementor control */
.koor-overlay[data-koor-position="top"] .koor-panel {
    width: 100%;
    max-height: 100%; /* respects overlay padding-top so panel never exceeds viewport */
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.25s ease;
}

/* ---------- Panel header ---------- */
.koor-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
}

.koor-panel__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex: 0 0 auto;
}

.koor-panel__logo img {
    display: block;
    max-width: 100%;
    height: auto;
}

.koor-panel__avatar-wrap {
    display: inline-flex;
    text-decoration: none;
    flex: 0 0 auto;
}

.koor-panel__avatar {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.koor-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex: 0 0 auto;
    margin-left: auto;
    -webkit-appearance: none;
    appearance: none;
}

.koor-panel__close:hover {
    background-color: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.koor-panel__close i { line-height: 1; }
.koor-panel__close svg { display: block; }

.koor-panel__close--floating {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1;
}

/* ---------- Nav list ---------- */
.koor-panel__nav { width: 100%; }

.koor-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.koor-panel__item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid transparent;
}

.koor-panel--dividers .koor-panel__item {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.koor-panel--dividers .koor-panel__item:last-child {
    border-bottom: none;
}

.koor-panel__link {
    display: block;
    width: 100%;
    color: #fff;
    text-decoration: none;
    padding: 18px 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s ease, padding-left 0.25s ease;
}

.koor-panel__link:hover {
    color: #ff4a2b;
    padding-left: 4px;
}

.koor-panel__item.current-menu-item .koor-panel__link,
.koor-panel__item.current_page_item .koor-panel__link {
    color: #ff4a2b;
}

.koor-panel__notice {
    color: #fff;
    opacity: 0.6;
    padding: 12px 0;
    margin: 0;
}

/* ---------- CTA ---------- */
.koor-panel__cta-wrap {
    width: 100%;
    margin-top: 20px;
}

.koor-panel__cta {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: 18px 24px;
    background-color: #ee3a1f;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.koor-panel__cta:hover {
    background-color: #d12f17;
    transform: translateY(-1px);
}

.koor-panel__cta:active { transform: translateY(0); }

/* ---------- Social ---------- */
.koor-panel__social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    margin-top: 60px;
}

.koor-panel__social a {
    color: #cfcfcf;
    text-decoration: none;
    transition: color 0.2s ease;
}

.koor-panel__social a:hover { color: #fff; }

/* ---------- Body scroll lock ---------- */
body.koor-menu-open {
    overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .koor-overlay { padding: 10px; }
    .koor-panel {
        padding: 20px 22px;
        border-radius: 14px;
    }
    .koor-panel__link {
        padding: 14px 0;
        font-size: 17px;
    }
    .koor-panel__social {
        gap: 22px;
        margin-top: 40px;
    }
}

/* ---------- Editor preview helpers ---------- */
.elementor-editor-active .koor-overlay {
    /* keep hidden in editor unless explicitly opened */
}
