/* public/css/main.css */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import 'responsive.css';

:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Variables dark (default) */
  --bg1: #0f0f0e;  --bg2: #1a1a18;  --bg3: #242422;  --bg4: #2e2e2b;
  --border: rgba(255,255,255,.09);   --border2: rgba(255,255,255,.16);
  --text1: #f0efec;  --text2: #a8a49e;  --text3: #6b6864;
  --green: #97C459;  --green-dim: #3B6D11;
  --green-bg: #1a2e10;  --green-light: #C0DD97;
  
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

:root.light {
  --bg1: #f0efec;  --bg2: #ffffff;  --bg3: #f5f5f3;  --bg4: #e8e8e5;
  --border: rgba(0,0,0,.08);   --border2: rgba(0,0,0,.14);
  --text1: #1a1a18;  --text2: #5f5e5a;  --text3: #a8a49e;
  --green: #1D9E75;  --green-dim: #0F6E56;
  --green-bg: #E1F5EE;  --green-light: #5DCAA5;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg1);
  color: var(--text1);
  line-height: 1.5;
  overflow-x: hidden;
}

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Main Area Styling */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg1);
}

.chat-header {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  z-index: 10;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  position: relative;
  animation: fadeIn 0.3s ease;
}

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

.message.user {
  align-self: flex-end;
  background: var(--green);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  align-self: flex-start;
  background: var(--bg3);
  color: var(--text1);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.input-area {
  padding: 16px 24px 32px;
  background: var(--bg1);
}

.input-container {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  box-shadow: var(--shadow);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text1);
  font-family: inherit;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
}

.send-btn {
  background: var(--green);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.send-btn:hover {
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.95);
}

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text1);
  font-size: 24px;
  cursor: pointer;
}

/* Utility Classes */
.hidden { display: none !important; }

/* Chat Message Cards */
.msg-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.msg-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.msg-card .card-body { padding: 12px; }
.msg-card h4 { font-size: 0.95rem; margin-bottom: 4px; color: var(--text1); }
.msg-card p { font-size: 0.8rem; color: var(--text3); line-height: 1.3; }
.msg-card .card-footer { display: flex; border-top: 1px solid var(--border); }
.msg-card .card-footer a { flex: 1; text-align: center; padding: 10px; font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: 0.2s; }
.wa-btn { background: #25d366; color: white !important; }
.wa-btn:hover { background: #1fb355; }
.view-btn { color: var(--text2); }
.view-btn:hover { background: var(--bg3); }
.map-btn { color: var(--accent); background: none; border: none; cursor: pointer; font-size: 0.8rem; font-weight: 600; padding: 10px; flex: 1; }
.map-btn:hover { background: var(--bg3); }
.share-btn-chat { color: var(--text2); background: none; border: none; cursor: pointer; font-size: 0.8rem; font-weight: 600; padding: 10px; flex: 1; }
.share-btn-chat:hover { background: var(--bg3); color: var(--green); }

/* Google OAuth & User Session */
.google-login-banner { margin-bottom: 32px; }
.btn-google { display: inline-flex; align-items: center; gap: 10px; background: white; color: #333; border: 1px solid #ddd; padding: 12px 24px; border-radius: 50px; font-weight: 600; font-size: 0.95rem; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: box-shadow 0.2s, transform 0.2s; }
.btn-google:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.18); transform: translateY(-1px); }
.login-hint { margin-top: 10px; color: var(--text3); font-size: 0.82rem; }
.user-welcome { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 28px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.btn-logout { font-size: 0.82rem; color: var(--text3); text-decoration: underline; cursor: pointer; }
