/**
 * Header Mega Menu Component Styling (Compact & Optimized)
 */
.smm-wrapper {
    position: relative;
    display: inline-block;
    direction: rtl !important;
    font-family: inherit !important;
}

.smm-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 14px;
    color: #0f172a;
    cursor: pointer;
    background-color: white;
    transition: all 0.25s ease;
    box-shadow: none;
}

.smm-trigger-btn:hover,
.smm-trigger-btn:focus,
.smm-wrapper.is-open .smm-trigger-btn {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #2563eb;
}

.smm-trigger-arrow {
    transition: transform 0.3s ease;
}

.smm-wrapper.is-open .smm-trigger-arrow {
    transform: rotate(180deg);
}

.smm-panel {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    z-index: 9999;
    width: 620px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

@media (min-width: 769px) {

    .smm-wrapper:hover .smm-panel,
    .smm-wrapper.is-open .smm-panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.smm-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    padding: 20px 24px;
}

.smm-all-link-wrap {
    grid-column: 1 / -1;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.smm-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none !important;
    padding: 6px 14px;
    background: #eff6ff;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.smm-all-link:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.smm-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 960px) {
    .smm-section {
        background: rgba(188, 188, 188, 0.07);
        border-radius: 8px;
    }
}

.smm-accordion-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 8px 0;
    border-bottom: 2px solid #f1f5f9;
    width: 100%;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    transition: background 0.15s ease;
}

@media (max-width: 960px) {
    .smm-accordion-hdr {
        padding: 17px 20px !important;
        border: 1px solid #f1f5f9 !important;
        border-radius: 8px;
        background: rgba(128, 128, 128, 0.05);
    }
}

.smm-accordion-hdr:hover,
.smm-accordion-hdr:focus {
    background: rgba(128, 128, 128, 0.15);
}

.smm-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}

.smm-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.smm-badge-dot--gold {
    background: #eab308;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.smm-badge-dot--blue {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.smm-acc-arrow {
    display: none;
    color: #64748b;
    transition: transform 0.25s ease;
}

.smm-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 380px;
    overflow-y: auto;
    padding-left: 4px;
}

.smm-grid::-webkit-scrollbar {
    width: 4px;
}

.smm-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.smm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #334155;
    transition: all 0.15s ease;
}

.smm-item:hover {
    background: #f8fafc;
    color: #2563eb;
}

.smm-item-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
}

.smm-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.smm-icon--gold {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.smm-icon--no-radius {
    border-radius: 0 !important;
}

.smm-item-name {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smm-item-arrow {
    color: #cbd5e1;
    opacity: 0;
    transform: translateX(4px);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.smm-item:hover .smm-item-arrow {
    opacity: 1;
    transform: translateX(0);
    color: #2563eb;
}

@media (max-width: 768px) {
    .smm-wrapper {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
    }

    .smm-trigger-btn {
        width: 100% !important;
        justify-content: space-between !important;
        padding: 14px 16px !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 13px !important;
    }

    .smm-trigger-btn:hover,
    .smm-trigger-btn:active,
    .smm-wrapper.is-open .smm-trigger-btn {
        background: rgba(241, 245, 249, 0.6) !important;
        border-color: #e2e8f0 !important;
        color: #2563eb !important;
    }

    .smm-panel {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        border-radius: 0 !important;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: none !important;
        background: #ffffff !important;
        padding-bottom: 70px;
    }

    .smm-wrapper.is-open .smm-panel {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .smm-container {
        grid-template-columns: 1fr !important;
        padding: 12px 14px !important;
        gap: 12px !important;
    }

    .smm-all-link-wrap {
        padding-bottom: 8px !important;
    }

    .smm-acc-arrow {
        display: block !important;
    }

    .smm-grid {
        max-height: none !important;
    }

    .smm-section.is-collapsed .smm-grid {
        display: none !important;
    }

    .smm-section.is-collapsed .smm-acc-arrow {
        transform: rotate(-90deg) !important;
    }

    .smm-item-arrow {
        opacity: 1 !important;
        transform: none !important;
        color: #94a3b8 !important;
    }
}