/* ===== Guardian Angel — DeJure-style theme (stable) ===== */

:root{
  --ink:#0e1726;
  --muted:#5b6b7c;
  --brand:#0b5ca0;
  --accent:#c9a873;            /* soft gold accent like DeJure */
  --border:rgba(14,23,38,.10);
  --ring:rgba(11,92,160,.20);
  --card:#fff;
  --radius:14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body.ga-theme{
  margin:0;
  font:15px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:#f6f8fb;
}

/* Topbar */
.ga-topbar{
  position:sticky; top:0; z-index:30;
  backdrop-filter:saturate(120%) blur(10px);
  background:rgba(255,255,255,.85);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 18px;
}
.ga-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.ga-logo{width:36px;height:36px}
.ga-brand-text{font-weight:800;letter-spacing:.25px}
.ga-nav{display:flex;align-items:center;gap:14px}
.ga-nav a{text-decoration:none;color:var(--ink);opacity:.9}
.ga-nav a:hover{opacity:1}
.ga-user{color:var(--muted)}
.ga-link{
  padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;
}
.ga-cta{
  padding:8px 12px;border-radius:10px;border:1px solid var(--brand);
  background:var(--brand);color:#fff !important;box-shadow:0 10px 24px var(--ring);
}
.ga-chip{
  padding:6px 10px;border-radius:999px;background:rgba(11,92,160,.10);
  color:var(--brand);border:1px solid rgba(11,92,160,.10);text-decoration:none;
}

/* Notification badge on username */
.ga-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  padding:0 5px;
  margin-left:6px;
  border-radius:999px;
  background:var(--brand);
  color:#fff;
  font-size:11px;
  line-height:1.4;
}

/* NEW: Hamburger button (hidden by default, shown on mobile) */
.ga-menu-toggle{
  display:none; /* desktop: hidden */
  border:none;
  background:transparent;
  padding:6px;
  border-radius:999px;
  cursor:pointer;
}
.ga-menu-toggle span{
  display:block;
  width:20px;
  height:2px;
  background:var(--ink);
  margin:3px 0;
  transition:transform .2s ease,opacity .2s ease;
}
.ga-menu-open span:nth-child(1){
  transform:translateY(5px) rotate(45deg);
}
.ga-menu-open span:nth-child(2){
  opacity:0;
}
.ga-menu-open span:nth-child(3){
  transform:translateY(-5px) rotate(-45deg);
}

/* ===== HERO SECTION (desktop) ===== */

.ga-hero{
  display:grid;
  grid-template-columns:1fr 1fr;
  background:#fff;
  border-bottom:1px solid var(--border);
}

.ga-hero-left,
.ga-hero-right{
  position:relative;
  overflow:hidden;
}

.ga-hero-img{
  width:100%;
  height:auto;
  max-height:260px;
  object-fit:cover;
  display:block;
  filter:grayscale(100%);
}

.ga-hero-left::after,
.ga-hero-right::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(0deg, rgba(0,0,0,.25), rgba(0,0,0,.15));
  pointer-events:none;
}

.ga-hero-overlay{
  position:absolute;
  bottom:18px;
  left:24px;
  right:24px;
  color:#fff;
}

.ga-hero-overlay h1{
  margin:0;
  font-size:26px;
  font-weight:800;
  line-height:1.25;
}

/* Shell / content */
.ga-shell{
  max-width:1120px;
  margin:22px auto 48px;
  padding:0 18px;
}
.ga-content h1,
.ga-content h2{
  margin:18px 0 10px;
}
.ga-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:0 10px 24px rgba(14,23,38,.06);
}
.ga-card-grid{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

/* Forms */
form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select{
  width:100%;
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  margin-bottom:12px;
}
button,
.ga-btn{
  cursor:pointer;
}
.ga-btn{
  padding:10px 14px;
  border-radius:10px;
  background:var(--brand);
  color:#fff;
  border:1px solid var(--brand);
}
.ga-btn:hover{
  filter:brightness(1.06);
}

/* Flash */
.ga-flash{
  max-width:1120px;
  margin:18px auto 0;
  padding:0 18px;
}
.ga-flash-item{
  background:#e7f7ff;
  border:1px solid #c8eaff;
  color:#0b365c;
  padding:10px 12px;
  border-radius:10px;
  margin-bottom:8px;
}

/* Footer */
.ga-footer{
  text-align:center;
  color:var(--muted);
  padding:28px 0;
}

/* ===== CHAT UI ===== */

.ga-chat-card{
  max-width:720px;
  margin:0 auto;
}
.ga-chat-header h1{
  margin-top:0;
}
.ga-chat-status{
  font-size:14px;
  margin:4px 0;
}
.ga-chat-participants{
  font-size:14px;
  margin:4px 0 0;
}
.ga-chat-window{
  margin-top:16px;
  padding:12px;
  border-radius:12px;
  background:#f3f6fb;
  max-height:420px;
  overflow-y:auto;
}
.ga-chat-message{
  margin-bottom:10px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.ga-chat-mine{
  align-items:flex-end;
}
.ga-chat-bubble{
  padding:8px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--border);
  max-width:80%;
  white-space:pre-wrap;
  word-wrap:break-word;
}
.ga-chat-mine .ga-chat-bubble{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}
.ga-chat-meta{
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
}
.ga-chat-empty{
  font-size:14px;
  color:var(--muted);
}
.ga-chat-form{
  margin-top:16px;
}
.ga-chat-form-field{
  margin-bottom:8px;
}

/* ===== MOBILE IMPROVEMENTS (<= 900px) ===== */
@media (max-width:900px){

  .ga-topbar{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:10px 14px;
  }

  .ga-brand-text{
    display:none;
  }

  .ga-menu-toggle{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    margin-left:auto;
  }

  .ga-nav{
    display:none;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
    width:100%;
    margin-top:8px;
  }

  .ga-nav a,
  .ga-nav .ga-link,
  .ga-nav .ga-cta,
  .ga-nav .ga-chip{
    width:100%;
    text-align:left;
  }

  .ga-nav.ga-nav-open{
    display:flex;
  }

  .ga-chip{
    margin-left:0;
  }

  .ga-hero{
    grid-template-columns:1fr;
  }

  .ga-hero-right{
    display:none;
  }

  .ga-hero-img{
    max-height:190px;
  }

  .ga-hero-overlay{
    bottom:12px;
    left:16px;
    right:16px;
  }

  .ga-hero-overlay h1{
    font-size:20px;
  }

  .ga-shell{
    margin:18px auto 32px;
    padding:0 14px;
  }

  .ga-footer{
    padding:20px 0;
    font-size:13px;
  }

  .ga-chat-card{
    padding:12px;
  }
}
/* ===== Notification badge ===== */
.ga-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  margin-left:6px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:11px;
  font-weight:700;
  line-height:1;
}

/* ===== Chat bubbles ===== */
.ga-chat-log{
  margin-top:16px;
  padding-top:8px;
  border-top:1px solid var(--border);
  max-height:420px;
  overflow-y:auto;
}

.ga-chat-row{
  margin-bottom:10px;
}

.ga-chat-row--me{
  text-align:right;
}

.ga-chat-meta{
  font-size:12px;
  color:var(--muted);
  margin-bottom:2px;
}

.ga-chat-bubble{
  display:inline-block;
  padding:8px 12px;
  border-radius:14px;
  max-width:85%;
  text-align:left;
  word-wrap:break-word;
}

.ga-chat-bubble--me{
  background:var(--brand);
  color:#fff;
  border:1px solid var(--brand);
}

.ga-chat-bubble--them{
  background:#f0f3f8;
  border:1px solid var(--border);
}


/* ===== Mobile polish (chat + lawyers list) ===== */
@media (max-width: 768px) {
  /* Chat card uses almost full width on mobile */
  .chat-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 8px;
  }

  .chat-container {
    padding: 16px 12px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.45);
  }

  .chat-window {
    max-height: calc(100vh - 260px);
  }

  .chat-input-bar {
    width: 100%;
  }

  .chat-input-bar textarea {
    font-size: 15px;
  }

  /* Lawyer cards full-width stacked on mobile */
  .ga-card {
    margin-left: 8px;
    margin-right: 8px;
  }

  .ga-card-grid {
    display: block;
  }

  .ga-card-grid > .ga-card {
    width: 100%;
    margin-bottom: 12px;
  }

  .ga-btn {
    width: 100%;
    text-align: center;
  }

  .ga-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .ga-filter-bar > div {
    width: 100%;
  }
}


/* === Guardian Angel AI assistant widget === */
.ga-ai-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
}

.ga-ai-launcher-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.ga-ai-widget {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100% - 32px);
  background: rgba(15, 23, 42, 0.98);
  color: #f9fafb;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 950;
}

.ga-ai-hidden {
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
}

.ga-ai-widget {
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
  transform-origin: bottom right;
}

.ga-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.5);
}

.ga-ai-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ga-ai-header-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0f172a;
  padding: 4px;
  object-fit: contain;
}

.ga-ai-header-title {
  font-size: 14px;
  font-weight: 600;
}

.ga-ai-header-subtitle {
  font-size: 11px;
  color: #cbd5f5;
}

.ga-ai-close {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}

.ga-ai-messages {
  padding: 10px 12px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 13px;
}

.ga-ai-message {
  padding: 7px 10px;
  border-radius: 14px;
  margin-bottom: 6px;
  line-height: 1.4;
  word-wrap: break-word;
}

.ga-ai-message-assistant {
  background: rgba(30, 64, 175, 0.85);
  color: #eff6ff;
  align-self: flex-start;
}

.ga-ai-message-user {
  background: #0f172a;
  color: #e5e7eb;
  align-self: flex-end;
}

.ga-ai-message-loading {
  opacity: 0.8;
  font-style: italic;
}

.ga-ai-form {
  padding: 8px 10px 10px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ga-ai-input-province,
.ga-ai-input-text {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  padding: 6px 8px;
  resize: none;
}

.ga-ai-input-province::placeholder,
.ga-ai-input-text::placeholder {
  color: #9ca3af;
}

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

.ga-ai-footer-note {
  font-size: 11px;
  padding: 6px 10px 8px 10px;
  color: #9ca3af;
  border-top: 1px solid rgba(148, 163, 184, 0.5);
}



.ga-ai-message {
  animation: ga-ai-message-appear 0.16s ease-out;
}

@keyframes ga-ai-message-appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ga-ai-message-loading {
  opacity: 0.85;
  font-style: italic;
}


@media (max-width: 480px) {
  .ga-ai-widget {
    right: 12px;
    bottom: 88px;
    width: calc(100% - 24px);
  }

  .ga-ai-launcher {
    right: 16px;
    bottom: 16px;
  }
}
