/* šŸ’¬ Chat Sayfası - Ɩzel Stiller */ /* ==================== CHAT CONTAINER ==================== */ .chat-container { display: flex; flex-direction: column; height: calc(100vh - 80px); /* Bottom nav iƧin yer bırak */ max-height: 700px; background: var(--bg-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-medium); margin-bottom: 80px; /* Bottom nav iƧin yer */ } /* ==================== CHAT HEADER ==================== */ .chat-header { background: linear-gradient(135deg, var(--chat-color), #1565C0); color: var(--text-white); padding: var(--spacing-md); display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-light); position: relative; } .chat-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--trust-excellent) 0%, var(--trust-good) 25%, var(--trust-medium) 50%, var(--trust-low) 75%, var(--trust-bad) 100%); } .chat-title { font-size: var(--font-xl); font-weight: bold; margin: 0; display: flex; align-items: center; gap: var(--spacing-sm); } .online-count { font-size: var(--font-small); opacity: 0.9; display: flex; align-items: center; gap: var(--spacing-xs); } .online-count::before { content: 'ā—'; color: var(--trust-excellent); animation: pulse 2s infinite; } /* ==================== CHAT TABS ==================== */ .chat-tabs { display: flex; background: var(--bg-surface); border-bottom: 1px solid rgba(0,0,0,0.1); padding: 0; } .chat-tab { flex: 1; padding: var(--spacing-md); background: none; border: none; cursor: pointer; font-size: var(--font-medium); font-weight: 500; color: var(--text-secondary); border-bottom: 3px solid transparent; transition: var(--transition-fast); position: relative; display: flex; align-items: center; justify-content: center; gap: var(--spacing-xs); } .chat-tab:hover { background: rgba(25, 118, 210, 0.05); color: var(--chat-color); } .chat-tab.active { color: var(--chat-color); border-bottom-color: var(--chat-color); background: rgba(25, 118, 210, 0.1); font-weight: 600; } .chat-tab-icon { font-size: 18px; } /* Tab notification badges */ .chat-tab[data-count]::after { content: attr(data-count); position: absolute; top: 8px; right: 16px; background: var(--danger-color); color: white; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 10px; min-width: 16px; text-align: center; line-height: 1; } /* ==================== CHAT MESSAGES AREA ==================== */ .chat-messages { flex: 1; overflow-y: auto; padding: var(--spacing-md); background: var(--bg-chat); scroll-behavior: smooth; } .chat-messages::-webkit-scrollbar { width: 6px; } .chat-messages::-webkit-scrollbar-track { background: transparent; } .chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; } .chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); } /* ==================== MESSAGE COMPONENTS ==================== */ .message-item { margin-bottom: var(--spacing-md); padding: var(--spacing-md); background: var(--bg-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-light); animation: messageSlideIn 0.3s ease; position: relative; border: 1px solid rgba(0,0,0,0.05); } .message-item.bot-message { background: var(--bg-bot); border-left: 4px solid var(--chat-color); margin-left: 8px; } .message-item.own-message { background: rgba(46, 125, 50, 0.1); border-left: 4px solid var(--primary-color); margin-right: 8px; margin-left: auto; max-width: 85%; } .message-item.system-message { background: rgba(255, 143, 0, 0.1); border: 1px solid var(--secondary-color); text-align: center; font-style: italic; color: var(--text-secondary); } @keyframes messageSlideIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } /* ==================== MESSAGE HEADER ==================== */ .message-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-sm); } .message-user { display: flex; align-items: center; gap: var(--spacing-sm); } .message-user-name { font-weight: 600; color: var(--text-primary); font-size: var(--font-medium); } .message-user-trust { font-size: var(--font-small); } .message-time { font-size: var(--font-tiny); color: var(--text-hint); display: flex; align-items: center; gap: var(--spacing-xs); } .message-status { width: 12px; height: 12px; border-radius: var(--radius-full); background: var(--trust-excellent); } .message-status.sending { background: var(--trust-medium); animation: pulse 1s infinite; } .message-status.failed { background: var(--trust-bad); } /* ==================== MESSAGE CONTENT ==================== */ .message-content { color: var(--text-primary); line-height: 1.5; font-size: var(--font-medium); word-wrap: break-word; white-space: pre-wrap; } .message-content a { color: var(--chat-color); text-decoration: none; font-weight: 500; } .message-content a:hover { text-decoration: underline; } /* Message reactions */ .message-reactions { margin-top: var(--spacing-sm); display: flex; gap: var(--spacing-xs); flex-wrap: wrap; } .reaction-button { background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-xl); padding: 4px 8px; font-size: var(--font-tiny); cursor: pointer; transition: var(--transition-fast); display: flex; align-items: center; gap: 2px; } .reaction-button:hover { background: rgba(25, 118, 210, 0.1); border-color: var(--chat-color); } .reaction-button.active { background: var(--chat-color); color: white; border-color: var(--chat-color); } /* ==================== TYPING INDICATOR ==================== */ .typing-indicator { padding: var(--spacing-md); margin-bottom: var(--spacing-sm); background: rgba(0,0,0,0.05); border-radius: var(--radius-lg); font-style: italic; color: var(--text-secondary); display: flex; align-items: center; gap: var(--spacing-sm); animation: fadeIn 0.3s ease; } .typing-dots { display: flex; gap: 4px; } .typing-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--text-hint); animation: typingDot 1.4s infinite ease-in-out; } .typing-dot:nth-child(1) { animation-delay: -0.32s; } .typing-dot:nth-child(2) { animation-delay: -0.16s; } @keyframes typingDot { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } } /* ==================== CHAT INPUT ==================== */ .chat-input { display: flex; padding: var(--spacing-md); background: var(--bg-surface); border-top: 1px solid rgba(0,0,0,0.1); gap: var(--spacing-sm); align-items: flex-end; box-shadow: 0 -2px 8px rgba(0,0,0,0.1); } .chat-input-group { flex: 1; position: relative; } .chat-input input { width: 100%; padding: 12px 16px; padding-right: 80px; /* Emoji button iƧin yer */ border: 2px solid rgba(0,0,0,0.1); border-radius: var(--radius-xl); outline: none; font-size: var(--font-medium); background: var(--bg-primary); transition: var(--transition-fast); resize: none; min-height: 44px; max-height: 100px; } .chat-input input:focus { border-color: var(--chat-color); box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1); background: var(--bg-surface); } .chat-input input::placeholder { color: var(--text-hint); } /* Input accessories */ .input-accessories { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; gap: var(--spacing-xs); } .emoji-button { width: 32px; height: 32px; border: none; background: none; cursor: pointer; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: var(--transition-fast); } .emoji-button:hover { background: rgba(0,0,0,0.1); } .char-counter { position: absolute; bottom: -20px; right: 0; font-size: var(--font-tiny); color: var(--text-hint); } .char-counter.warning { color: var(--secondary-color); } .char-counter.danger { color: var(--danger-color); } /* ==================== SEND BUTTON ==================== */ .send-button { background: var(--chat-color); color: var(--text-white); border: none; border-radius: var(--radius-full); width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: var(--transition-fast); box-shadow: var(--shadow-light); } .send-button:hover:not(:disabled) { background: #1565C0; transform: scale(1.05); box-shadow: var(--shadow-medium); } .send-button:disabled { background: var(--text-hint); cursor: not-allowed; transform: none; } .send-button.sending { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* ==================== EMPTY STATE ==================== */ .chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; color: var(--text-secondary); text-align: center; padding: var(--spacing-lg); } .chat-empty-icon { font-size: 48px; margin-bottom: var(--spacing-md); opacity: 0.5; } .chat-empty-title { font-size: var(--font-large); font-weight: 600; margin-bottom: var(--spacing-sm); } .chat-empty-subtitle { font-size: var(--font-medium); opacity: 0.8; } /* ==================== LOADING STATE ==================== */ .chat-loading { display: flex; justify-content: center; align-items: center; height: 100px; color: var(--text-secondary); } .loading-spinner { width: 32px; height: 32px; border: 3px solid rgba(0,0,0,0.1); border-top: 3px solid var(--chat-color); border-radius: var(--radius-full); animation: spin 1s linear infinite; } /* ==================== INFO MESSAGES ==================== */ .info-message { text-align: center; padding: var(--spacing-lg); color: var(--text-secondary); font-style: italic; background: rgba(0,0,0,0.02); border-radius: var(--radius-md); margin: var(--spacing-md) 0; border: 1px dashed rgba(0,0,0,0.1); } .welcome-message { background: rgba(46, 125, 50, 0.1); border: 1px solid var(--primary-color); color: var(--primary-color); font-weight: 500; } .error-message { background: rgba(211, 47, 47, 0.1); border: 1px solid var(--danger-color); color: var(--danger-color); font-weight: 500; } /* ==================== MOBILE OPTIMIZATIONS ==================== */ @media (max-width: 767px) { .chat-container { height: calc(100vh - 140px); /* Header + bottom nav iƧin yer */ border-radius: 0; margin-bottom: 70px; } .chat-header { padding: var(--spacing-sm) var(--spacing-md); } .chat-title { font-size: var(--font-large); } .chat-tabs { padding: 0; } .chat-tab { padding: var(--spacing-sm); font-size: var(--font-small); } .chat-messages { padding: var(--spacing-sm); } .message-item { padding: var(--spacing-sm); margin-bottom: var(--spacing-sm); } .chat-input { padding: var(--spacing-sm); } .chat-input input { padding: 10px 14px; padding-right: 70px; font-size: var(--font-small); } .send-button { width: 40px; height: 40px; font-size: 16px; } } @media (max-width: 480px) { .message-item.own-message { max-width: 95%; } .message-header { flex-direction: column; align-items: flex-start; gap: var(--spacing-xs); } .chat-tab-icon { font-size: 16px; } .chat-tab { flex-direction: column; gap: 2px; padding: var(--spacing-xs); } } /* ==================== ACCESSIBILITY ==================== */ .chat-input input:focus, .send-button:focus, .chat-tab:focus { outline: 2px solid var(--chat-color); outline-offset: 2px; } @media (prefers-reduced-motion: reduce) { .message-item { animation: none; } .typing-dot { animation: none; } .online-count::before { animation: none; } } /* High contrast mode */ @media (prefers-contrast: high) { .message-item { border: 2px solid var(--text-primary); } .chat-tab.active { background: var(--text-primary); color: var(--bg-surface); } }