:root {
  --bg-dark: #111b21;
  --rail-bg: #202c33;
  --panel-bg: #f7f8fa;
  --border: #d8dfe3;
  --text: #111b21;
  --muted: #667781;
  --item-hover: #f0f2f5;
  --accent-red: #b6172a;
  --hero-maroon: #7a0015;
  --raachat-red: #6d0707;
  --bubble-in-dark: #2a2f32;
  --bubble-out: #ffffff;
  --bubble-out-red: #6d0707;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg-dark);
}

/* Prevent text-caret/selection on static UI across the site. */
body,
body *:not(input):not(textarea):not([contenteditable="true"]) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  caret-color: transparent;
}

body {
  cursor: default;
}

button,
a,
[role="button"] {
  cursor: pointer;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  caret-color: auto;
  cursor: text;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.28s ease;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

.splash-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Splash مثل الموبايل: مربع مستدير + حد برغندي خفيف + عين حورس حمراء */
.splash-logo-squircle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  width: auto;
  height: auto;
}

.splash-app-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
}

.splash-eye-of-horus {
  width: 100%;
  height: auto;
  max-height: 52px;
  filter: drop-shadow(0 0 3px rgba(255, 42, 42, 0.45));
}

.app-shell {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* hidden attribute alone loses to .layout { display: grid } — WhatsApp-style: one full view at a time */
.app-shell > main.layout[hidden] {
  display: none !important;
}

.app-shell > main.layout:not([hidden]) {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  width: auto;
  max-width: 100%;
}

.left-rail {
  width: 72px;
  flex-shrink: 0;
  background: var(--rail-bg);
  border-right: 1px solid #2f3b44;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 0 10px;
}

.rail-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  padding: 0 6px;
}

.rail-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 0 6px;
}

.rail-item {
  position: relative;
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: #d1d7db;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
}

.rail-item-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.rail-icon {
  font-size: 22px;
  line-height: 1;
}

.rail-label {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  max-width: 100%;
  text-align: center;
  word-break: break-word;
}

.left-rail.rail-chat-mode .rail-item:hover:not(.active) {
  background: #eef1f3;
}

.left-rail:not(.rail-chat-mode) .rail-item:hover:not(.active) {
  background: #eef1f3;
}

.rail-bottom .rail-item {
  width: 100%;
}

.me-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #3b4a54;
}

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
}

.settings-panel {
  background: var(--panel-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.panel-header {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
}

.panel-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
}

.back-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-btn-chevron {
  width: 12px;
  height: 20px;
  display: block;
}

.panel-header .back-btn.hidden {
  display: none;
}

.hidden {
  visibility: hidden;
}

.wallpaper-panel {
  position: relative;
  background-color: #f0ebe3;
  background-image: url("../assets/chat-pattern-egypt.png");
  background-repeat: repeat;
  background-size: 380px auto;
  background-position: 0 0;
}

.wallpaper-panel::before {
  content: none;
}

.center-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #54656f;
  z-index: 1;
}

.center-icon {
  margin: 0 auto 14px;
  color: #54656f;
}

.center-icon i {
  font-size: 96px;
  line-height: 1;
}

.center-brand h2 {
  margin: 0;
  color: #54656f;
  font-size: 36px;
  font-weight: 500;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
}

.profile-card img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  background: #e0e0e0;
}

.profile-name {
  font-size: 20px;
  color: var(--text);
}

.profile-card-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.profile-photo-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.profile-photo-btn {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
  width: 100px;
  height: 100px;
  cursor: pointer;
}

.profile-photo-btn img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-photo-change {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--raachat-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-photo-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.account-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.account-status-block {
  padding: 0 14px 12px;
}

.account-status-view,
.account-status-edit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.account-status-text {
  flex: 1;
  font-size: 16px;
  color: var(--text);
}

.account-status-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 15px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--raachat-red);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.account-danger {
  color: #b3261e;
}

.account-danger .icon {
  color: inherit;
}

.theme-radio-row {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.theme-radio-row.is-selected .radio-dot {
  border-color: var(--raachat-red);
  box-shadow: inset 0 0 0 4px var(--raachat-red);
}

.contact-us-lead {
  padding-top: 16px;
}

.contact-options {
  padding: 8px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  background: #f0f2f5;
  text-decoration: none;
  color: inherit;
}

.contact-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(109, 7, 7, 0.12);
  color: var(--raachat-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.contact-option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-option-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.contact-option-sub {
  font-size: 14px;
  color: var(--muted);
}

.about-hero {
  text-align: center;
  padding: 28px 16px 12px;
}

.about-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 12px;
}

.about-hero h3 {
  margin: 0 0 6px;
  color: var(--text);
}

.about-hero p {
  margin: 0;
  color: var(--muted);
}

.profile-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-preview-overlay.hidden {
  display: none;
}

.profile-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.profile-preview-img {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 520px);
  max-height: 88vh;
  border-radius: 8px;
  object-fit: contain;
}

html[data-theme="light"] body {
  --bg-dark: #e9edef;
  --rail-bg: #f0f2f5;
}

html[data-theme="light"] .left-rail {
  border-right-color: #d1d7db;
}

html[data-theme="light"] .rail-item {
  color: #3b4a54;
}

html[data-theme="light"] .left-rail.rail-chat-mode .rail-item.active {
  background: rgba(0, 0, 0, 0.06);
}

.list {
  padding: 6px 0;
}

.item {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f4;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item:hover {
  background: var(--item-hover);
}

.item-title {
  color: var(--text);
  font-size: 17px;
  margin-bottom: 2px;
}

.item-sub {
  color: var(--muted);
  font-size: 13px;
}

.item-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8696a0;
}

.icon i {
  font-size: 20px;
}

.chev {
  color: var(--muted);
}

.section-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 12px 14px;
}

.section-alert {
  color: var(--accent-red);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  padding: 12px 14px 8px;
}

.panel-hero {
  padding: 18px 14px 8px;
}

.hero-icon-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #eceff1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.hero-icon-wrap i {
  font-size: 56px;
  color: var(--hero-maroon);
}

.hero-icon-wrap.app-lock i {
  font-size: 58px;
}

.hero-title {
  font-size: 35px;
  line-height: 1.1;
  margin: 0 0 6px;
  color: #1f2c33;
  font-weight: 600;
}

.inline-leading-icon {
  color: #7c8b93;
  margin-right: 8px;
}

.blocked-add {
  cursor: pointer;
}

.blocked-add i {
  color: #7c8b93;
  font-size: 19px;
  margin-right: 8px;
  vertical-align: middle;
}

.subtle-divider {
  border-top: 1px solid var(--border);
  margin: 10px 14px;
}

.radio-group {
  padding: 8px 0;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 16px;
}

.radio-dot {
  width: 17px;
  height: 17px;
  border: 2px solid #8696a0;
  border-radius: 50%;
}

.switch-row {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #9fb0ba;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}

.switch.on {
  background: #25d366;
}

.switch.on::after {
  left: 18px;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: #8696a0;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}

.blocked-row {
  justify-content: space-between;
}

/* --- Utilities --- */
.is-hidden {
  display: none !important;
}

/* --- Left rail: دائمًا فاتح — الشات والإعدادات بنفس الخلفية البيضاء --- */
.left-rail:not(.rail-chat-mode) {
  background: #fff;
  border-right: 1px solid #e9edef;
}

.left-rail.rail-chat-mode {
  background: #fff;
  border-right: 1px solid #e9edef;
}

.left-rail.rail-chat-mode .rail-item .rail-icon,
.left-rail.rail-chat-mode .rail-item .rail-label {
  color: #54656f;
}

.left-rail.rail-chat-mode .rail-item.active {
  background: #fff0f0;
}

.left-rail.rail-chat-mode .rail-item.active .rail-icon,
.left-rail.rail-chat-mode .rail-item.active .rail-label {
  color: #6d0707;
}

.left-rail:not(.rail-chat-mode) .rail-item .rail-icon,
.left-rail:not(.rail-chat-mode) .rail-item .rail-label {
  color: #54656f;
}

.left-rail:not(.rail-chat-mode) .rail-item.active {
  background: #fff0f0;
}

.left-rail:not(.rail-chat-mode) .rail-item.active .rail-icon,
.left-rail:not(.rail-chat-mode) .rail-item.active .rail-label {
  color: #6d0707;
}

.left-rail.rail-chat-mode .me-avatar,
.left-rail:not(.rail-chat-mode) .me-avatar {
  border: 1px solid #e9edef;
}

.rail-chat-btn {
  position: relative;
}

.chat-unread-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  line-height: 1;
}

.chat-unread-badge.is-zero {
  display: none;
}

/* --- Chats main layout --- */
.layout-chats-view {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  background: #e6e6e6;
  overflow: hidden;
}

.layout-chats-view > .chat-list-panel,
.layout-chats-view > .chat-thread-panel {
  min-height: 0;
}

.chat-list-panel {
  display: flex;
  flex-direction: column;
  background: #f2f2f2;
  border-right: 1px solid #e0e0e0;
  min-width: 0;
}

.chat-list-header {
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f2f2f2;
  border-bottom: 1px solid #e0e0e0;
}

.brand-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--raachat-red);
  letter-spacing: -0.02em;
}

.icon-plain {
  border: 0;
  background: transparent;
  color: #54656f;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-plain:hover {
  background: rgba(0, 0, 0, 0.05);
}

.icon-plain i {
  font-size: 22px;
}

.chat-search-wrap {
  margin: 8px 12px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid #e8e8e8;
}

.chat-search-wrap i {
  color: #8696a0;
  font-size: 18px;
}

.chat-search-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: #111b21;
}

.chat-list-scroll {
  flex: 1;
  overflow-y: auto;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #ebebeb;
  background: #fff;
}

.chat-row:hover {
  background: #f7f7f7;
}

.chat-row.active {
  background: #ebebeb;
}

.chat-row-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe5e7;
  flex-shrink: 0;
}

.chat-row-body {
  flex: 1;
  min-width: 0;
}

.chat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.chat-row-name {
  font-size: 16px;
  font-weight: 600;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row-time {
  font-size: 12px;
  color: #8696a0;
  flex-shrink: 0;
}

.chat-row-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 14px;
  color: #667781;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row-preview i {
  font-size: 16px;
  flex-shrink: 0;
}

.chat-row-preview .msg-status-pending,
.chat-row-preview .msg-status-sent,
.chat-row-preview .msg-status-delivered {
  color: #667781;
}

.chat-row-preview .msg-status-read {
  color: #53bdeb;
}

.chat-row-unread {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--raachat-red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-row-unread.is-zero {
  display: none;
}

.chat-list-empty,
.chat-list-error {
  padding: 24px 16px;
  text-align: center;
  color: #667781;
  font-size: 14px;
}

#groupListEl .chat-list-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  padding: 12px;
}

#viewServices .chat-list-panel {
  min-height: 0;
  overflow: hidden;
}

#viewServices .services-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  align-content: start;
}

#viewServices .chat-thread-panel {
  min-height: 0;
}

#viewServices .service-detail-wrap.thread-empty-state {
  min-height: 0;
  height: 100%;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
}

#viewServices .service-detail-wrap #serviceDetailBody {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

#viewServices .mobile-service-page {
  overflow: visible;
  min-height: auto;
}

.service-card {
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  color: #111b21;
  cursor: pointer;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  text-align: left;
  outline: none;
  font-family: inherit;
  /* بدل الإطار القوي: ظل برغندي خفيف — x=0 y=0 blur=4 opacity≈6% */
  box-shadow: 0 0 4px rgba(109, 7, 7, 0.06);
}

.service-card:hover {
  background: #f7f7f7;
}

.service-card.active {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(109, 7, 7, 0.18);
  background: #fff;
  /* ظل برغندي أوضح للكارت المفتوح — نفس لون الأيقونات */
  box-shadow:
    0 0 0 1px rgba(109, 7, 7, 0.12),
    0 0 14px rgba(109, 7, 7, 0.24),
    0 8px 28px rgba(109, 7, 7, 0.2);
}

.service-card i {
  font-size: 22px;
  color: var(--raachat-red);
  margin-bottom: 8px;
}

.service-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.service-card-sub {
  color: #667781;
  font-size: 12px;
  margin-bottom: 0;
}

.service-detail-wrap {
  align-items: stretch;
  text-align: left;
  justify-content: flex-start;
  padding: 0;
  width: 100%;
  height: 100%;
}

.service-detail-wrap p {
  color: #1f2c33;
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 12px;
  display: none;
}

#serviceDetailTitle {
  display: none !important;
}

.service-detail-wrap #serviceDetailBody {
  max-width: none;
  color: #4f5b62;
  font-size: 15px;
  width: 100%;
  flex: 1;
  display: flex;
}

.service-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.service-action-btn {
  border: 1px solid #d8dfe3;
  background: #fff;
  color: #111b21;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 600;
}

.service-action-btn:hover {
  background: #f2f4f5;
}

.mobile-service-page {
  width: 100%;
  max-width: none;
  min-height: 100%;
  background: transparent;
  color: #1f2c33;
  border-radius: 0;
  padding: 4px 10px 8px;
  overflow-y: auto;
}

/* Services detail area inherits the same chat pattern background. */
#viewServices .chat-thread-panel,
#viewServices .service-detail-wrap,
#viewServices .service-detail-wrap #serviceDetailBody,
#viewServices .mobile-service-page {
  background: transparent;
}

.mobile-service-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--raachat-red);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 14px;
}

.mobile-service-back {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.elgouna-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.elgouna-grid .mobile-card-media {
  /* Show full image from app assets without aggressive cropping. */
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  height: 170px;
}

.elgouna-grid .mobile-card-media.media-bestway,
.elgouna-grid .mobile-card-media.media-gokarts {
  background: #111111;
}

.elgouna-grid .mobile-card-media.media-restaurants {
  background: #ddd6bf;
}

.elgouna-grid .mobile-card-body .mobile-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.elgouna-page > .mobile-service-header {
  background: var(--raachat-red);
  padding: 11px 14px;
  margin-bottom: 6px;
  border-radius: 9px;
}

.elgouna-page > .mobile-service-header > span {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.elgouna-grid .mobile-card-body {
  text-align: center;
}

.elgouna-grid .mobile-card-title {
  width: 100%;
  margin-bottom: 8px;
}

.elgouna-grid .mobile-card-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.elgouna-grid .mobile-phone-link {
  color: var(--raachat-red);
  background: #f2f4f7;
  border-radius: 8px;
  padding: 8px 10px;
}

.elgouna-grid .mobile-open-btn.elgouna-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 6px;
  background: var(--raachat-red);
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 600;
}

.elgouna-grid .mobile-open-btn.elgouna-open-btn i {
  font-size: 18px;
  line-height: 1;
}

.mobile-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dde3e8;
}

.mobile-card-media {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: #111;
}

.mobile-card-body {
  padding: 10px 12px 12px;
}

.mobile-card-title {
  color: #1f2c33;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.mobile-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-phone-link {
  color: var(--raachat-red);
  font-weight: 700;
  text-decoration: none;
  background: #f2f4f7;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: nowrap;
  border: 0;
  font-family: inherit;
  cursor: copy;
  appearance: none;
}

.mobile-open-btn {
  border: 0;
  background: #f2f4f7;
  color: #ff4a4a;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.restaurants-list {
  display: grid;
  gap: 10px;
}

.restaurants-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: calc(100vh - 170px);
  padding-top: 0;
}

.restaurants-page .mobile-service-header {
  margin-bottom: 6px;
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--raachat-red);
  color: #fff;
}

.restaurants-page .mobile-service-header span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.restaurants-page .mobile-service-back {
  width: 32px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.restaurants-page .mobile-service-back-arrow {
  width: 24px;
  height: 14px;
  display: block;
}

.restaurants-page .mobile-service-back-arrow path {
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.restaurants-page .restaurants-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
  gap: 6px;
}

.restaurant-item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dde3e8;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.restaurant-item-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.restaurant-name {
  color: #1f2c33;
  font-size: 18px;
  font-weight: 700;
}

.restaurant-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.restaurants-page .restaurant-phone-btn {
  color: var(--raachat-red);
  margin-top: 0;
}

.restaurants-page .mobile-phone-link {
  border-radius: 999px;
  padding: 7px 12px;
  border: 0;
  font-family: inherit;
  cursor: copy;
  user-select: text;
}

.restaurants-page .ig-link {
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 3px;
  min-width: 38px;
  min-height: 34px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.restaurants-page .ig-logo-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.ig-link {
  background: #f2f4f7;
  color: #ff3b4a;
  border-radius: 8px;
  padding: 7px 9px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 34px;
}

.ig-link i {
  font-size: 24px;
  color: #ff3b4a;
}

.catalog-list {
  display: grid;
  gap: 8px;
}

.catalog-item {
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.catalog-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.catalog-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef1f4;
  border: 1px solid #d8dee4;
}

.catalog-name {
  color: #1f2c33;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-open-btn {
  border: 0;
  border-radius: 8px;
  background: var(--raachat-red);
  color: #ffffff;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 6px;
}

.catalog-open-btn:visited,
.catalog-open-btn:hover,
.catalog-open-btn:active {
  color: #ffffff;
}

.catalog-open-btn i {
  color: #ffffff;
}

.catalog-open-btn:hover {
  background: #850b0b;
}

.facility-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 170px);
}

.facility-card-large {
  width: min(760px, 94%);
}

.facility-card-large .mobile-card-body {
  text-align: center;
}

.facility-card-large .mobile-card-row {
  justify-content: center;
}

.facility-card-large .mobile-card-media {
  height: 230px;
  object-fit: cover;
}

.auto-card-large {
  width: min(860px, 96%);
}

.auto-card-large .mobile-card-media {
  height: 260px;
  object-fit: contain;
  background: #ffffff;
  padding: 10px 14px 0;
}

.auto-card-large .mobile-card-body {
  padding-top: 6px;
}

.auto-card-large .mobile-card-row {
  justify-content: center;
}

/* --- Thread --- */
.chat-thread-panel {
  display: flex;
  flex-direction: column;
  background-color: #f0ebe3;
  background-image: url("../assets/chat-pattern-egypt.png");
  background-repeat: repeat;
  background-size: 380px auto;
  background-position: 0 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.chat-thread-header {
  height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid #e9edef;
  flex-shrink: 0;
}

.thread-header-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.thread-header-placeholder {
  color: #8696a0;
  font-size: 13px;
  width: 100%;
}

.thread-header-active {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  min-width: 0;
}

.thread-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.thread-header-info-btn {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  text-align: left;
}

.thread-header-info-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.thread-header-info-btn:focus-visible {
  outline: 2px solid rgba(109, 7, 7, 0.45);
  outline-offset: 2px;
}

.thread-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe5e7;
  flex-shrink: 0;
}

.thread-name {
  font-size: 14px;
  font-weight: 500;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  position: relative;
}

.btn-call-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  min-height: 28px;
  border: 1px solid var(--raachat-red);
  border-radius: 999px;
  background: var(--raachat-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(109, 7, 7, 0.12);
}

.btn-call-pill:hover {
  background: #850b0b;
  border-color: #850b0b;
}

.btn-call-video-ico-svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #ffffff;
  display: block;
}

.btn-call-label {
  letter-spacing: 0.01em;
  font-weight: 500;
}

.btn-call-caret-ico {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #ffffff;
  margin-left: -1px;
  display: block;
}

.thread-header-icon-btn {
  border: 0;
  background: transparent;
  color: #54656f;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.thread-header-icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.thread-header-icon-btn i {
  font-size: 24px;
}

.thread-header-search-btn i {
  font-size: 19px;
}

.thread-call-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 90px;
  width: min(320px, 70vw);
  background: #ffffff;
  border: 1px solid #e3e8eb;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  padding: 9px 10px;
  z-index: 9;
}

.thread-call-menu[hidden] {
  display: none !important;
}

.thread-call-menu-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 4px 9px;
  border-bottom: 1px solid #eceff1;
}

.thread-call-menu-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe5e7;
}

.thread-call-menu-name {
  color: #1f2c33;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
}

.thread-call-menu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 9px 4px;
  border-bottom: 1px solid #eceff1;
}

.thread-call-action-btn {
  border: 0;
  border-radius: 999px;
  background: var(--raachat-red);
  color: #ffffff;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.thread-call-action-btn:hover {
  background: #850b0b;
}

.thread-call-action-btn i {
  font-size: 16px;
}

.thread-call-menu-list {
  padding: 6px 4px 2px;
  display: grid;
  gap: 2px;
}

.thread-call-menu-item {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5d6b74;
  font-size: 13px;
  padding: 8px 3px;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
}

.thread-call-menu-item:hover {
  background: #f4f6f7;
}

.thread-call-menu-item i {
  font-size: 16px;
}

.thread-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #e4e8eb;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  padding: 6px;
  z-index: 8;
}

.thread-more-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #1f2c33;
  text-align: left;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.thread-more-item:hover {
  background: #f4f6f7;
  font-weight: 500;
}

.thread-more-item-danger {
  color: #b11a1a;
}

.thread-search-panel {
  position: absolute;
  top: 48px;
  right: 0;
  bottom: 0;
  width: min(430px, 54%);
  background: #f7f8fa;
  border-left: 1px solid #e1e6e8;
  z-index: 7;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  box-shadow: -8px 0 18px rgba(0, 0, 0, 0.1);
}

.thread-search-panel[hidden] {
  display: none !important;
}

.thread-search-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.thread-search-panel-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #1f2c33;
}

.thread-search-close {
  border: 0;
  background: transparent;
  color: #1f2c33;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.thread-search-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.thread-search-close i {
  font-size: 26px;
}

.thread-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e7ea;
  border-radius: 999px;
  padding: 7px 12px;
}

.thread-search-input-wrap i {
  color: #7a8b95;
  font-size: 18px;
}

.thread-search-input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 17px;
  color: #1f2c33;
  font-family: inherit;
}

.thread-search-empty-text {
  margin: 80px auto 0;
  max-width: 320px;
  text-align: center;
  color: #556773;
  font-size: 17px;
  line-height: 1.35;
}

.thread-search-target {
  color: #2e4351;
}

.chat-messages-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px;
  /* نفس نمط الإعدادات: تبليط يتكرر بحجم ثابت — العناصر تفضل بنفس مقياسها بدون تمديد */
  background-color: #f0ebe3;
  background-image: url("../assets/chat-pattern-egypt.png");
  background-repeat: repeat;
  background-size: 380px auto;
  background-position: 0 0;
}

.thread-empty-state {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8696a0;
  padding: 40px;
}

.thread-empty-state p {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 500;
  color: #54656f;
}

.thread-empty-state span {
  max-width: 280px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

#groupEmptyState span {
  font-size: 18px;
  font-weight: 500;
}

.msg-row {
  display: flex;
  margin-bottom: 6px;
}

.msg-row.out {
  justify-content: flex-end;
}

.msg-bubble {
  max-width: 65%;
  padding: 8px 12px 6px;
  border-radius: 12px;
  position: relative;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.msg-bubble.in {
  background: var(--bubble-in-dark);
  color: #fff;
  border-top-left-radius: 4px;
}

.msg-bubble.out {
  background: var(--bubble-out);
  color: #111b21;
  border-top-right-radius: 4px;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.08);
}

.msg-bubble.out.pending {
  opacity: 0.72;
}

.msg-bubble.out.red {
  background: var(--bubble-out-red);
  color: #fff;
}

.msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.85;
}

.msg-bubble.out .msg-meta {
  color: #667781;
}

.msg-bubble.out.red .msg-meta {
  color: rgba(255, 255, 255, 0.85);
}

.msg-bubble.in .msg-meta {
  color: rgba(255, 255, 255, 0.8);
}

.msg-status {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.msg-status-pending,
.msg-status-sent,
.msg-status-delivered {
  color: #667781;
}

.msg-bubble.out.red .msg-status-pending,
.msg-bubble.out.red .msg-status-sent,
.msg-bubble.out.red .msg-status-delivered {
  color: rgba(255, 255, 255, 0.85);
}

.msg-status-read {
  color: #53bdeb;
}

.msg-bubble.out.red .msg-status-read {
  color: #90caf9;
}

.msg-check {
  color: #53bdeb;
  font-size: 14px;
}

.msg-bubble.out.red .msg-check {
  color: #fff;
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 16px 14px;
  background: #f0f2f5;
  border-top: 1px solid #e0e0e0;
}

.chat-compose.is-hidden {
  display: none !important;
}

.compose-icon i {
  font-size: 24px;
  color: #54656f;
}

.compose-input-wrap {
  flex: 1;
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e8e8e8;
  padding: 10px 16px;
}

.compose-input-wrap input {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 15px;
  background: transparent;
}

/* --- Message attachments (Phase 5) --- */
.msg-attachment-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(280px, 72vw);
}

.msg-attachment-img,
.msg-attachment-video {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
}

.msg-attachment-audio {
  width: 100%;
  min-width: 200px;
  max-width: 260px;
}

.msg-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: #111b21;
  font-size: 14px;
  cursor: pointer;
  text-align: start;
}

.msg-bubble.out .msg-attachment-file {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.msg-attachment-caption {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.msg-attachment-placeholder {
  font-style: italic;
  opacity: 0.85;
}

.msg-upload-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.msg-upload-progress span {
  display: block;
  height: 100%;
  background: #25d366;
  transition: width 0.15s ease;
}

.msg-bubble.out .msg-upload-progress {
  background: rgba(255, 255, 255, 0.25);
}

.msg-attachment-error {
  min-height: 48px;
  background: rgba(0, 0, 0, 0.08);
}

/* --- Full-screen sponsor ad (same flow as mobile SponsorAdScreen) --- */
.ads-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ads-overlay[hidden] {
  display: none !important;
}

.ads-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ads-close:hover {
  background: rgba(0, 0, 0, 0.65);
}

.ads-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
}

.ads-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ads-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.ads-loading,
.ads-error {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 16px;
  text-align: center;
}

/* Full-screen auth (same API as Flutter: /login → /verify_otp → /refresh) */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(165deg, #0b141a 0%, #1a252b 45%, #111b21 100%);
}

.auth-gate.is-hidden {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel-bg);
  border-radius: 12px;
  padding: 24px 20px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  text-align: center;
}

.auth-app-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.auth-title {
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: #c62828;
  text-align: center;
}

.auth-sub {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}

.auth-row-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.auth-row-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--raachat-red);
}

.auth-email-wrap.is-hidden {
  display: none;
}

.auth-error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.auth-error.is-hidden {
  display: none;
}

.auth-primary {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--raachat-red);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

.auth-primary:hover {
  filter: brightness(1.08);
}

.auth-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-secondary:hover {
  color: var(--text);
}

.auth-hint {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.auth-info {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(59, 74, 84, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
  line-height: 1.45;
}

.auth-info.is-hidden {
  display: none;
}

.web-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
}

.web-modal.is-hidden {
  display: none;
}

.web-modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.web-modal-title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: var(--text);
}

.web-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.thread-search-status {
  margin: 0;
  padding: 8px 16px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--raachat-red);
  text-align: center;
}

.thread-search-status[hidden] {
  display: none;
}

.msg-row.msg-search-hidden {
  display: none;
}

.msg-bubble.msg-search-hit {
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.55);
}

.web-modal-actions .auth-primary,
.web-modal-actions .auth-secondary {
  width: auto;
  min-width: 100px;
  margin-top: 0;
}

/* --- Contact profile (FullScreenProfilePage) --- */
.contact-profile-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #f0ebe3;
  overflow: hidden;
}

.contact-profile-overlay[hidden] {
  display: none !important;
}

.contact-profile-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent);
}

.contact-profile-back {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-profile-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.contact-profile-hero {
  flex: 2 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111b21;
}

.contact-profile-hero-img {
  width: min(100%, 72vh);
  aspect-ratio: 1;
  object-fit: cover;
  background: #3b4a54;
}

.contact-profile-sheet {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 20px 20px 0 0;
  margin-top: -16px;
  position: relative;
  z-index: 1;
  padding: 20px 16px 28px;
  text-align: center;
}

.contact-profile-name {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #1f2c33;
}

.contact-profile-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #667781;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  margin: 0 auto 16px;
}

.contact-profile-phone:hover {
  background: #f2f4f5;
}

.contact-profile-actions {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 8px;
}

.contact-profile-action {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #3b4a54;
  font-size: 14px;
  padding: 0;
}

.contact-profile-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--raachat-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
