/* ImageLibrary.css - Module styles for the hotel image library */

/* ========================================
   COMPLETION DASHBOARD
   ======================================== */

.il-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-layer-3);
    border: var(--border-width-1) solid var(--border-default);
    border-radius: var(--border-radius-xl);
}

.il-dashboard-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.il-stat-main {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.il-stat-number {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
}

.il-stat-separator {
    font-size: var(--text-lg);
    color: var(--text-muted);
}

.il-stat-total {
    font-size: var(--text-lg);
    color: var(--text-body);
}

.il-stat-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.il-stat-optional {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.il-progress-bar {
    height: 6px;
    background: var(--bg-layer-2);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.il-progress-fill {
    height: 100%;
    border-radius: var(--border-radius-md);
    transition: width 0.3s ease;
}

.il-progress-success { background: var(--color-success); }
.il-progress-warning { background: var(--color-warning); }
.il-progress-neutral { background: var(--border-strong); }

/* Quick jump links to missing slots */
.il-quickjumps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1_5);
}

.il-quickjump-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 600;
}

.il-quickjump {
    font-size: var(--text-xs);
    color: var(--color-warning);
    background: var(--color-warning-light);
    border: var(--border-width-1) solid var(--color-warning);
    border-radius: var(--border-radius-md);
    padding: var(--space-0_5) var(--space-2);
    cursor: pointer;
    transition: background 0.15s;
}

.il-quickjump:hover {
    background: var(--color-warning);
    color: white;
}

.il-quickjump-more {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ========================================
   SLOT GROUPS AND SLOTS
   ======================================== */

.il-slots {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.il-slot-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.il-group-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: var(--space-1);
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}

.il-slot {
    background: var(--bg-layer-4);
    border: var(--border-width-1) solid var(--border-subtle);
    border-radius: var(--border-radius-xl);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.il-slot-filled {
    border-color: var(--border-default);
}

.il-slot-empty.il-slot-required {
    border-color: var(--color-warning);
    border-style: dashed;
}

.il-slot-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.il-slot-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.il-slot-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.il-status-filled { color: var(--color-success); }
.il-status-empty { color: var(--text-muted); }

.il-slot-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-3);
}

/* Compact drop zone on the left; it grows to fill while the slot is still empty (TLP-473) */
.il-slot-content > .il-upload-zone {
    flex: 0 0 30%;
    min-width: 150px;
    max-width: 260px;
}

.il-slot-content > .il-upload-zone:only-child {
    flex: 1 1 auto;
    max-width: none;
}

/* ========================================
   IMAGE CARDS
   ======================================== */

.il-images {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    flex: 1 1 auto;
}

.il-image-card {
    position: relative;
    width: 240px;
    border: var(--border-width-1) solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: var(--bg-layer-3);
}

.il-image-card[draggable="true"] {
    cursor: grab;
}

.il-image-card.dragging {
    cursor: grabbing;
}

/* Primary = the image shown in the guest app: an unmistakable green border (TLP-473) */
.il-image-primary {
    border: 2px solid var(--color-success);
    box-shadow: 0 0 0 1px var(--color-success);
}

.il-upload-zone.il-drag-over {
    border-color: var(--color-success);
    background: var(--bg-layer-3);
}

.il-image-card.il-drag-over {
    outline: 2px dashed var(--color-primary);
    outline-offset: 2px;
}

.il-image-hero {
    border-color: var(--color-info);
}

.il-image-thumb {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-layer-2);
    position: relative;
}

.il-hero-badge,
.il-primary-badge {
    position: absolute;
    top: var(--space-1);
    left: var(--space-1);
}

.il-image-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-1);
}

/* Upload zone within a slot - compact variant */
.il-upload-zone .upload-zone-label {
    padding: var(--space-2) var(--space-3);
}

.il-upload-zone .upload-icon {
    display: none;
}

/* ========================================
   IMAGE DETAIL MODAL
   ======================================== */

.il-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.il-detail-preview {
    width: 100%;
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-layer-2);
    border-radius: var(--border-radius-md);
}

.il-detail-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.il-detail-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
}

.il-detail-label {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
}

.il-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding-top: var(--space-2);
    border-top: var(--border-width-1) solid var(--border-subtle);
}
