/* Custom CSS for Atmosic OpenAir Documentation */

/* Version selector styling */
.version-selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.version-selector label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    margin-right: 10px;
    display: inline-block;
}

.version-selector select {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 200px;
}

.version-selector select:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.version-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Version content containers */
.version-content {
    transition: all 0.3s ease-in-out;
}

.version-content.hidden {
    display: none !important;
}

/* Enhanced dropdown styling */
.version-dropdown .sd-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.version-dropdown .sd-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Grid card enhancements */
.sd-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.sd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.sd-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Hide all toctree elements on main page - they should only appear in sidebar */
.toctree-wrapper {
    display: none !important;
}

.toctree-wrapper.compound {
    display: none !important;
}

/* Hide any empty toctree elements */
.toctree-wrapper:empty {
    display: none !important;
}

/* Hide compound toctree elements that might show as empty bars */
.compound .toctree-wrapper {
    display: none !important;
}

/* Specifically hide empty divs that might appear as bars */
div.toctree-wrapper.compound:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any residual toctree styling since we hide them */

/* Hide any empty divs or sections that might appear as bars */
.version-dropdown .section:empty {
    display: none !important;
}

.version-dropdown div:empty {
    display: none !important;
}

/* Hide sphinx-generated navigation elements in dropdowns */
.version-dropdown .sphinxsidebar {
    display: none !important;
}

.version-dropdown .relations {
    display: none !important;
}

/* Ensure clean spacing in dropdown content */
.version-dropdown .sd-summary-content {
    padding: 20px;
}

.version-dropdown .sd-summary-content > *:empty {
    display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .version-selector {
        padding: 15px;
        margin: 15px 0;
    }

    .version-selector label {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .version-selector select {
        width: 100%;
        min-width: auto;
    }
}

/* Sidebar customization */
.wy-nav-side {
    background: linear-gradient(180deg, #526754 0%, #3e4f40 100%);
}

.wy-menu-vertical a {
    color: #ecf0f1;
    transition: all 0.3s ease;
}

.wy-menu-vertical a:hover {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* Custom note styling */
.admonition.note {
    border-left: 4px solid #f39c12;
    background-color: #fef9e7;
    border-radius: 5px;
}

.admonition.note .admonition-title {
    background-color: #f39c12;
    color: white;
    margin: -12px -12px 12px -12px;
    padding: 8px 12px;
    font-weight: bold;
}

/* Loading animation for version switching */
.version-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Smooth transitions for content switching */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced button styling */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}
