/* css/pages/ai-assistant.css — AI Travel Assistant Styles */

/* ════════════════════════════════════════════════════════════════════
 AI HEADER
 ════════════════════════════════════════════════════════════════════ */
.ai-header {
 display: flex;
 align-items: center;
 gap: 1rem;
 padding: 1.5rem;
 background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
 border-radius: var(--radius-xl);
 margin-bottom: 1.5rem;
 border: 2px solid var(--sunset-orange);
 position: relative;
 overflow: hidden;
}

.ai-header::before {
 content: '';
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 height: 3px;
 background: linear-gradient(90deg, var(--sunset-orange), var(--ocean-teal), var(--sunset-orange));
 background-size: 200% 100%;
 animation: aiGlow 3s ease infinite;
}

@keyframes aiGlow {
 0%, 100% { background-position: 0% 50%; }
 50% { background-position: 100% 50%; }
}

.ai-avatar {
 width: 64px;
 height: 64px;
 border-radius: 50%;
 background: linear-gradient(135deg, var(--sunset-orange) 0%, var(--ocean-teal) 100%);
 display: flex;
 align-items: center;
 justify-content: center;
 position: relative;
 flex-shrink: 0;
}

.ai-avatar i {
 font-size: 2rem;
 color: white;
}

.ai-status {
 position: absolute;
 bottom: 3px;
 right: 3px;
 width: 14px;
 height: 14px;
 background: #20c997;
 border-radius: 50%;
 border: 2px solid var(--bg-card);
 animation: pulse 2s ease infinite;
}

@keyframes pulse {
 0%, 100% { box-shadow: 0 0 0 0 rgba(32, 201, 151, 0.7); }
 50% { box-shadow: 0 0 0 8px rgba(32, 201, 151, 0); }
}

.ai-info {
 flex: 1;
}

.ai-title {
 margin: 0;
 font-size: 1.5rem;
 font-weight: 700;
 color: var(--text-primary);
}

.ai-subtitle {
 margin: 0;
 font-size: 0.85rem;
 color: var(--text-muted);
}

.ai-badges {
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
 align-items: flex-end;
}

.ai-badge {
 display: inline-flex;
 align-items: center;
 gap: 0.4rem;
 padding: 0.35rem 0.75rem;
 border-radius: 999px;
 font-size: 0.75rem;
 font-weight: 600;
}

.ai-badge-primary {
 background: rgba(255, 107, 53, 0.15);
 color: var(--sunset-orange);
}

.ai-badge-success {
 background: rgba(32, 201, 151, 0.15);
 color: #20c997;
}

.ai-badge i {
 font-size: 0.7rem;
}

/* ════════════════════════════════════════════════════════════════════
 AI TABS
 ════════════════════════════════════════════════════════════════════ */
.ai-tabs {
 display: flex;
 gap: 0.5rem;
 margin-bottom: 1.5rem;
 overflow-x: auto;
 padding-bottom: 0.25rem;
}

.ai-tab {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding: 0.75rem 1rem;
 background: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: var(--radius-lg);
 color: var(--text-secondary);
 font-size: 0.9rem;
 font-weight: 500;
 cursor: pointer;
 white-space: nowrap;
 transition: all 0.2s ease;
}

.ai-tab:hover {
 background: var(--bg-elevated);
 color: var(--text-primary);
}

.ai-tab.active {
 background: var(--sunset-orange);
 border-color: var(--sunset-orange);
 color: white;
}

.ai-tab i {
 font-size: 0.9rem;
}

/* ════════════════════════════════════════════════════════════════════
 TAB CONTENT
 ════════════════════════════════════════════════════════════════════ */
.ai-tab-content {
 display: none;
}

.ai-tab-content.active {
 display: block;
 animation: fadeIn 0.3s ease;
}

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

/* ════════════════════════════════════════════════════════════════════
 CHAT TAB
 ════════════════════════════════════════════════════════════════════ */
.ai-chat-container {
 background: var(--bg-card);
 border-radius: var(--radius-xl);
 border: 1px solid var(--border-color);
 overflow: hidden;
}

.ai-chat-messages {
 height: 400px;
 overflow-y: auto;
 padding: 1.5rem;
 background: var(--bg-secondary);
 scrollbar-width: thin;
 scrollbar-color: var(--border-color) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
 width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
 background: var(--border-color);
 border-radius: 3px;
}

.ai-welcome {
 text-align: center;
 padding: 2rem;
}

.ai-welcome-icon {
 width: 80px;
 height: 80px;
 border-radius: 50%;
 background: linear-gradient(135deg, var(--sunset-orange), var(--ocean-teal));
 display: flex;
 align-items: center;
 justify-content: center;
 margin: 0 auto 1.5rem;
}

.ai-welcome-icon i {
 font-size: 2.5rem;
 color: white;
}

.ai-welcome h3 {
 margin: 0 0 0.5rem;
 font-size: 1.25rem;
 color: var(--text-primary);
}

.ai-welcome p {
 margin: 0 0 1.5rem;
 color: var(--text-muted);
}

.ai-capabilities {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
 gap: 0.75rem;
 max-width: 600px;
 margin: 0 auto;
}

.ai-capability {
 display: flex;
 align-items: center;
 gap: 0.75rem;
 padding: 0.75rem;
 background: var(--bg-card);
 border-radius: var(--radius-lg);
 font-size: 0.85rem;
 color: var(--text-secondary);
}

.ai-capability i {
 color: var(--sunset-orange);
 font-size: 1rem;
 width: 20px;
}

/* Chat Messages */
.ai-message {
 display: flex;
 gap: 0.75rem;
 margin-bottom: 1rem;
 animation: messageSlide 0.3s ease;
}

.ai-message.user {
 flex-direction: row-reverse;
}

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

.ai-message-avatar {
 width: 36px;
 height: 36px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
}

.ai-message.ai .ai-message-avatar {
 background: var(--sunset-orange);
}

.ai-message.user .ai-message-avatar {
 background: var(--bg-elevated);
}

.ai-message-avatar i {
 font-size: 0.9rem;
 color: white;
}

.ai-message.user .ai-message-avatar i {
 color: var(--text-muted);
}

.ai-message-content {
 flex: 1;
 max-width: 80%;
 padding: 0.875rem 1rem;
 border-radius: var(--radius-lg);
 font-size: 0.9rem;
 line-height: 1.6;
}

.ai-message.ai .ai-message-content {
 background: var(--bg-card);
 border-top-left-radius: 4px;
 color: var(--text-primary);
}

.ai-message.user .ai-message-content {
 background: var(--sunset-orange);
 color: white;
 border-top-right-radius: 4px;
}

.ai-typing {
 display: flex;
 gap: 0.75rem;
 margin-bottom: 1rem;
}

.ai-typing-dots {
 display: flex;
 align-items: center;
 gap: 0.25rem;
 padding: 1rem;
 background: var(--bg-card);
 border-radius: var(--radius-lg);
 border-top-left-radius: 4px;
}

.ai-typing-dots span {
 width: 8px;
 height: 8px;
 background: var(--text-muted);
 border-radius: 50%;
 animation: typingBounce 1.4s ease infinite;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
 0%, 60%, 100% { transform: translateY(0); }
 30% { transform: translateY(-4px); }
}

/* Quick Actions */
.ai-quick-actions {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding: 0.75rem 1rem;
 background: var(--bg-card);
 border-bottom: 1px solid var(--border-color);
 flex-wrap: wrap;
}

.ai-quick-label {
 font-size: 0.8rem;
 color: var(--text-muted);
 margin-right: 0.25rem;
}

.ai-quick-chip {
 padding: 0.4rem 0.75rem;
 background: var(--bg-secondary);
 border: 1px solid var(--border-color);
 border-radius: 999px;
 font-size: 0.8rem;
 color: var(--text-primary);
 cursor: pointer;
 transition: all 0.2s;
 white-space: nowrap;
}

.ai-quick-chip:hover {
 background: var(--sunset-orange);
 border-color: var(--sunset-orange);
 color: white;
}

/* Input Area */
.ai-input-area {
 display: flex;
 gap: 0.75rem;
 padding: 1rem;
 background: var(--bg-card);
}

.ai-input-wrapper {
 flex: 1;
 position: relative;
}

.ai-input {
 width: 100%;
 padding: 0.875rem 3rem 0.875rem 1rem;
 border: 1.5px solid var(--border-color);
 border-radius: var(--radius-lg);
 background: var(--bg-secondary);
 color: var(--text-primary);
 font-size: 0.95rem;
 font-family: inherit;
 transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-input:focus {
 outline: none;
 border-color: var(--sunset-orange);
 box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.ai-mic-btn {
 position: absolute;
 right: 0.5rem;
 top: 50%;
 transform: translateY(-50%);
 width: 32px;
 height: 32px;
 border: none;
 background: transparent;
 color: var(--text-muted);
 cursor: pointer;
 border-radius: 50%;
 transition: all 0.2s;
}

.ai-mic-btn:hover {
 background: var(--bg-elevated);
 color: var(--sunset-orange);
}

.ai-send-btn {
 width: 44px;
 height: 44px;
 border: none;
 background: var(--sunset-orange);
 color: white;
 border-radius: var(--radius-lg);
 cursor: pointer;
 font-size: 1rem;
 transition: all 0.2s;
 display: flex;
 align-items: center;
 justify-content: center;
}

.ai-send-btn:hover {
 transform: scale(1.05);
 box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ════════════════════════════════════════════════════════════════════
 TRANSLATE TAB
 ════════════════════════════════════════════════════════════════════ */
.translate-card,
.advice-card,
.phrases-card,
.currency-card {
 background: var(--bg-card);
 border-radius: var(--radius-xl);
 border: 1px solid var(--border-color);
 padding: 1.5rem;
}

.translate-header,
.advice-header,
.phrases-header,
.currency-header {
 margin-bottom: 1.5rem;
}

.translate-header h3,
.advice-header h3,
.phrases-header h3,
.currency-header h3 {
 margin: 0 0 0.25rem;
 font-size: 1.1rem;
 color: var(--text-primary);
 display: flex;
 align-items: center;
 gap: 0.5rem;
}

.translate-header h3 i,
.advice-header h3 i,
.phrases-header h3 i,
.currency-header h3 i {
 color: var(--sunset-orange);
}

.translate-header p,
.advice-header p,
.phrases-header p,
.currency-header p {
 margin: 0;
 font-size: 0.85rem;
 color: var(--text-muted);
}

.translate-languages {
 display: flex;
 align-items: flex-end;
 gap: 1rem;
 margin-bottom: 1.5rem;
}

.language-select-group {
 flex: 1;
}

.language-select-group label {
 display: block;
 font-size: 0.75rem;
 color: var(--text-muted);
 margin-bottom: 0.25rem;
 text-transform: uppercase;
 font-weight: 600;
}

.ai-select {
 width: 100%;
 padding: 0.625rem 0.75rem;
 border: 1.5px solid var(--border-color);
 border-radius: var(--radius-lg);
 background: var(--bg-secondary);
 color: var(--text-primary);
 font-size: 0.9rem;
 cursor: pointer;
 transition: border-color 0.2s;
}

.ai-select:focus {
 outline: none;
 border-color: var(--sunset-orange);
}

.ai-swap-btn {
 width: 40px;
 height: 40px;
 border: 1.5px solid var(--border-color);
 background: var(--bg-secondary);
 color: var(--text-muted);
 border-radius: 50%;
 cursor: pointer;
 transition: all 0.2s;
 margin-bottom: 0.25rem;
}

.ai-swap-btn:hover {
 border-color: var(--sunset-orange);
 color: var(--sunset-orange);
 transform: rotate(180deg);
}

.translate-inputs {
 display: flex;
 flex-direction: column;
 gap: 1rem;
}

.translate-input-group,
.translate-output-group {
 position: relative;
}

.ai-textarea {
 width: 100%;
 min-height: 120px;
 padding: 1rem;
 border: 1.5px solid var(--border-color);
 border-radius: var(--radius-lg);
 background: var(--bg-secondary);
 color: var(--text-primary);
 font-size: 0.95rem;
 font-family: inherit;
 resize: vertical;
 transition: border-color 0.2s;
}

.ai-textarea:focus {
 outline: none;
 border-color: var(--sunset-orange);
}

.char-count {
 position: absolute;
 bottom: 0.75rem;
 right: 1rem;
 font-size: 0.75rem;
 color: var(--text-muted);
}

.ai-translate-btn {
 align-self: center;
 padding: 0.875rem 2rem;
 background: linear-gradient(135deg, var(--sunset-orange), var(--ocean-teal));
 border: none;
 border-radius: var(--radius-lg);
 color: white;
 font-size: 0.95rem;
 font-weight: 600;
 cursor: pointer;
 transition: all 0.2s;
 display: flex;
 align-items: center;
 gap: 0.5rem;
}

.ai-translate-btn:hover {
 transform: translateY(-2px);
 box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

.ai-output {
 min-height: 120px;
 padding: 1rem;
 background: var(--bg-secondary);
 border: 1.5px solid var(--border-color);
 border-radius: var(--radius-lg);
 font-size: 0.95rem;
 color: var(--text-primary);
}

.ai-output .placeholder {
 color: var(--text-muted);
 font-style: italic;
}

.ai-context {
 margin-top: 1rem;
 padding: 1rem;
 background: rgba(255, 107, 53, 0.08);
 border: 1px solid rgba(255, 107, 53, 0.2);
 border-radius: var(--radius-lg);
}

.ai-context h4 {
 margin: 0 0 0.5rem;
 font-size: 0.85rem;
 color: var(--sunset-orange);
 display: flex;
 align-items: center;
 gap: 0.35rem;
}

.ai-context p {
 margin: 0;
 font-size: 0.85rem;
 color: var(--text-secondary);
 line-height: 1.6;
}

.translate-actions {
 display: flex;
 gap: 0.5rem;
 margin-top: 1rem;
 justify-content: flex-end;
}

.ai-action-btn {
 padding: 0.5rem 1rem;
 background: var(--bg-secondary);
 border: 1px solid var(--border-color);
 border-radius: var(--radius-md);
 color: var(--text-secondary);
 font-size: 0.8rem;
 cursor: pointer;
 transition: all 0.2s;
 display: flex;
 align-items: center;
 gap: 0.35rem;
}

.ai-action-btn:hover {
 background: var(--sunset-orange);
 border-color: var(--sunset-orange);
 color: white;
}

/* ════════════════════════════════════════════════════════════════════
 ADVICE TAB
 ════════════════════════════════════════════════════════════════════ */
.advice-search {
 display: flex;
 gap: 0.75rem;
 margin-bottom: 1.5rem;
}

.advice-input-group {
 flex: 1;
 position: relative;
}

.advice-input-group i {
 position: absolute;
 left: 1rem;
 top: 50%;
 transform: translateY(-50%);
 color: var(--sunset-orange);
}

.advice-input-group .ai-input {
 padding-left: 2.5rem;
}

.advice-types {
 display: flex;
 flex-wrap: wrap;
 gap: 0.5rem;
 margin-bottom: 1.5rem;
}

.advice-type {
 cursor: pointer;
}

.advice-type input {
 display: none;
}

.advice-type span {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding: 0.5rem 1rem;
 background: var(--bg-secondary);
 border: 1.5px solid var(--border-color);
 border-radius: var(--radius-lg);
 font-size: 0.85rem;
 color: var(--text-secondary);
 transition: all 0.2s;
}

.advice-type:hover span {
 border-color: var(--sunset-orange);
}

.advice-type input:checked + span {
 background: var(--sunset-orange);
 border-color: var(--sunset-orange);
 color: white;
}

.advice-output {
 background: var(--bg-secondary);
 border: 1px solid var(--border-color);
 border-radius: var(--radius-lg);
 padding: 1.5rem;
}

.advice-loading {
 text-align: center;
 padding: 2rem;
 color: var(--text-muted);
}

.advice-loading i {
 font-size: 2rem;
 margin-bottom: 1rem;
 color: var(--sunset-orange);
}

.advice-content {
 font-size: 0.95rem;
 line-height: 1.8;
 color: var(--text-primary);
}

.advice-content h4 {
 color: var(--sunset-orange);
 margin: 1.5rem 0 0.75rem;
}

/* ════════════════════════════════════════════════════════════════════
 PHRASES TAB
 ════════════════════════════════════════════════════════════════════ */
.phrases-setup {
 display: grid;
 grid-template-columns: 2fr 1fr;
 gap: 1rem;
 margin-bottom: 1.5rem;
}

.phrases-input-group label {
 display: block;
 font-size: 0.75rem;
 color: var(--text-muted);
 margin-bottom: 0.25rem;
 text-transform: uppercase;
 font-weight: 600;
}

.phrases-scenarios {
 display: flex;
 flex-wrap: wrap;
 gap: 0.5rem;
 margin-bottom: 1.5rem;
}

.phrase-scenario {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 padding: 0.625rem 1rem;
 background: var(--bg-secondary);
 border: 1.5px solid var(--border-color);
 border-radius: var(--radius-lg);
 font-size: 0.85rem;
 color: var(--text-secondary);
 cursor: pointer;
 transition: all 0.2s;
}

.phrase-scenario:hover {
 border-color: var(--sunset-orange);
}

.phrase-scenario.active {
 background: var(--sunset-orange);
 border-color: var(--sunset-orange);
 color: white;
}

.phrase-scenario i {
 font-size: 0.9rem;
}

.phrases-output {
 margin-top: 1.5rem;
}

.phrases-loading {
 text-align: center;
 padding: 2rem;
 color: var(--text-muted);
}

.phrases-loading i {
 font-size: 2rem;
 margin-bottom: 1rem;
 color: var(--sunset-orange);
}

.phrases-list {
 display: grid;
 gap: 1rem;
}

.phrase-item {
 display: flex;
 align-items: flex-start;
 gap: 1rem;
 padding: 1rem;
 background: var(--bg-secondary);
 border: 1px solid var(--border-color);
 border-radius: var(--radius-lg);
}

.phrase-number {
 width: 28px;
 height: 28px;
 background: var(--sunset-orange);
 color: white;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 0.8rem;
 font-weight: 600;
 flex-shrink: 0;
}

.phrase-content {
 flex: 1;
}

.phrase-english {
 font-size: 0.9rem;
 color: var(--text-muted);
 margin-bottom: 0.25rem;
}

.phrase-translation {
 font-size: 1.1rem;
 font-weight: 600;
 color: var(--text-primary);
 margin-bottom: 0.25rem;
}

.phrase-pronunciation {
 font-size: 0.85rem;
 color: var(--sunset-orange);
 font-style: italic;
}

/* ════════════════════════════════════════════════════════════════════
 CURRENCY TAB
 ════════════════════════════════════════════════════════════════════ */
.currency-converter {
 display: grid;
 grid-template-columns: 1fr 2fr auto 2fr;
 gap: 1rem;
 align-items: end;
 margin-bottom: 1.5rem;
}

.currency-input-group label,
.currency-select-group label {
 display: block;
 font-size: 0.75rem;
 color: var(--text-muted);
 margin-bottom: 0.25rem;
 text-transform: uppercase;
 font-weight: 600;
}

.currency-input-group input {
 font-size: 1.1rem;
 font-weight: 600;
}

.currency-result {
 background: var(--bg-secondary);
 border: 1px solid var(--border-color);
 border-radius: var(--radius-lg);
 padding: 1.5rem;
 text-align: center;
}

.result-amount {
 font-size: 2rem;
 font-weight: 700;
 color: var(--sunset-orange);
 margin-bottom: 0.5rem;
}

.result-rate {
 font-size: 0.9rem;
 color: var(--text-muted);
 margin-bottom: 1rem;
}

.result-tip {
 font-size: 0.85rem;
 color: var(--text-secondary);
 padding-top: 1rem;
 border-top: 1px solid var(--border-color);
}

/* ════════════════════════════════════════════════════════════════════
 BUTTONS
 ════════════════════════════════════════════════════════════════════ */
.ai-btn-primary {
 padding: 0.75rem 1.5rem;
 background: var(--sunset-orange);
 border: none;
 border-radius: var(--radius-lg);
 color: white;
 font-size: 0.9rem;
 font-weight: 600;
 cursor: pointer;
 transition: all 0.2s;
 display: inline-flex;
 align-items: center;
 gap: 0.5rem;
 white-space: nowrap;
}

.ai-btn-primary:hover {
 transform: translateY(-2px);
 box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.ai-btn-full {
 width: 100%;
 justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════
 RESPONSIVE
 ════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
 .ai-header {
 flex-direction: column;
 text-align: center;
 padding: 1rem;
 }
 
 .ai-badges {
 flex-direction: row;
 justify-content: center;
 }
 
 .ai-tabs {
 gap: 0.35rem;
 }
 
 .ai-tab {
 padding: 0.6rem 0.75rem;
 font-size: 0.8rem;
 }
 
 .ai-tab span {
 display: none;
 }
 
 .translate-languages {
 flex-direction: column;
 align-items: stretch;
 }
 
 .ai-swap-btn {
 align-self: center;
 transform: rotate(90deg);
 }
 
 .ai-swap-btn:hover {
 transform: rotate(270deg);
 }
 
 .phrases-setup {
 grid-template-columns: 1fr;
 }
 
 .currency-converter {
 grid-template-columns: 1fr 1fr;
 }
 
 .currency-converter .ai-swap-btn {
 grid-column: span 2;
 justify-self: center;
 }
 
 .advice-search {
 flex-direction: column;
 }
 
 .ai-capabilities {
 grid-template-columns: 1fr;
 }
}

@media (max-width: 480px) {
 .ai-chat-messages {
 height: 300px;
 padding: 1rem;
 }
 
 .ai-quick-actions {
 gap: 0.35rem;
 }
 
 .ai-quick-chip {
 font-size: 0.75rem;
 padding: 0.35rem 0.6rem;
 }
 
 .translate-card,
 .advice-card,
 .phrases-card,
 .currency-card {
 padding: 1rem;
 }
}
