/* kimap/modules/overlay-manager.css */

/* The Main Grid Container */
.overlay-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 List, 1/3 Preview */
    height: 100%;
    overflow: hidden;
}

/* Left Column: Scrollable List */
.overlay-list-column {
    padding: 2rem;
    overflow-y: auto;
    border-right: 1px solid var(--pico-muted-border-color);
}

.overlay-header {
    margin-bottom: 1.5rem;
}

/* The Cards */
.overlay-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer; /* Indicates clickable for preview */
    transition: all 0.2s ease;
}

.overlay-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.overlay-card.selected {
    border-color: var(--pico-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.overlay-info h4 { margin: 0 0 0.25rem 0; color: var(--pico-color); }
.overlay-info p { margin: 0; font-size: 0.85em; color: var(--pico-muted-color); }

/* The Toggle Button (Inside the card) */
.toggle-button {
    background-color: var(--pico-secondary-background);
    border: 1px solid var(--pico-secondary-border);
    color: var(--pico-secondary-inverse);
    padding: 0.4rem 1rem;
    font-size: 0.9em;
    border-radius: var(--pico-border-radius);
    cursor: pointer;
    z-index: 2; /* Ensure button sits above card click area */
}
.toggle-button:hover { background-color: var(--pico-secondary-hover-background); }
.toggle-button.active {
    background-color: var(--pico-primary);
    border-color: var(--pico-primary);
    color: white;
}


/* Right Column: Preview Panel */
.overlay-preview-column {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    overflow-y: auto;
}

/* Sticky wrapper ensures content stays visible if the right col is tall */
.preview-sticky-wrapper {
    position: sticky;
    top: 0;
}

.preview-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Change from #000 to #2a2a2a (Dark Grey) */
    background-color: #2a2a2a; 
    border-radius: var(--pico-border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--pico-muted-border-color);
    
    /* Optional: Centering flexbox if the image is small */
    display: flex;
    align-items: center;
    justify-content: center;
}

#overlay-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

.preview-content h3 {
    color: var(--pico-primary);
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding-bottom: 0.5rem;
}

.preview-content p { font-size: 0.95em; line-height: 1.6; }
.preview-content ul { font-size: 0.9em; padding-left: 1.2rem; }