/**
 * 3D Hierarchy Menu GearBox - Frontend Styles
 */

/* CSS Reset for Menu */
.ghmgr78451245-nav-wrapper *,
.ghmgr78451245-nav-wrapper *::before,
.ghmgr78451245-nav-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ghmgr78451245-nav-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Navigation Container */
.ghmgr78451245-nav-container {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-size: 14px;
}

/* Two-Column Layout */
.ghmgr78451245-nav-columns {
    display: flex;
    width: 100%;
}

/* Left Column - Parents */
.ghmgr78451245-nav-left-column {
    width: 50%;
}

/* Right Column - Children */
.ghmgr78451245-nav-right-column {
    width: 50%;
    min-height: 245px;
    overflow-y: auto;
    max-height: 400px;
}

/* Parent Node Styles */
.ghmgr78451245-nav-parent {
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    user-select: none;
}

.ghmgr78451245-nav-parent:last-child {
    border-bottom: none;
}

.ghmgr78451245-nav-parent-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ghmgr78451245-nav-parent-arrow {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #666;
    transition: transform 0.3s ease, border-color 0.3s ease;
    margin-left: 8px;
}

.ghmgr78451245-nav-parent.ghmgr78451245-active .ghmgr78451245-nav-parent-arrow {
    transform: rotate(90deg);
}

/* Parent Image Container */
.ghmgr78451245-nav-parent-wrapper {
    position: relative;
}

.ghmgr78451245-nav-image-container {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ghmgr78451245-nav-image-container.ghmgr78451245-visible {
    height: 65px;
    border-bottom: 1px solid #b3b3b3;
}

.ghmgr78451245-nav-image-wrapper {
    position: relative;
    width: 115px;
    height: 65px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image Loading Spinner */
.ghmgr78451245-nav-image-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #666;
    border-radius: 50%;
    animation: ghmgr78451245-spinner 0.8s linear infinite;
    z-index: 1;
}

.ghmgr78451245-nav-image-spinner.ghmgr78451245-hidden {
    display: none;
}

@keyframes ghmgr78451245-spinner {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.ghmgr78451245-nav-image {
    max-width: 115px;
    max-height: 65px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ghmgr78451245-nav-image.ghmgr78451245-loaded {
    opacity: 1;
}

/* Glimmer Effect */
.ghmgr78451245-nav-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: ghmgr78451245-glimmer 2.5s infinite;
}

@keyframes ghmgr78451245-glimmer {
    0% { left: -150%; }
    100% { left: 150%; }
}

/* Child Node Styles */
.ghmgr78451245-nav-children-group {
    display: none;
}

.ghmgr78451245-nav-children-group.ghmgr78451245-visible {
    display: block;
}

.ghmgr78451245-nav-child-wrapper {
    position: relative;
}

.ghmgr78451245-nav-child {
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ghmgr78451245-nav-child-wrapper:last-child .ghmgr78451245-nav-child {
    border-bottom: none;
}

.ghmgr78451245-nav-child:hover {
    padding-left: 14px;
}

.ghmgr78451245-nav-child-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.ghmgr78451245-nav-child-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Child Node Click Image */
.ghmgr78451245-nav-child-image-container {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ghmgr78451245-nav-child-image-container.ghmgr78451245-visible {
    height: 65px;
    border-bottom: 1px solid #c4c4c4;
}

.ghmgr78451245-nav-child-image-wrapper {
    position: relative;
    width: 115px;
    height: 65px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ghmgr78451245-nav-child-image {
    max-width: 115px;
    max-height: 65px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ghmgr78451245-nav-child-image.ghmgr78451245-loaded {
    opacity: 1;
}

.ghmgr78451245-nav-child-image-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #666;
    border-radius: 50%;
    animation: ghmgr78451245-spinner 0.8s linear infinite;
    z-index: 1;
}

.ghmgr78451245-nav-child-image-spinner.ghmgr78451245-hidden {
    display: none;
}

/* Glimmer effect for child click image */
.ghmgr78451245-nav-child-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: ghmgr78451245-glimmer 2.5s infinite;
}

/* Empty State for Right Column */
.ghmgr78451245-nav-empty-state {
    height: 100%;
    min-height: 245px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-style: italic;
    font-size: 12px;
    text-align: center;
    padding: 20px;
}

.ghmgr78451245-nav-empty-state.ghmgr78451245-hidden {
    display: none;
}

/* No Children - Large Image Display */
.ghmgr78451245-nav-no-children-image {
    display: none;
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.ghmgr78451245-nav-no-children-image.ghmgr78451245-visible {
    display: block;
}

.ghmgr78451245-nav-no-children-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ghmgr78451245-nav-no-children-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ghmgr78451245-nav-no-children-img.ghmgr78451245-loaded {
    opacity: 1;
}

.ghmgr78451245-nav-no-children-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #666;
    border-radius: 50%;
    animation: ghmgr78451245-spinner 0.8s linear infinite;
    z-index: 1;
}

.ghmgr78451245-nav-no-children-spinner.ghmgr78451245-hidden {
    display: none;
}

/* Glimmer effect for no-children image */
.ghmgr78451245-nav-no-children-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 100%
    );
    transform: skewX(-25deg);
    animation: ghmgr78451245-glimmer 2.5s infinite;
}

/* Navigation Header */
.ghmgr78451245-nav-header {
    padding: 12px 15px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #666;
}

/* Accessibility Focus Styles */
.ghmgr78451245-nav-parent:focus,
.ghmgr78451245-nav-child:focus {
    outline: 2px solid #4a90d9;
    outline-offset: -2px;
}

.ghmgr78451245-nav-parent:focus:not(:focus-visible),
.ghmgr78451245-nav-child:focus:not(:focus-visible) {
    outline: none;
}

/* Scrollbar Styling (Right Column) */
.ghmgr78451245-nav-right-column::-webkit-scrollbar {
    width: 6px;
}

.ghmgr78451245-nav-right-column::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.ghmgr78451245-nav-right-column::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.ghmgr78451245-nav-right-column::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* No Items Message */
.ghmgr78451245-no-items {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}
