/**
 * Equipment Fleet Styles - Two-Panel Layout
 * Version: 2.2.0
 * 
 * Layout: Uses Foundation panel layout with equipment-specific styling
 * Based on Celestial Dashboard (UCD) design pattern
 */

/* ============================================================================
   MAIN CONTAINER - Foundation Integration
   ============================================================================ */

/* Equipment-specific container styles (Foundation handles grid layout) */
.equipment-fleet-container {
    min-height: 600px;
    /* Foundation's .astroutah-two-panel provides the grid layout */
    /* Add any equipment-specific container styles here */
}

/* ============================================================================
   LEFT PANEL (Selection Panel) - UCD Style Integration
   ============================================================================ */

.ef-selection-panel {
    background: #1f2937;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ef-selection-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}



/* Selection Content (Scrollable) */
.ef-selection-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    background: #1f2937;
}

/* Custom Scrollbar */
.ef-selection-content::-webkit-scrollbar {
    width: 8px;
}

.ef-selection-content::-webkit-scrollbar-track {
    background: #1f2937;
}

.ef-selection-content::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

.ef-selection-content::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* ============================================================================
   CATEGORY GROUPS (Accordion - UCD Style)
   ============================================================================ */

.ef-group {
    margin-bottom: 2px;
    border-bottom: 1px solid #374151;
}

.ef-group:last-child {
    border-bottom: none;
}

/* Group Header (Clickable) */
.ef-group-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    gap: 10px;
    background: #2d3748;
}

.ef-group-header:hover {
    background: #374151;
}

.ef-group.expanded .ef-group-header {
    background: #374151;
    border-bottom: 1px solid #4b5563;
}

/* Toggle Arrow */
.ef-group-toggle {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    color: #60a5fa;
}

.ef-group.expanded .ef-group-toggle {
    transform: rotate(90deg);
}

/* Group Title */
.ef-group-title {
    flex: 1;
    color: #f3f4f6;
    font-size: 1em;
    font-weight: 500;
}

/* Item Count */
.ef-group-count {
    color: #9ca3af;
    font-size: 0.875em;
}

/* Group Icon */
.ef-group-icon {
    display: flex;
    align-items: center;
    color: #60a5fa;
}

/* Group Items (Collapsible List) */
.ef-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #1f2937;
}

.ef-group.expanded .ef-group-items {
    max-height: 1000px;
    transition: max-height 0.6s ease-in;
}

/* ============================================================================
   EQUIPMENT LIST ITEMS (UCD Style)
   ============================================================================ */

.ef-item {
    display: flex;
    align-items: center;
    padding: 10px 16px 10px 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    gap: 12px;
    background: #1f2937;
}

.ef-item:hover {
    background: #374151;
    border-left-color: #4b5563;
}

.ef-item.selected {
    background: #2d3748;
    border-left-color: #3b82f6;
}

/* Item Icon */
.ef-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #60a5fa;
}

/* Item Content */
.ef-item-content {
    flex: 1;
    min-width: 0;
}

.ef-item-name {
    color: #f3f4f6;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.ef-item-desc {
    color: #9ca3af;
    font-size: 0.8125rem;
}

/* ============================================================================
   RIGHT PANEL (Equipment Display) - Foundation Integration
   ============================================================================ */

.ef-display-panel {
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ef-display-container {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Custom Scrollbar for Right Panel */
.ef-display-container::-webkit-scrollbar {
    width: 8px;
}

.ef-display-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.ef-display-container::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

.ef-display-container::-webkit-scrollbar-thumb:hover {
    background: #4a9eff;
}

/* ============================================================================
   WELCOME MESSAGE (Initial State)
   ============================================================================ */

.ef-welcome {
    text-align: center;
    padding: 60px 20px;
    color: #808080;
}

.ef-welcome-icon {
    margin-bottom: 20px;
    color: #4a9eff;
    opacity: 0.5;
}

.ef-welcome h3 {
    color: #ffffff;
    font-size: 1.8em;
    margin: 0 0 15px 0;
}

.ef-welcome p {
    color: #a0a0a0;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================================================
   EQUIPMENT DISPLAY (Right Panel Content)
   ============================================================================ */

.ef-equipment-display {
    animation: fadeIn 0.3s ease-in;
}

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

/* Content Grid - Info Panel + Image Side by Side (like UCD) */
.ef-content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
}

.ef-info-section {
    min-width: 0; /* Prevents grid blowout */
}

.ef-image-section {
    position: sticky;
    top: 20px;
}

/* Equipment Image Container */
.ef-equipment-image {
    background: #f5f5f5; /* Light gray/white background - easy on eyes */
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto; /* Sets top/bottom margin to 0, left/right to auto */
    width: 100%; /* Or any specific width */
}
.ef-full-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.ef-equipment-image .img {
}


/* Actual Equipment Image */
.ef-image-actual {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Image Placeholder (when no image available) */
.ef-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px;
    background: #ffffff;
    color: #4a9eff;
    opacity: 0.8;
    border-radius: 8px;
}

.ef-image-placeholder svg {
    margin-bottom: 15px;
}

.ef-image-label {
    color: #666;
    font-size: 0.9em;
    margin: 0;
    text-align: center;
}

.ef-image-missing {
    color: #ef4444;
    font-size: 0.8em;
    margin: 10px 0 0 0;
    font-style: italic;
    text-align: center;
}

/* Responsive - Stack on smaller screens */
@media (max-width: 1200px) {
    .ef-content-grid {
        grid-template-columns: 1fr;
    }
    
    .ef-image-section {
        position: static;
        order: 2; /* Image goes below on mobile */
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - Foundation Panel Integration
   ============================================================================ */

@media (max-width: 768px) {
    .ef-selection-panel {
        border-right: none;
        border-bottom: 1px solid #2a2a2a;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .ef-display-container {
        padding: 20px 15px;
    }
    
    .ef-equipment-image {
        margin-top: 15px;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.ef-group-header:focus,
.ef-item:focus {
    outline: 2px solid #4a9eff;
    outline-offset: -2px;
}

/* ============================================================================
   PRINT STYLES - Foundation Panel Integration
   ============================================================================ */

@media print {
    .equipment-fleet-container {
    min-height: 600px;
        display: block;
        background: white;
        color: black;
    }
    
    .ef-selection-panel {
        display: none;
    }
    
    .ef-display-panel {
        background: white;
    }
}
.ef-empty-location {
    color: #6b7280;
    font-size: 13px;
    padding: 24px 16px;
    text-align: center;
    font-style: italic;
}

/* ============================================================================
   CUSTOM EQUIPMENT BADGE
   ============================================================================ */

.ef-custom-badge {
    display: inline-block;
    padding: 2px 7px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    color: #34d399;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
    margin-left: 6px;
}