/*
Theme Name: Mopal Phonebook Theme
Theme URI: https://mopal.local
Author: Mopal
Description: Ultra-simple social-clean WordPress theme for Mopal Phonebook OS.
Version: 1.5.0
Text Domain: mopal-phonebook-theme
*/
:root{
  --mopal-ink:#06121e;
  --mopal-text:#142235;
  --mopal-muted:#5b6676;
  --mopal-subtle:#8a95a6;
  --mopal-bg:#f6faf8;
  --mopal-soft:#effaf5;
  --mopal-card:#ffffff;
  --mopal-line:rgba(7,19,31,.095);
  --mopal-primary:#10b981;
  --mopal-primary-dark:#047857;
  --mopal-primary-soft:#dcfce7;
  --mopal-blue:#2f80ed;
  --mopal-coral:#ff5f7a;
  --mopal-warm:#ffb14a;
  --mopal-shadow:0 16px 44px rgba(7,19,31,.085);
  --mopal-soft-shadow:0 8px 22px rgba(7,19,31,.065);
  --mopal-radius:22px;
  --mopal-container:1160px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(17,185,120,.16), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(47,128,237,.10), transparent 25%),
    linear-gradient(180deg,#fbfffd 0%, var(--mopal-bg) 58%, #ffffff 100%);
  color:var(--mopal-text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit}
.mopal-container{max-width:var(--mopal-container);margin:0 auto;padding:0 20px}
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  border-bottom:1px solid rgba(7,19,31,.075);
}
.header-inner{
  min-height:72px;
  display:grid;
  grid-template-columns:minmax(190px,auto) minmax(280px,1fr) auto auto;
  align-items:center;
  gap:18px;
}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--mopal-ink);min-width:0}
.custom-logo-link{display:flex!important;align-items:center!important;justify-content:flex-start!important;flex:0 0 auto!important;text-decoration:none!important}
.custom-logo{
  width:42px!important;
  height:42px!important;
  object-fit:contain!important;
  border-radius:14px;
  box-shadow:0 8px 20px rgba(17,185,120,.18);
}
.brand-text{display:flex;flex-direction:column;line-height:1.08;text-decoration:none;color:var(--mopal-ink);min-width:0}
.site-title{font-weight:900;font-size:18px;letter-spacing:-.035em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-tagline{font-size:12px;color:var(--mopal-muted);margin-top:4px;font-weight:680;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.header-search-form{
  justify-self:center;
  width:100%;
  max-width:460px;
  min-height:46px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 8px 6px 14px;
  border:1px solid rgba(7,19,31,.11);
  background:#ffffff;
  color:var(--mopal-muted);
  border-radius:999px;
  box-shadow:0 8px 22px rgba(7,19,31,.055), inset 0 1px 0 rgba(255,255,255,.9);
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.header-search-form:focus-within{
  border-color:rgba(16,185,129,.55);
  box-shadow:0 12px 30px rgba(16,185,129,.13), 0 0 0 4px rgba(16,185,129,.12);
  transform:translateY(-1px);
}
.search-icon{
  width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;background:var(--mopal-primary-soft);color:var(--mopal-primary-dark);font-weight:900;font-size:17px;line-height:1;flex:0 0 auto;
}
.header-search-input{
  flex:1 1 auto;
  min-width:0;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
  font-size:14px;
  font-weight:700;
  color:var(--mopal-text);
}
.header-search-input::placeholder{color:#7a8594;opacity:1}
.header-search-submit{
  flex:0 0 auto;
  border:0;
  border-radius:999px;
  padding:8px 12px;
  background:var(--mopal-primary-soft);
  color:var(--mopal-primary-dark);
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.main-nav{display:flex;align-items:center;gap:6px;justify-content:flex-end;white-space:nowrap}
.main-nav a{
  text-decoration:none;
  color:var(--mopal-text);
  font-weight:780;
  font-size:14px;
  padding:9px 11px;
  border-radius:999px;
  transition:background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.main-nav a:hover{background:var(--mopal-primary-soft);color:var(--mopal-primary-dark);transform:translateY(-1px)}
.main-nav a:last-child{
  color:#fff;
  background:linear-gradient(135deg,var(--mopal-primary) 0%, #10a66d 100%);
  box-shadow:0 12px 28px rgba(17,185,120,.24);
  padding:10px 15px;
}
.main-nav a:last-child:hover{color:#fff;box-shadow:0 16px 36px rgba(17,185,120,.28);background:linear-gradient(135deg,#13c983 0%, var(--mopal-primary-dark) 100%)}

.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
}
.header-icon-btn{
  width:42px;
  height:42px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:#0f172a;
  background:#f1f5f9;
  border:1px solid rgba(7,19,31,.07);
  box-shadow:0 8px 18px rgba(7,19,31,.055);
  position:relative;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease,border-color .18s ease;
}
.header-icon-btn:hover{
  transform:translateY(-1px);
  background:var(--mopal-primary-soft);
  color:var(--mopal-primary-dark);
  border-color:rgba(16,185,129,.25);
  box-shadow:0 12px 26px rgba(16,185,129,.13);
}
.header-icon-btn.has-dot::after{
  content:"";
  position:absolute;
  right:8px;
  top:7px;
  width:9px;
  height:9px;
  border-radius:999px;
  background:#ef4444;
  border:2px solid #fff;
}

.profile-avatar{
  width:42px;
  height:42px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:var(--mopal-primary-dark);
  background:linear-gradient(135deg,var(--mopal-primary) 0%, #0ea5e9 100%);
  border:2px solid #ffffff;
  box-shadow:0 10px 24px rgba(7,19,31,.12);
  overflow:hidden;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.profile-avatar:hover{transform:translateY(-1px);border-color:rgba(16,185,129,.36);box-shadow:0 14px 30px rgba(16,185,129,.14)}
.profile-avatar img,.avatar-image{width:100%!important;height:100%!important;border-radius:999px!important;object-fit:cover!important;display:block!important}
.avatar-icon{display:flex;align-items:center;justify-content:center}
.profile-avatar .avatar-icon{color:#ffffff}

.site-main{min-height:calc(100vh - 144px)}
.entry-content{max-width:var(--mopal-container);margin:0 auto;padding:34px 20px}
.entry-content > *:first-child{margin-top:0}
.entry-content h1,.entry-content h2,.entry-content h3{color:var(--mopal-ink);letter-spacing:-.045em;line-height:1.05}
.entry-content h1{font-size:clamp(38px,6vw,72px);margin:0 0 18px}
.entry-content h2{font-size:clamp(28px,4vw,44px);margin:38px 0 14px}
.entry-content h3{font-size:24px;margin:28px 0 10px}
.entry-content p{font-size:17px;line-height:1.72;color:var(--mopal-muted)}
.entry-content .wp-block-button__link,
.entry-content button,
.entry-content input[type="submit"]{
  border:0;
  border-radius:999px!important;
  background:linear-gradient(135deg,var(--mopal-primary),var(--mopal-primary-dark))!important;
  color:#fff!important;
  box-shadow:0 16px 34px rgba(17,185,120,.22);
  font-weight:850;
}
.entry-content .wp-block-button__link:hover,
.entry-content button:hover,
.entry-content input[type="submit"]:hover{filter:brightness(1.02);transform:translateY(-1px)}
.entry-content input,
.entry-content select,
.entry-content textarea{
  border:1px solid var(--mopal-line);
  border-radius:16px;
  background:#fff;
  padding:12px 14px;
  outline:none;
  color:var(--mopal-text);
}
.entry-content input:focus,
.entry-content select:focus,
.entry-content textarea:focus{border-color:rgba(17,185,120,.55);box-shadow:0 0 0 4px rgba(17,185,120,.11)}
.entry-content table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--mopal-line);border-radius:var(--mopal-radius);overflow:hidden;box-shadow:var(--mopal-shadow)}
.entry-content th,.entry-content td{padding:14px 16px;border-bottom:1px solid var(--mopal-line);text-align:left}
.entry-content tr:last-child td{border-bottom:0}
.entry-content th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--mopal-muted);background:#f7faf9}
.page-title{max-width:var(--mopal-container);margin:0 auto;padding:44px 20px 0}.page-title h1{font-size:clamp(34px,5vw,56px);margin:0 0 8px;letter-spacing:-.05em;color:var(--mopal-ink)}

/* Stronger hero contrast */
.entry-content > .wp-block-cover:first-child,
.entry-content > .wp-block-group:first-child.has-background,
.entry-content .mopal-hero,
.entry-content .hero{
  color:#ffffff;
  background-color:#06251b;
}
.entry-content > .wp-block-cover:first-child h1,
.entry-content > .wp-block-cover:first-child h2,
.entry-content > .wp-block-cover:first-child h3,
.entry-content > .wp-block-cover:first-child p,
.entry-content > .wp-block-group:first-child.has-background h1,
.entry-content > .wp-block-group:first-child.has-background h2,
.entry-content > .wp-block-group:first-child.has-background h3,
.entry-content > .wp-block-group:first-child.has-background p,
.entry-content .mopal-hero h1,
.entry-content .mopal-hero h2,
.entry-content .mopal-hero h3,
.entry-content .mopal-hero p,
.entry-content .hero h1,
.entry-content .hero h2,
.entry-content .hero h3,
.entry-content .hero p{
  color:#ffffff!important;
  text-shadow:0 2px 14px rgba(0,0,0,.22);
}
.entry-content > .wp-block-cover:first-child .has-text-color,
.entry-content > .wp-block-group:first-child.has-background .has-text-color,
.entry-content .mopal-hero .has-text-color,
.entry-content .hero .has-text-color{color:#ffffff!important}
.entry-content > .wp-block-cover:first-child a:not(.wp-block-button__link),
.entry-content > .wp-block-group:first-child.has-background a:not(.wp-block-button__link),
.entry-content .mopal-hero a:not(.wp-block-button__link),
.entry-content .hero a:not(.wp-block-button__link){color:#d1fae5!important}

/* App-like defaults for the phonebook plugin UI */
.mopal-phonebook,
.mopal-card,
.mopal-company-card,
.mopal-search-panel,
[class*="phonebook"] .card,
[class*="mopal"] .card{
  border-radius:var(--mopal-radius)!important;
  border:1px solid var(--mopal-line)!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:var(--mopal-soft-shadow)!important;
}
.mopal-phonebook a,
[class*="mopal"] a{transition:color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease}
.mopal-badge,.mopal-chip,.tag,.badge{border-radius:999px!important}
.site-footer{border-top:1px solid var(--mopal-line);background:rgba(255,255,255,.80);color:var(--mopal-muted);font-size:14px}.footer-inner{height:72px;display:flex;align-items:center;justify-content:space-between}
@media(max-width:980px){
  .header-inner{grid-template-columns:minmax(170px,auto) 1fr auto auto;gap:12px}
  .header-search-form{max-width:320px}
  .header-search-submit{display:none}
  .main-nav a:not(:last-child){display:none}
  .header-actions .header-icon-btn{width:38px;height:38px}
  .header-actions .header-icon-btn svg{width:18px;height:18px}
}
@media(max-width:760px){
  .mopal-container{padding:0 16px}
  .header-inner{min-height:66px;grid-template-columns:1fr auto auto;gap:10px;padding:10px 0}
  .custom-logo{width:35px!important;height:35px!important;border-radius:12px}
  .brand{gap:10px;min-width:0}.site-title{font-size:17px}.site-tagline{display:none}
  .header-search-form{order:3;grid-column:1 / -1;max-width:none;min-height:42px;padding:7px 8px 7px 12px}
  .search-icon{width:22px;height:22px;font-size:15px}.header-search-input{font-size:13px}.header-search-submit{display:none}
  .main-nav{gap:0}.main-nav a:not(:last-child){display:none}.main-nav a:last-child{font-size:12.5px;padding:9px 12px}
  .header-actions{gap:7px}
  .header-icon-btn,.profile-avatar{width:36px;height:36px}
  .header-actions .header-icon-btn:not(.profile-avatar):first-child{display:none}
  .entry-content{padding:24px 16px}.footer-inner{height:auto;padding:20px 0;display:block}.page-title{padding-top:28px}
}


/* v1.4 — Hero contrast fix for Phonebook OS */
.entry-content .mopalpb-hero,
.mopalpb-hero{
  background:
    radial-gradient(circle at 12% 10%, rgba(34,197,94,.26), transparent 32%),
    radial-gradient(circle at 90% 4%, rgba(45,212,191,.18), transparent 28%),
    linear-gradient(135deg,#031f18 0%, #064e3b 52%, #08372d 100%) !important;
  color:#ffffff !important;
  border:1px solid rgba(255,255,255,.14) !important;
  box-shadow:0 26px 70px rgba(3,31,24,.30) !important;
}
.entry-content .mopalpb-hero h1,
.mopalpb-hero h1{
  color:#ffffff !important;
  text-shadow:0 2px 18px rgba(0,0,0,.24) !important;
  font-weight:950 !important;
  letter-spacing:-.055em !important;
}
.entry-content .mopalpb-hero p,
.mopalpb-hero p{
  color:#ecfdf5 !important;
  opacity:1 !important;
  font-weight:650 !important;
  text-shadow:0 1px 12px rgba(0,0,0,.18) !important;
}
.entry-content .mopalpb-hero .mopalpb-kicker,
.mopalpb-hero .mopalpb-kicker{
  display:inline-flex !important;
  width:auto !important;
  color:#052e22 !important;
  background:#bbf7d0 !important;
  border:1px solid rgba(255,255,255,.34) !important;
  border-radius:999px !important;
  padding:7px 11px !important;
  text-shadow:none !important;
  font-weight:950 !important;
}
.entry-content .mopalpb-ai,
.mopalpb-ai{
  background:rgba(255,255,255,.16) !important;
  border:1px solid rgba(255,255,255,.26) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12), 0 18px 40px rgba(0,0,0,.12) !important;
}
.entry-content .mopalpb-ai label,
.mopalpb-ai label{
  color:#ffffff !important;
  font-weight:900 !important;
}
.entry-content .mopalpb-ai small,
.mopalpb-ai small{
  color:#d1fae5 !important;
  font-weight:700 !important;
}
.entry-content .mopalpb-ai input,
.mopalpb-ai input{
  background:#ffffff !important;
  color:#082f23 !important;
  border-color:rgba(255,255,255,.62) !important;
  box-shadow:0 10px 26px rgba(0,0,0,.10) !important;
}
.entry-content .mopalpb-ai input::placeholder,
.mopalpb-ai input::placeholder{color:#64748b !important;opacity:1 !important}
.entry-content .mopalpb-ai button,
.mopalpb-ai button{
  background:#ffffff !important;
  color:#065f46 !important;
  box-shadow:0 14px 30px rgba(0,0,0,.18) !important;
}
.entry-content .mopalpb-ai button:hover,
.mopalpb-ai button:hover{background:#ecfdf5 !important;transform:translateY(-1px)}
@media(max-width:760px){
  .entry-content .mopalpb-hero,
  .mopalpb-hero{padding:24px 20px !important;border-radius:22px !important}
  .entry-content .mopalpb-hero h1,
  .mopalpb-hero h1{font-size:clamp(34px,10vw,46px) !important;line-height:1.02 !important}
  .entry-content .mopalpb-hero p,
  .mopalpb-hero p{font-size:16px !important;line-height:1.58 !important}
}

/* v1.5 — Hide homepage title and refine social header actions */
body.home .page-title,
body.front-page .page-title,
body.page-template-front-page .page-title{display:none!important}
@media(max-width:980px){.header-actions .header-icon-btn{width:38px;height:38px}.header-actions .header-icon-btn svg{width:18px;height:18px}}
@media(max-width:760px){.header-actions .header-icon-btn{width:36px;height:36px}.header-actions .header-icon-btn:not(.profile-avatar):first-child{display:none}}
