/**
 * Vision Integration Styles
 * Image previews, vision indicators, and multimodal UI
 */

/* ========================================
   IMAGE PREVIEWS
   ======================================== */

.image-previews-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
}

.image-preview-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 200px;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

.image-preview-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.image-preview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-info {
    flex: 1;
    min-width: 0;
}

.image-preview-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-preview-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
    font-size: 0.7rem;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.image-preview-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--surface-hover);
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-preview-remove:hover {
    background: #ef4444;
    color: white;
}

/* ========================================
   VISION INDICATOR
   ======================================== */

.vision-indicator {
    position: absolute;
    top: -30px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    z-index: 10;
}

.vision-icon {
    font-size: 1rem;
}

/* ========================================
   MESSAGE IMAGES
   ======================================== */

.message-content img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
    margin: 8px 0;
}

.message-content img:hover {
    transform: scale(1.02);
}

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

.image-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   VISION TOGGLE BUTTON
   ======================================== */

.vision-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vision-toggle-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
    border-color: transparent;
}

.vision-toggle-btn:hover {
    background: var(--surface-hover);
}

.vision-toggle-btn.active:hover {
    opacity: 0.9;
}

/* ========================================
   DRAG AND DROP ZONE
   ======================================== */

.input-area.drag-over {
    background: rgba(139, 92, 246, 0.1);
    border: 2px dashed #8b5cf6;
    border-radius: 16px;
}

.input-area.drag-over::after {
    content: 'Drop images here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background: var(--surface-elevated);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #8b5cf6;
    pointer-events: none;
    z-index: 100;
}

/* ========================================
   PASTE INDICATOR
   ======================================== */

.paste-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: var(--surface-elevated);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    z-index: 100;
}

.paste-indicator-icon {
    font-size: 1.2rem;
}

.paste-indicator-text {
    font-size: 0.9rem;
    color: var(--text);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .image-preview-item {
        min-width: 100%;
    }

    .image-modal-content {
        max-width: 95vw;
    }

    .vision-indicator {
        top: -25px;
        right: 5px;
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

/* ========================================
   DARK MODE ADJUSTMENTS
   ======================================== */

html[data-theme="dark"] .image-preview-item {
    background: rgba(30, 41, 59, 0.6);
}

html[data-theme="dark"] .image-preview-remove {
    background: rgba(51, 65, 85, 0.6);
}
