.iq-menu-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.iq-menu-reset-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.iq-menu-reset-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 28rem;
    padding: 0 1.5rem;
    text-align: center;
}

.iq-menu-reset-detail {
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 1rem;
}

body.dark-theme .iq-menu-reset-overlay {
    background: rgba(8, 16, 28, 0.88);
}

body.dark-theme .iq-menu-reset-detail {
    color: #adb5bd;
}

.iq-menu-quicksearch {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.iq-menu-search-header {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.iq-menu-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.iq-menu-search-row,
.iq-menu-search-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iq-menu-search-row .btn.flex-grow-1 {
    min-width: 0;
}

.iq-menu-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.iq-menu-end-simulation {
    position: relative;
    padding: 12px;
    padding-bottom: 8px;
}

.iq-menu-end-simulation .btn-danger {
    font-weight: 600;
    font-size: 13px;
}

.iq-menu-end-simulation .btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.iq-menu-version-info {
    line-height: 1.4;
}

.iq-menu-search input {
    padding-right: 32px;
}

.iq-menu-search-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.iq-menu-search .clear-search {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    font-size: 20px;
    color: #6c757d;
}

.iq-menu-search .clear-search:hover {
    color: #042c54;
}

.iq-search-results {
    position: relative;
    z-index: 1;
}

.iq-menu-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    position: relative;
}

.iq-menu-logo {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 80px;
    height: 80px;
    background-image: url('https://assets.iqschools.net/Logos/IQSMALL.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.iq-menu-item {
    margin: 0;
    position: relative;
    z-index: 1;
}

.iq-menu-item-content {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.iq-menu-item-content:hover {
    background-color: #f8f9fa;
}

.iq-menu-item-content.highlighted {
    background-color: #fff3cd;
}

.iq-menu-item-content.expanded {
    font-weight: 500;
}

.iq-menu-expand-icon {
    width: 16px;
    margin-right: 8px;
    font-size: 10px;
    color: #6c757d;
    display: inline-block;
}

.iq-menu-expand-icon-spacer {
    width: 16px;
    margin-right: 8px;
    display: inline-block;
}

.iq-menu-item-icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    margin-right: 8px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.iq-menu-item-icon-font {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6c757d;
}

.iq-menu-item-photo {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    margin-right: 8px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #dee2e6;
}

.iq-menu-item-title {
    flex: 1;
    font-size: 14px;
}

.iq-menu-badge {
    flex: 0 0 auto;
    margin-left: 8px;
    min-width: 1.25rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.iq-menu-children {
    padding-left: 24px;
    border-left: 2px solid #e9ecef;
    margin-left: 16px;
}

.iq-menu-item.actionable .iq-menu-item-content:hover {
    background-color: #e7f3ff;
    color: #042c54;
}

.iq-menu-item.has-children > .iq-menu-item-content {
    font-weight: 500;
}

/* Scrollbar styling */
.iq-menu-items::-webkit-scrollbar {
    width: 6px;
}

.iq-menu-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.iq-menu-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.iq-menu-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Saved Searches Section */
.iq-menu-section {
    margin-bottom: 16px;
}

.iq-menu-section-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    user-select: none;
    position: relative;
    z-index: 1;
}

.iq-menu-section-header:hover {
    background-color: #e9ecef;
}

.iq-menu-section-header .iq-menu-expand-icon {
    margin-right: 8px;
}

.iq-menu-section-title {
    flex: 1;
}

.iq-menu-section-activity-hub .iq-menu-section-header-with-actions {
    cursor: default;
    padding: 0;
}

.iq-menu-section-header-toggle {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    cursor: pointer;
}

.iq-menu-section-header-toggle:hover {
    background-color: #e9ecef;
}

.iq-menu-section-header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 8px 0 0;
    flex-shrink: 0;
}

.iq-menu-hub-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: #fff;
    color: #495057;
    font-size: 0.8125rem;
    line-height: 1;
    cursor: pointer;
}

.iq-menu-hub-action-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.iq-menu-hub-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.iq-menu-section-items {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.iq-menu-section-activity-hub .iq-menu-section-items.iq-menu-hub-list-collapsed {
    padding: 0;
    margin: 0;
    border-bottom: none;
}

/* Support Ticket Modal */
.support-ticket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.support-ticket-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-ticket-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px;
    border-bottom: 1px solid #dee2e6;
}

.support-ticket-modal-header .btn-close {
    padding: 8px;
}

.support-ticket-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Interactive Help dock — unscoped (stable; do not use ::deep here) */
.iq-menu-container .iq-menu-item-icon,
.iq-menu-container img.iq-menu-item-icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0;
    object-fit: contain;
}

.iq-menu-container .iq-menu-item-icon-font {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.iq-menu-container .iq-menu-item-content {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.iq-menu-help-footer {
    flex: 0 0 auto;
    border-top: 1px solid #e2e8f0;
    padding: 12px;
    background: #fff;
}

.iq-menu-help-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 2px solid #0daaea;
    border-radius: 4px;
    background: #fff;
    color: #042c54;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(4, 44, 84, 0.08);
}

.iq-menu-help-btn:hover {
    background: #f0f8ff;
    border-color: #f46a34;
    color: #042c54;
}

.iq-menu-help-btn .bi {
    font-size: 1.75rem;
    line-height: 1;
    color: #0daaea;
}

.iq-menu-help-btn:hover .bi {
    color: #0daaea;
}

.iq-menu-help-btn-hint {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
}

.iq-menu-help-btn:hover .iq-menu-help-btn-hint {
    color: #64748b;
}

/* Full-rail Help takeover (replaces menu, like Quick Search) */
.iq-menu-container.iq-menu-help-open {
    min-height: 0;
}

.iq-menu-help-mode {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 0;
    background: #fff;
}

.iq-menu-help-my-requests {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px solid #f0b4a0;
    border-radius: 4px;
    background: #fff7f4;
    color: #042c54;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.iq-menu-help-my-requests:hover {
    background: #ffefe9;
    border-color: #f46a34;
}

.iq-menu-help-my-requests .bi {
    color: #f46a34;
}

.iq-menu-search-header .iq-menu-help-context {
    margin-top: 8px;
}

.iq-menu-help-context {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 10px;
}

.iq-menu-help-context-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.iq-menu-help-context-value {
    font-size: 14px;
    font-weight: 600;
    color: #042c54;
}

.iq-menu-help-mode-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px;
    min-height: 0;
}

.iq-menu-help-mode-body .iq-help-player {
    flex: 1;
    min-height: 0;
}

.iq-menu-help-panel {
    /* legacy — takeover uses iq-menu-help-mode */
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .support-ticket-modal-content {
        max-width: 100%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .support-ticket-modal-body {
        padding: 16px;
    }
}
