/* ==========================================
   KUSOYA AI - INPUT AREA & MODE TOGGLE
   ========================================== */

.input-area, .chat-input-area {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 16px 20px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
    position: relative;
    flex-shrink: 0;
    z-index: 100;
}

.input-form {
    max-width: 900px;
    margin: 0 auto;
}

/* MODE TOGGLE - CLAUDE STYLE */
.mode-selector-bar {
    max-width: 900px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
}

.mode-toggle-group {
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 20px;
    padding: 4px;
    gap: 4px;
}

.mode-toggle-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-toggle-btn:hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

.mode-toggle-btn.active {
    background: #ffffff;
    color: #004589;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mode-hint {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
    margin-left: 8px;
}

/* INPUT WRAPPER */
.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 10px 12px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.input-wrapper textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    outline: none;
    font-size: 15px;
    color: #111827;
    line-height: 1.5;
    max-height: 200px;
    font-family: inherit;
    padding: 2px 0;
}

.input-wrapper textarea::placeholder {
    color: #9ca3af;
}

/* SEND BUTTON */
.send-button {
    width: 32px;
    height: 32px;
    background: #004589;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #003366;
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.5;
}

.send-button i {
    font-size: 16px;
}

/* INPUT HINT */
.input-hint {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 10px;
    font-weight: 400;
}

/* THINKING ANIMATION */
.thinking-animation {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.thinking-dots {
    display: inline-block;
    animation: thinking 1.4s infinite;
}

@keyframes thinking {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

.thinking-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #004589;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Focus visible for accessibility */
.mode-toggle-btn:focus-visible {
    outline: 2px solid #004589;
    outline-offset: 2px;
}

.send-button:focus-visible {
    outline: 2px solid #004589;
    outline-offset: 2px;
}

/* Smooth transitions */
.mode-toggle-btn,
.send-button,
.input-wrapper {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ==========================================
   NEW ADDITIONS FOR KUSOYA-INPUT.CSS
   Add these styles at the bottom of your existing kusoya-input.css file
   ========================================== */

/* ==========================================
   STOP GENERATION BUTTON
   ========================================== */

.stop-button {
    width: 32px;
    height: 32px;
    background: #dc2626; /* Red color for stop */
    border: none;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    animation: pulse-red 2s ease-in-out infinite;
}

.stop-button:hover {
    background: #b91c1c; /* Darker red on hover */
    transform: scale(1.05);
}

.stop-button:active {
    transform: scale(0.95);
}

.stop-button i {
    font-size: 16px;
}

/* Pulse animation for stop button to draw attention */
@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
    }
}

/* Alternative: Orange stop button (Kusoya brand color) */
.stop-button.kusoya-orange {
    background: #f95c38;
    animation: pulse-orange 2s ease-in-out infinite;
}

.stop-button.kusoya-orange:hover {
    background: #e04a28;
}

@keyframes pulse-orange {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 92, 56, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(249, 92, 56, 0);
    }
}

/* ==========================================
   BUTTON TRANSITIONS (Send <-> Stop)
   ========================================== */

/* Smooth fade in/out when switching buttons */
.send-button,
.stop-button {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* When hiding buttons */
.send-button[style*="display: none"],
.stop-button[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

/* When showing buttons */
.send-button:not([style*="display: none"]),
.stop-button:not([style*="display: none"]) {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================
   ENHANCED SEND BUTTON (matching stop button size)
   ========================================== */

/* Make sure send button is same size as stop button */
.send-button {
    width: 32px;
    height: 32px;
    background: #004589;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: #003366;
    transform: scale(1.05);
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.5;
}

.send-button i {
    font-size: 16px;
}

/* ==========================================
   LOADING STATE FOR INPUT AREA
   ========================================== */

/* Dim the textarea while processing */
.input-wrapper.processing textarea {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .send-button,
    .stop-button {
        width: 36px;
        height: 36px;
    }
    
    .send-button i,
    .stop-button i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .send-button,
    .stop-button {
        width: 32px;
        height: 32px;
    }
    
    .send-button i,
    .stop-button i {
        font-size: 16px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.stop-button:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

.send-button:focus-visible {
    outline: 2px solid #004589;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stop-button {
        border: 2px solid #ffffff;
    }
    
    .send-button {
        border: 2px solid #ffffff;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .stop-button {
        animation: none;
    }
    
    .send-button,
    .stop-button {
        transition: none;
    }
}

/* ==========================================
   END OF NEW ADDITIONS
   ========================================== */
/* END OF INPUT STYLES */