/* =========================================================
   Personals Classifieds – Mobile App UI (v12 ORIGINAL)
   File: assets/css/style.css
   ========================================================= */

/* ---------- RESET / BASE ---------- */
*{box-sizing:border-box}
:root{
  --blue:#0b63f9;
  --blue2:#2a5298;
  --ink:#0f172a;
  --muted:#64748b;
  --card:#ffffff;
  --bg:#f6f9fc;
  --br:#e6eaf3;
}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:#333;
  font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;
}

/* ---------- APP SHELL ---------- */
.appbar{
  position:sticky;top:0;z-index:1000;
  height:56px;padding:0 12px;
  display:flex;align-items:center;justify-content:space-between;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  color:#fff;box-shadow:0 6px 18px rgba(11,99,249,.25)
}
.appbar__title{font-weight:900;letter-spacing:.2px}
.icon-btn{
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.25);
  color:#fff;width:38px;height:38px;border-radius:12px;
  display:grid;place-items:center;cursor:pointer
}
.app-body{padding:12px 16px 110px}

/* ---------- HERO (mini) ---------- */
.hero{
  margin:6px 0 12px;padding:14px;border-radius:18px;color:#fff;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  box-shadow:0 12px 28px rgba(11,99,249,.25)
}
.hero h1{margin:4px 0 8px;font-size:22px;font-weight:900}
.hero p{margin:0;opacity:.9}
.hero__cta{margin-top:10px}

/* ---------- SEARCH (pill) ---------- */
.searchbar{
  display:flex;align-items:center;gap:10px;
  background:#fff;border:1px solid var(--br);
  border-radius:14px;padding:10px 12px;
  box-shadow:0 10px 24px rgba(11,99,249,.08)
}
.searchbar i{color:#5b6ea7}
.searchbar input{flex:1;border:0;outline:none;font-size:15px}

/* ---------- SECTION HEAD ---------- */
.sectionhead{
  display:flex;justify-content:space-between;align-items:flex-end;
  margin:14px 2px 8px
}
.sectionhead h3{margin:0;font-size:16px;color:var(--ink);font-weight:900}
.sectionhead a{color:var(--blue2);text-decoration:none;font-weight:800;font-size:13px}

/* ---------- CHIPS (horizontal) ---------- */
.chips{display:flex;gap:10px;overflow:auto;padding:4px 2px 8px}
.chips::-webkit-scrollbar{display:none}
.chip{
  display:inline-flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--br);
  padding:10px 12px;border-radius:999px;
  font-weight:800;color:var(--blue2);text-decoration:none;
  white-space:nowrap
}
.chip i{color:var(--blue)}
.chip--cta{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;border:0}

/* ---------- GRID CARDS ---------- */
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.card{
  background:var(--card);border-radius:16px;overflow:hidden;
  box-shadow:0 10px 24px rgba(2,6,23,.08);position:relative
}
.card__media{height:150px;background:#eef2ff;position:relative}
.card__media img{width:100%;height:100%;object-fit:cover;display:block}
.price{
  position:absolute;right:10px;top:10px;background:var(--blue2);color:#fff;
  border-radius:10px;padding:6px 9px;font-size:12px;font-weight:900
}
.heart{
  position:absolute;left:10px;top:10px;border:0;background:rgba(255,255,255,.8);
  backdrop-filter:blur(6px);width:36px;height:36px;border-radius:10px;
  display:grid;place-items:center;cursor:pointer
}
.heart i{color:var(--blue2)}
.card__body{padding:12px}
.meta{font-size:12px;color:var(--muted);margin-bottom:6px}
.title{margin:0 0 10px;font-size:14px;font-weight:900;color:var(--ink)}

/* ---------- BUTTONS / UTILS ---------- */
.btn{
  display:inline-block;border:0;border-radius:12px;padding:10px 14px;
  font-weight:900;cursor:pointer;text-align:center;text-decoration:none
}
.btn-light{background:#eef2ff;color:var(--blue2)}
.btn-outline{background:#fff;border:1px solid var(--br);color:var(--blue2)}
.btn-glow{
  background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;
  box-shadow:0 10px 22px rgba(11,99,249,.35)
}
.w-100{width:100%}

/* ---------- FAB + TABBAR ---------- */
.fab{
  position:fixed;right:18px;bottom:86px;z-index:50;width:58px;height:58px;border-radius:16px;
  display:grid;place-items:center;color:#fff;text-decoration:none;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  box-shadow:0 14px 30px rgba(11,99,249,.4)
}
.fab i{font-size:20px}

.tabbar{
  position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--br);
  display:grid;grid-template-columns:repeat(4,1fr);z-index:40;
  padding-bottom:calc(env(safe-area-inset-bottom,0))
}
.tab{
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:10px 6px 8px;color:#334155;text-decoration:none;font-weight:800
}
.tab i{font-size:18px}
.tab.active,.tab:hover{color:var(--blue2)}
.safe-bottom{height:calc(12px + env(safe-area-inset-bottom,0))}

/* ---------- FILTERS BAR (ads.php) ---------- */
.filters-bar{
  position:sticky; top:56px; z-index:20;
  background:var(--bg); padding:8px 0 4px; margin:2px 0 6px;
}
.filters-row{display:flex;align-items:center;gap:10px}
.select{
  background:#fff;border:1px solid var(--br);border-radius:12px;
  padding:8px 10px;display:flex;align-items:center;gap:8px;
  box-shadow:0 6px 18px rgba(2,6,23,.06)
}
.select i{color:var(--blue2)}
.select select{
  border:0;background:transparent;outline:none;font-weight:800;color:var(--ink)
}
.prices{display:flex;align-items:center;gap:8px;margin-left:auto}
.prices .price{
  width:90px;background:#fff;border:1px solid var(--br);border-radius:12px;padding:8px 10px;outline:none
}
.prices .sep{color:var(--muted)}

/* ---------- AUTH SCREENS (login & register) ---------- */
.auth-screen{
  display:flex;align-items:center;justify-content:center;padding:30px 16px
}
.auth-card{
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  border-radius:22px;
  box-shadow:0 14px 32px rgba(11,99,249,.25);
  padding:28px 22px;
  max-width:400px;width:100%;
  color:#fff;text-align:center
}
.auth-card h2{margin:0 0 6px;font-size:22px;font-weight:900}
.auth-card .muted{margin:0 0 20px;font-size:13px;opacity:.85;color:#f1f5f9}
.error{background:#fee2e2;color:#991b1b;padding:8px 12px;border-radius:10px;margin-bottom:14px;font-size:13px}

/* Input group with icons (glass) */
.form-group{
  display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.25);
  border-radius:14px;padding:10px 12px;margin-bottom:14px;
  backdrop-filter:blur(6px)
}
.form-group i{color:#fff}
.form-group input{
  flex:1;border:0;background:transparent;outline:none;font-size:14px;color:#fff
}
.form-group input::placeholder{color:rgba(255,255,255,.7)}

.auth-card .btn-glow{
  margin-top:4px;background:#fff;color:var(--blue2);
  font-weight:900;box-shadow:0 10px 24px rgba(0,0,0,.2)
}
.switch{margin-top:16px;font-size:13px;color:#f1f5f9}
.switch a{color:#fff;font-weight:700;text-decoration:none}

/* ---------- FOOTER (optional) ---------- */
.app-footer{background:#fff;border-top:1px solid var(--br);margin-top:24px}
.app-footer .container{max-width:1100px;margin:0 auto;padding:14px 20px;text-align:center}

/* ---------- RESPONSIVE TWEAKS ---------- */
@media(min-width:680px){
  .grid{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:1024px){
  .grid{grid-template-columns:repeat(4,1fr)}
}

/* ---------- Wave Register UI ---------- */
.reg-shell{padding:0 16px 110px}
.wave-head{position:relative;height:140px;margin:0 -16px 0 -16px}
.wave{position:absolute;left:0;right:0;top:0;width:100%;height:140px;display:block}
.tab-switch{position:absolute;bottom:14px;right:22px;display:flex;gap:14px;font-weight:800}
.tab-switch a{color:#cfe1ff;text-decoration:none}
.tab-switch a.active{color:#fff;border-bottom:2px solid #fff;padding-bottom:4px}

.reg-card{
  margin-top:-22px;background:#fff;border-radius:18px;
  box-shadow:0 12px 28px rgba(2,6,23,.10);padding:18px 16px
}
.reg-card h2{margin:6px 2px 12px;font-weight:900;color:#0f172a}
.error{background:#fee2e2;color:#991b1b;padding:8px 12px;border-radius:10px;margin-bottom:12px;font-size:13px}

/* Line inputs */
.line-input{display:block;margin:10px 2px 6px}
.line-input span{display:block;font-size:12px;color:#64748b;margin-bottom:6px}
.line-input input{
  width:100%;border:0;border-bottom:2px solid #dbe3f4;background:transparent;
  padding:10px 2px;font-size:15px;outline:none;border-radius:0
}
.line-input input:focus{border-color:#2a73ff}

/* Agree checkbox (custom) */
.agree{display:flex;align-items:center;gap:10px;margin:12px 2px 16px;font-size:13px;color:#475569}
.agree input{appearance:none;width:18px;height:18px;border:2px solid #bcd0ff;border-radius:5px;display:inline-block;position:relative}
.agree input:checked{background:#2a73ff;border-color:#2a73ff}
.agree i{display:none}
.agree a{color:#2a73ff;text-decoration:none;font-weight:800}

/* CTA button */
.wave-btn{
  width:100%;background:linear-gradient(135deg,#0b63f9,#2a73ff);
  color:#fff;border-radius:12px;font-weight:900;padding:12px 14px;
  box-shadow:0 12px 26px rgba(11,99,249,.35)
}
.undertext{margin:14px 2px 4px;font-size:13px;color:#64748b;text-align:center}
.undertext a{color:#2a73ff;text-decoration:none;font-weight:800}

/* =========================================================
   CHAT UI (neumorphic container + WhatsApp-style bubbles)
   ========================================================= */

/* Page gradient container for chat-room.php */
.chat-scaffold{
  min-height:calc(100vh - 56px);
  padding:12px 12px 110px;
  background:linear-gradient(180deg,#eef3ff 0%, #f6f9ff 60%, #f8fbff 100%);
  display:flex; align-items:stretch; justify-content:center;
}

/* White rounded chat card */
.chat-card{
  width:100%; max-width:860px; background:#fff; border-radius:24px;
  box-shadow:0 18px 40px rgba(11,99,249,.10), 0 4px 12px rgba(2,6,23,.06);
  overflow:hidden; display:flex; flex-direction:column;
}

/* Chat header */
.chat-top{
  position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; background:#f9fbff; border-bottom:1px solid #e6ecfb;
}
.ct-title{font-weight:900; font-size:20px; color:#0f172a}
.ct-action{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;text-decoration:none;
  background:linear-gradient(135deg,#eaf1ff,#ffffff);
  box-shadow:inset 2px 2px 6px rgba(0,0,0,.06), inset -3px -3px 8px rgba(255,255,255,.9), 0 6px 18px rgba(11,99,249,.15);
  color:var(--blue);
}

/* Scrollable area */
.chat-stream{flex:1; overflow:auto; padding:16px 14px 96px; background:#fbfdff; position:relative}
.chat-stream::after{content:""; display:block; clear:both}

/* Date chip */
.chat-stream .date-chip{
  display:inline-block; margin:10px auto; text-align:center;
  background:#edf4ff; color:#2a5298; font-weight:700; font-size:12px;
  padding:4px 10px; border-radius:999px; box-shadow:0 6px 16px rgba(11,99,249,.10);
}

/* Bubbles (final) */
.chat-stream .bubble{
  display:inline-block;          /* content ke hisaab se width */
  max-width:75%;
  padding:10px 14px 20px;        /* time ke liye extra niche */
  margin:8px 0;
  border-radius:18px;
  position:relative;
  line-height:1.45;
  font-size:15px;
  word-break:break-word;
  white-space:pre-wrap;
  clear:both;                    /* har bubble nayi line */
  box-shadow:0 6px 14px rgba(2,6,23,.06);
}
.chat-stream .bubble.me{
  float:right;
  background:linear-gradient(135deg,#4e7bff,#0b63f9);
  color:#fff;
  border-bottom-right-radius:6px;
}
.chat-stream .bubble.them{
  float:left;
  background:#f3f7ff;
  color:#0f172a;
  border:1px solid #e7edfb;
  border-bottom-left-radius:6px;
}
.chat-stream .bubble .name{
  font-size:11px; font-weight:700; color:#5b6ea7; margin-bottom:4px
}
.chat-stream .bubble .name a{color:#2a5298; text-decoration:none}
.chat-stream .bubble .name a:hover{text-decoration:underline}
.chat-stream .bubble .time{
  position:absolute; right:10px; bottom:4px;
  font-size:11px; opacity:.7; color:#6b7280
}
.chat-stream .bubble.me .time{color:rgba(255,255,255,.9)}

/* Input bar (floating) */
.chat-inputbar{
  position:fixed; left:0; right:0; bottom:0; z-index:3;
  display:flex; gap:10px; align-items:center;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom,0));
  background:transparent;
}
.chat-inputbar input{
  flex:1; height:50px;
  background:#f6f9ff;
  border:1px solid #e6ecfb;
  border-radius:999px;
  padding:0 16px; outline:none; font-size:15px;
  box-shadow:inset 2px 2px 6px rgba(0,0,0,.04), inset -3px -3px 10px rgba(255,255,255,.9);
}
.chat-inputbar .send-btn{
  width:50px; height:50px; border:0; cursor:pointer;
  border-radius:16px; color:#fff;
  background:linear-gradient(135deg,#4e7bff,#0b63f9);
  box-shadow:0 12px 26px rgba(11,99,249,.35)
}
.chat-inputbar .send-btn i{font-size:18px}