/* style.css — Unique styles not covered by component CSS files.
   Component styles are in: tokens.css, base.css, components/*.css, mobile.css
   This file contains ONLY styles that don't belong in any component file. */

/* ── Browse Files Button ── */
.tab-browse-files {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--duration-normal) var(--ease-default),
                background var(--duration-normal) var(--ease-default);
}

.tab-browse-files:hover {
    color: var(--accent-default);
    background: var(--accent-soft);
}

/* ── Attach Image Button ── */
.tab-attach-image {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--duration-normal) var(--ease-default),
                background var(--duration-normal) var(--ease-default);
}

.tab-attach-image:hover {
    color: var(--accent-default);
    background: var(--accent-soft);
}

/* ========================================
   Image Preview Modal
   ======================================== */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.image-preview-modal.active {
    display: flex;
}

.image-preview-content {
    width: 480px;
    max-width: 90vw;
}

/* Image Preview Container */
.image-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-4);
    background: var(--surface-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    min-height: 80px;
    max-height: 300px;
    overflow: hidden;
}

.image-preview-thumbnail {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* Image Preview Info */
.image-preview-info {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

/* Image Preview Caption */
.image-preview-caption {
    width: 100%;
    padding: var(--space-2-5) var(--space-3);
    background: var(--surface-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--text-md);
    font-family: var(--font-mono);
    outline: none;
    transition: border-color var(--duration-normal) var(--ease-default);
    box-sizing: border-box;
}

.image-preview-caption:focus {
    border-color: var(--accent-default);
}

.image-preview-caption::placeholder {
    color: var(--text-secondary);
}

/* Image Preview Error */
.image-preview-error {
    color: var(--status-error);
    font-size: var(--text-base);
    padding: var(--space-2);
    margin-top: var(--space-2);
}

/* Send Button Loading State */
#sendImageBtn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.send-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-inverse, #fff);
    border-radius: var(--radius-full);
    animation: spin 0.6s linear infinite;
}

/* Image Drop Zone */
.image-drop-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    background: var(--accent-soft);
    border: 2px dashed var(--accent-default);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.drop-zone-content {
    text-align: center;
    color: var(--accent-default);
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
}

.drop-zone-content svg {
    display: block;
    margin: 0 auto var(--space-2);
    width: 48px;
    height: 48px;
    stroke: var(--accent-default);
}

/* Image Preview Mobile Responsive */
@media (max-width: 480px) {
    .image-preview-content {
        width: 100%;
        max-width: 95vw;
    }

    .image-preview-container {
        max-height: 200px;
    }

    .image-preview-modal .modal-footer {
        flex-direction: column;
        gap: var(--space-2);
    }

    .image-preview-modal .modal-footer .btn {
        width: 100%;
    }
}

/* ── @keyframes fadeIn (used by plan-modal animation) ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
