
/* ========== INPUT AREA ========== */
.input-section {
    flex-shrink: 0;
    width: 100%;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    z-index: 100;
    padding: var(--spacing-md) var(--spacing-lg);
}

.input-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-sm);
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    border: 1px solid var(--color-border);
    transition: border-color 0.2s ease;
}

.input-row:focus-within {
    border-color: var(--color-accent);
}

.input-wrapper {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
}

#messageInput {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    padding: var(--spacing-sm) 0;
    border: none;
    background: transparent;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    resize: none;
}

#messageInput::placeholder {
    color: var(--color-text-muted);
}

/* Botones */
.btn-attach,
.btn-send {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-attach {
    color: var(--color-text-secondary);
}

.btn-attach:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text-primary);
}

.btn-send {
    background-color: var(--color-accent);
    color: white;
}

.btn-send:hover:not(:disabled) {
    background-color: var(--color-accent-hover);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botón Stop */
.btn-stop {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
    animation: pulse-red 1.5s ease-in-out infinite;
}

.btn-stop:hover {
    background-color: #c82333;
}

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.loading-dots {
    display: flex;
    gap: var(--spacing-xs);
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: var(--radius-full);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.loading-text {
    color: var(--color-text-secondary);
    font-size: 14px;
}
