/* overrides.css — safe UI polish + bubble + settings tabs */

/* bubble */
#node-bubble{
  position:fixed;
  z-index:3000;
  min-width:220px;
  padding:12px;
  border-radius:14px;
  border:2px solid rgba(255,255,255,.24);
  background: rgba(16, 18, 34, .78);
  box-shadow:0 18px 60px rgba(0,0,0,.65);
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}
#node-bubble.hidden{display:none;}
#node-bubble .ttl{font-weight:900; color:var(--gold); margin-bottom:8px;}
#node-bubble .row{display:flex; justify-content:space-between; gap:12px; font-size:12px; padding:3px 0;}
#node-bubble .row span{opacity:.72;}

/* settings tabs */
.set-wrap{margin-top:10px;}
.set-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 12px 0 14px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
}
.set-tab{
  padding:9px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  color: rgba(255,255,255,.88);
  cursor:pointer;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 10px 24px rgba(0,0,0,.26);
}
.set-tab.active{
  border-color: rgba(34,211,238,.65);
  background: linear-gradient(135deg, rgba(34,211,238,.38), rgba(59,130,246,.18), rgba(255,205,120,.16));
  box-shadow:
    0 0 0 2px rgba(34,211,238,.16) inset,
    0 16px 42px rgba(0,0,0,.34);
  color: rgba(0,0,0,.86);
}
.set-panel.hidden{display:none;}
.set-box{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
.set-box h3{margin:0 0 8px; color:var(--gold);}
.set-box ul{margin:0; padding-left:18px; opacity:.9;}
.set-note{margin-top:10px; font-size:12px; opacity:.75;}

/* keep one single definition set for settings UI (avoid duplicates) */
.set-box{padding:14px;border-radius:18px;border:1px solid rgba(255,255,255,.14);
  background:linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  box-shadow:0 18px 60px rgba(0,0,0,.40);}

/* ===== Colors panel: nicer BG1..BG4 picker layout ===== */
.set-panel[data-panel="colors"] label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.set-panel[data-panel="colors"] label > span,
.set-panel[data-panel="colors"] label{ /* keep existing text */
  font-weight: 700;
}

/* color inputs should be visible (no "black line") */
.set-panel[data-panel="colors"] input[type="color"].inp{
  width: 56px;
  height: 38px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.set-panel[data-panel="colors"] input[type="color"].inp::-webkit-color-swatch-wrapper{ padding: 0; }
.set-panel[data-panel="colors"] input[type="color"].inp::-webkit-color-swatch{
  border: 0;
  border-radius: 14px;
}
.inp{width:100%;padding:10px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.22);color:rgba(255,255,255,.92);}
.btn{padding:9px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.18);color:rgba(255,255,255,.92);cursor:pointer;}
.btn.primary{
  border-color: rgba(255,205,120,.78);
  background: linear-gradient(135deg, rgba(255,195,80,.30), rgba(90,170,255,.20));
  box-shadow: 0 12px 28px rgba(0,0,0,.28), 0 0 0 2px rgba(255,205,120,.10) inset;
}
.btn.danger{border-color:rgba(255,80,120,.55);background:rgba(255,80,120,.14);}
.sec-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px;}
.colors-actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap;}
.colors-list{margin-top:10px;display:grid;gap:10px;}
.color-row{display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:10px 12px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.16);}
.color-left{display:flex;align-items:center;gap:10px;}
.color-left .dot{width:14px;height:14px;border-radius:50%;
  box-shadow:0 0 0 3px rgba(255,255,255,.07),0 0 22px rgba(255,220,120,.18);}
.meta .nm{font-weight:800;}
.meta .slg{font-size:12px;opacity:.72;}
/* Colors tab: 2 columns / auto-fit */

/* Modal backdrop: remove dark overlay completely (keep only modal card styling) */
.modal{
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ===== Panel (person details) — comfort + consistent radius ===== */
:root{
  --r-xl: 18px;
  --r-lg: 14px;
  --r-md: 12px;
  --panel-bg: rgba(18, 22, 28, .52);
  --panel-bd: rgba(255,255,255,.14);
  --panel-shadow: 0 16px 60px rgba(0,0,0,.35);
  --btn-bg: rgba(255,255,255,.14);
  --btn-bd: rgba(255,255,255,.16);
  --btn-bg-hover: rgba(255,255,255,.18);
  --btn-danger-bg: rgba(255, 86, 86, .18);
  --btn-danger-bd: rgba(255, 86, 86, .35);
}

#panel{
  border-radius: var(--r-xl);
  background: var(--panel-bg);
  border: 1px solid var(--panel-bd);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

#panel .panel-head{
  padding: 10px 12px;
}

#panel #panel-close{
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  width: 44px;
  height: 44px;
}

#panel .kv{
  gap: 10px 14px;
  padding: 10px 12px 12px;
}

#panel .k{ opacity: .82; }
#panel .v{ font-weight: 700; }

/* make photo row compact: it's now just "Այո/Ոչ" text */
#panel #panel-photo{
  padding: 6px 10px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

#panel .panel-actions{
  padding: 10px 12px 12px;
  gap: 10px;
}

#panel .panel-actions button{
  border-radius: var(--r-lg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  padding: 10px 14px;
}

#panel .panel-actions button:hover{ background: var(--btn-bg-hover); }

#panel .panel-actions button.danger{
  background: var(--btn-danger-bg);
  border-color: var(--btn-danger-bd);
}

.colors-list{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:10px;
}
.color-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* === Bugfix: Modal always on top (above bubble/splash) === */
.modal{ z-index: 5000 !important; }

/* === BUGFIX: disable bubble clicks when modal open === */
body.modal-open #node-bubble{
  pointer-events: none;
  opacity: .25;
}

/* === BUGFIX: modal scroll & clicks === */
body.modal-open{ overflow:hidden; }

/* modal content must scroll if it's tall */
.modal-card{
  max-height: 88vh;
  overflow-y: auto;
}

/* bubble should not steal clicks when a modal is open */
body.modal-open #node-bubble{
  pointer-events: none;
  opacity: .25;
}
/* FIX: Add/Edit modal must scroll (can go down) */
.modal {
  position: fixed;
  inset: 0;
  overflow: auto;          /* allow modal itself to scroll */
  -webkit-overflow-scrolling: touch;
}

.modal .modal-card {
  max-height: calc(100vh - 40px); /* fit screen */
  overflow: auto;                 /* scroll inside */
}

/* If some wrapper blocks scrolling */
.modal .modal-card * {
  max-width: 100%;
}
#toast{
  position:fixed;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  z-index:99999;
  max-width:min(560px, calc(100vw - 24px));
}

/* links +20% thickness */
.link{ stroke-width: 4.6 !important; }
.link:hover, .link.active{ stroke-width: 6.3 !important; }


/* === Settings: small square color pickers === */
.bg-color, .color-input{
  width:44px;
  height:34px;
  padding:0;
  border:0;
  background:transparent;
  border-radius:10px;
  cursor:pointer;
}
.bg-color::-webkit-color-swatch-wrapper,
.color-input::-webkit-color-swatch-wrapper{ padding:0; }
.bg-color::-webkit-color-swatch,
.color-input::-webkit-color-swatch{
  border:none;
  border-radius:10px;
}
/* Firefox */
.bg-color::-moz-color-swatch,
.color-input::-moz-color-swatch{
  border:none;
  border-radius:10px;
}

/* auto grid for many clans */
.color-list{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:10px;
}

/* Demo mode: hide Login button/entry points (non-destructive) */
html.demo #btn-login,
html.demo .btn-login,
html.demo a[href*="login"],
html.demo [data-action="login"]{
  display:none !important;
}

/* === HARD HIDE: Panel photo row (requested) === */
#panel-photo,
#panel-photo-k,
#panel-photo-img,
#panel-photo-link{
  display:none !important;
}


/* Settings: ON/OFF switch */
.ft-switch-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.ft-switch-text{display:flex; flex-direction:column; gap:2px;}
.ft-switch-title{font-weight:800; letter-spacing:.2px;}
.ft-switch-sub{opacity:.78; font-size:12px; line-height:1.2;}

.ft-switch{
  position:relative;
  width:54px;
  height:30px;
  display:inline-block;
  flex:0 0 auto;
}
.ft-switch input{opacity:0; width:0; height:0;}
.ft-slider{
  position:absolute; cursor:pointer;
  top:0; left:0; right:0; bottom:0;
  background: rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  transition: .18s ease;
  box-shadow: inset 0 0 12px rgba(0,0,0,.35);
}
.ft-slider:before{
  content:"";
  position:absolute;
  height:24px; width:24px;
  left:3px; top:2px;
  background: rgba(255,255,255,.92);
  border-radius:999px;
  transition: .18s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.ft-switch input:checked + .ft-slider{
  background: rgba(0, 255, 180, .22);
  border-color: rgba(0, 255, 180, .35);
}
.ft-switch input:checked + .ft-slider:before{
  transform: translateX(23px);
}


/* Desktop title clock */
#title-banner{display:flex;flex-direction:column;gap:4px;}
#title-clock{
  margin-top:2px;
  align-self:flex-start;
  font-weight:800;
  letter-spacing:.6px;
  font-size:13px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  box-shadow: inset 0 0 12px rgba(0,0,0,.35);
  opacity:.92;
}


/* Admin settings modal: remove fake empty top/bottom and keep scroll inside card */
.modal-card{
  max-height: calc(100vh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}
.set-panels{
  overflow: visible;
}
