/* ============================================================
   contact-info.css — Ekran "O kontakte" (TZ §6)
   Samodostatochnyj polnoekrannyj overlay-profil' chata.
   Palitra cherez CSS-peremennye s hex-folbekom (TZ §1.2).
   Temnaya tema — cherez body.dark-theme override.
   ============================================================ */

.aya-ci-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--aya-grey-bg, #eef0f2);
  color: var(--text, #1a1d21);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.aya-ci-overlay.aya-ci-show { opacity: 1; }

body.dark-theme .aya-ci-overlay {
  background: #0d1117;
  color: var(--text, #e6edf3);
}

/* ---------- Shapka (sticky) ---------- */
.aya-ci-header {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px 8px;
  background: var(--panel, #fff);
  border-bottom: 1px solid var(--border, #e6e8eb);
}
body.dark-theme .aya-ci-header {
  background: var(--panel, #1c2128);
  border-bottom-color: var(--border, #30363d);
}
.aya-ci-back {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text, #1a1d21);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
body.dark-theme .aya-ci-back { color: var(--text, #e6edf3); }
.aya-ci-back:active { background: var(--aya-grey-bg, #eef0f2); }
body.dark-theme .aya-ci-back:active { background: rgba(255, 255, 255, .08); }
.aya-ci-title {
  flex: 1 1 auto;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text, #1a1d21);
}
body.dark-theme .aya-ci-title { color: var(--text, #e6edf3); }
.aya-ci-edit {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--aya-teal, #1a6b82);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 8px;
  cursor: pointer;
  border-radius: 8px;
}
.aya-ci-edit:active { opacity: .6; }

/* ---------- Skroll-kontejner ---------- */
.aya-ci-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 40px) 16px;
}

/* ---------- Identiti (avatar + imya) ---------- */
.aya-ci-identity {
  text-align: center;
  padding: 14px 0 20px;
}
.aya-ci-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--aya-teal, #1a6b82), var(--aya-petrol, #005f6d));
  color: #fff;
  font-size: 38px;
  font-weight: 600;
}
.aya-ci-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aya-ci-name {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text, #1a1d21);
  word-break: break-word;
}
body.dark-theme .aya-ci-name { color: var(--text, #e6edf3); }
.aya-ci-sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--aya-grey, #8a9499);
}

/* ---------- 4 knopki v ryad ---------- */
.aya-ci-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 22px;
}
.aya-ci-quick-btn {
  border: none;
  background: var(--panel, #fff);
  border-radius: 14px;
  padding: 12px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--aya-teal, #1a6b82);
  transition: background .15s ease;
}
body.dark-theme .aya-ci-quick-btn { background: var(--panel, #1c2128); }
.aya-ci-quick-btn:active { background: var(--aya-grey-bg, #eef0f2); }
body.dark-theme .aya-ci-quick-btn:active { background: #252c34; }
.aya-ci-quick-btn .ic { width: 24px; height: 24px; }
.aya-ci-quick-btn .aya-ci-quick-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #65676b);
}
/* Poisk — blagorodnyj oranzh (TZ §6.1.3) */
.aya-ci-quick-btn.aya-ci-search { color: var(--aya-orange2, #cc6d33); }

/* ---------- Sekcii ---------- */
.aya-ci-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  color: var(--aya-grey, #8a9499);
  padding: 0 4px 8px;
  margin-top: 18px;
}
.aya-ci-section-title.aya-ci-section-title--big {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #1a1d21);
}
body.dark-theme .aya-ci-section-title.aya-ci-section-title--big { color: var(--text, #e6edf3); }

/* ---------- Karta-gruppa strok ---------- */
.aya-ci-card {
  background: var(--panel, #fff);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 4px;
}
body.dark-theme .aya-ci-card { background: var(--panel, #1c2128); }

.aya-ci-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text, #1a1d21);
  font-size: 16px;
  position: relative;
}
body.dark-theme .aya-ci-row { color: var(--text, #e6edf3); }
.aya-ci-row:active { background: var(--aya-grey-bg, #eef0f2); }
body.dark-theme .aya-ci-row:active { background: #252c34; }
/* Razdelitel' mezhdu strokami (ot teksta, posle ikonki) */
.aya-ci-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--border, #eef0f2);
}
body.dark-theme .aya-ci-row:not(:last-child)::after { background: #30363d; }

.aya-ci-row .aya-ci-row-ic {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--aya-grey2, #52606a);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark-theme .aya-ci-row .aya-ci-row-ic { color: var(--text-secondary, #8b949e); }
.aya-ci-row .aya-ci-row-ic .ic { width: 22px; height: 22px; }
.aya-ci-row-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aya-ci-row-value {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--aya-grey, #8a9499);
}
.aya-ci-row-count {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--aya-teal, #1a6b82);
  font-weight: 500;
}
.aya-ci-row-chev {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--aya-grey, #8a9499);
  display: flex;
  align-items: center;
  justify-content: center;
}
.aya-ci-row-chev .ic { width: 18px; height: 18px; }

/* Stroka deystviy (tekst tilom) — TZ §6.1.9 */
.aya-ci-card--actions .aya-ci-row,
.aya-ci-card--actions .aya-ci-row .aya-ci-row-ic {
  color: var(--aya-teal, #1a6b82);
}

/* ---------- Tumbler ---------- */
.aya-ci-toggle {
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  border-radius: 9999px;
  background: var(--aya-grey, #8a9499);
  position: relative;
  transition: background .2s ease;
  cursor: pointer;
}
.aya-ci-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.aya-ci-toggle.aya-ci-on { background: var(--aya-teal, #1a6b82); }
.aya-ci-toggle.aya-ci-on::after { transform: translateX(18px); }

/* ---------- Spisok obschih grupp ---------- */
.aya-ci-group-row .aya-ci-row-ic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--aya-teal, #1a6b82), var(--aya-petrol, #005f6d));
  color: #fff;
}
.aya-ci-group-row .aya-ci-row-ic img { width: 100%; height: 100%; object-fit: cover; }
.aya-ci-group-sub {
  display: block;
  font-size: 13px;
  color: var(--aya-grey, #8a9499);
  font-weight: 400;
  margin-top: 2px;
}

/* ---------- Opasnyj blok (TZ §6.1.10) ---------- */
.aya-ci-card--danger {
  background: var(--aya-danger-bg, #d6e8ec);
  margin-top: 22px;
}
body.dark-theme .aya-ci-card--danger { background: #2a2226; }
.aya-ci-card--danger .aya-ci-row,
.aya-ci-card--danger .aya-ci-row .aya-ci-row-ic {
  color: var(--aya-danger, #e8502e);
}
.aya-ci-card--danger .aya-ci-row:active {
  background: rgba(232, 80, 46, .08);
}
.aya-ci-card--danger .aya-ci-row:not(:last-child)::after {
  background: rgba(232, 80, 46, .18);
}

.aya-ci-empty-note {
  font-size: 13px;
  color: var(--aya-grey, #8a9499);
  padding: 6px 4px 0;
  text-align: center;
}
