/*
  Readability/UX:
  - Use theme variables for text and surfaces
  - Provide a consistent "surface" under page content so text stays readable
*/

:root {
  --hc-text: #e9eefc;
  --hc-surface: rgba(0,0,0,0.45);
  --hc-surface-border: rgba(255,255,255,0.10);
}

body.hc-body {
  min-height: 100vh;
  padding-top: 70px;
  color: var(--hc-text);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.75) 60%, rgba(0,0,0,0.85) 100%),
    url("../img/backgrounds/bg_1.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

.hc-page-surface {
  background: var(--hc-surface);
  border: 1px solid var(--hc-surface-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Ensure all Bootstrap cards inside the main surface remain readable and consistent */
.hc-page-surface .card {
  background: var(--hc-card) !important;
  color: var(--hc-text) !important;
  border: 1px solid var(--hc-surface-border) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.hc-page-surface .card .card-body { color: var(--hc-text) !important; }
.hc-page-surface .card .card-title,
.hc-page-surface h1, .hc-page-surface h2, .hc-page-surface h3, .hc-page-surface h4, .hc-page-surface h5 {
  color: rgba(255,255,255,0.95) !important;
}
.hc-page-surface hr { border-color: rgba(255,255,255,0.12); }

/* Make text readable inside the main surface regardless of template classes */
.hc-page-surface .text-light,
.hc-page-surface .text-white,
.hc-page-surface .text-dark,
.hc-page-surface .text-black {
  color: var(--hc-text) !important;
}
.hc-page-surface .text-muted {
  color: rgba(255,255,255,0.70) !important;
}
body.theme-light .hc-page-surface .text-muted,
body.theme-soft .hc-page-surface .text-muted {
  color: rgba(20,25,40,0.65) !important;
}

/* Improve default link visibility on dark backgrounds */
a { color: rgba(255,255,255,0.92); }
a:hover { color: #ffffff; }

.hc-main {
    min-height: calc(100vh - 140px);
}

.hc-footer {
    background: rgba(0, 0, 0, 0.7);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.hc-hero-card {
    background: rgba(0,0,0,0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.hc-hero-avatar-row {
    display: flex;
    gap: 10px;
}

.hc-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero icons (no empty circles) */
.hc-avatar-icon {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  border: 2px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.95);
  font-size: 22px;
}
body.theme-light .hc-avatar-icon,
body.theme-soft .hc-avatar-icon {
  background: rgba(0,0,0,0.06);
  border: 2px solid rgba(0,0,0,0.12);
  color: rgba(10,16,32,0.90);
}

/* Чат */
.hc-chat {
    background: var(--hc-card);
    color: var(--hc-text);
    border: 1px solid var(--hc-surface-border);
    border-radius: 1rem;
    padding: 1rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hc-chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
    padding-right: .5rem;
}

/* Pack F: best-effort anti-copy for chat */
#chatMessages, .hc-chat-messages {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.hc-chat-message {
    margin-bottom: .5rem;
    padding: .4rem .6rem;
    border-radius: .4rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

body.theme-light .hc-chat-message,
body.theme-soft .hc-chat-message {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
}

/* Pack N: audit dashboard card */
.hc-audit-card {
  border: 1px solid var(--hc-surface-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  color: var(--hc-text);
}

body.theme-light .hc-audit-card,
body.theme-soft .hc-audit-card {
  background: rgba(0,0,0,0.03);
}

.hc-chat-message.me {
    background: rgba(66, 153, 225, 0.2);
    text-align: right;
}

.hc-chat-message .meta {
    font-size: 0.75rem;
    color: #aaa;
}

.hc-room-item {
    cursor: pointer;
}
.hc-room-item.active {
    background-color: #0d6efd;
    color: #fff;
}

/* Room list items should follow theme */
.list-group-item {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  color: var(--hc-text);
}
body.theme-light .list-group-item,
body.theme-soft .list-group-item {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
  color: var(--hc-text);
}

/* Inputs inside chat */
.hc-chat .form-control {
  background: rgba(0,0,0,0.12);
  border-color: rgba(255,255,255,0.12);
  color: var(--hc-text);
}
body.theme-light .hc-chat .form-control,
body.theme-soft .hc-chat .form-control {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.12);
  color: rgba(10,16,32,0.90);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #000;
    object-fit: cover;
}

.user-avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #000;
    object-fit: cover;
}

.bot-avatar {
    border-color: #35c9ff;
    box-shadow: 0 0 10px rgba(53, 201, 255, 0.8);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


.hc-logo{height:34px; width:auto; display:block;}
/* Theme system (Pack K2) */
body.theme-light {
  --hc-bg-overlay: rgba(255,255,255,0.10);
  --hc-text: #0b1020;
  --hc-card: rgba(255,255,255,0.92);
  --hc-surface: rgba(255,255,255,0.88);
  --hc-surface-border: rgba(0,0,0,0.08);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.10)),
    url("../img/backgrounds/bg_1.jpg");
}
body.theme-dark {
  --hc-bg-overlay: rgba(0,0,0,0.55);
  --hc-text: #e9eefc;
  --hc-card: rgba(10,14,22,0.70);
  --hc-surface: rgba(0,0,0,0.45);
  --hc-surface-border: rgba(255,255,255,0.10);
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.80)),
    url("../img/backgrounds/bg_4.jpg");
}

body.theme-night {
  --hc-bg-overlay: rgba(0,0,0,0.70);
  --hc-text: #eef2ff;
  --hc-card: rgba(6,8,14,0.78);
  --hc-surface: rgba(0,0,0,0.50);
  --hc-surface-border: rgba(255,255,255,0.10);
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.70), rgba(0,0,0,0.90)),
    url("../img/backgrounds/bg_5.jpg");
}

body.theme-soft {
  --hc-bg-overlay: rgba(255,255,255,0.08);
  --hc-text: #0b1020;
  --hc-card: rgba(255,255,255,0.88);
  --hc-surface: rgba(255,255,255,0.85);
  --hc-surface-border: rgba(0,0,0,0.08);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.05)),
    url("../img/backgrounds/bg_3.jpg");
}

body.theme-aurora {
  --hc-bg-overlay: rgba(0,0,0,0.55);
  --hc-text: #eef3ff;
  --hc-card: rgba(10,14,22,0.62);
  --hc-surface: rgba(0,0,0,0.45);
  --hc-surface-border: rgba(255,255,255,0.10);
  background-image: linear-gradient(180deg, var(--hc-bg-overlay), rgba(0,0,0,0.25)), url('/static/img/backgrounds/bg_harmixo_aurora.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}
body.theme-sunset {
  --hc-bg-overlay: rgba(0,0,0,0.55);
  --hc-text: #fff0ea;
  --hc-card: rgba(12,10,14,0.62);
  --hc-surface: rgba(0,0,0,0.42);
  --hc-surface-border: rgba(255,255,255,0.10);
  background-image:
    linear-gradient(135deg, rgba(255,160,90,0.20), rgba(255,90,140,0.18), rgba(120,90,255,0.16)),
    url("../img/backgrounds/bg_3.jpg");
}
body.theme-neon {
  --hc-bg-overlay: rgba(0,0,0,0.65);
  --hc-text: #eaffff;
  --hc-card: rgba(6,8,14,0.72);
  --hc-surface: rgba(0,0,0,0.50);
  --hc-surface-border: rgba(255,255,255,0.10);
  background-image:
    linear-gradient(135deg, rgba(0,255,200,0.18), rgba(0,150,255,0.18), rgba(180,0,255,0.16)),
    url("../img/backgrounds/bg_5.jpg");
}

body.theme-pride {
  --hc-bg-overlay: rgba(0,0,0,0.45);
  --hc-text: #f7f9ff;
  --hc-card: rgba(10,12,20,0.70);
  --hc-surface: rgba(0,0,0,0.42);
  --hc-surface-border: rgba(255,255,255,0.10);
  background-image:
    linear-gradient(135deg, rgba(255,0,0,0.20), rgba(255,165,0,0.20), rgba(255,255,0,0.18), rgba(0,128,0,0.18), rgba(0,0,255,0.18), rgba(75,0,130,0.18), rgba(238,130,238,0.18)),
    url("../img/backgrounds/bg_2.jpg");
}
.hc-card { background: var(--hc-card) !important; }


/* Responsive brand logo */
.hc-logo{height:32px;width:auto;}
.hc-logo-icon{display:none;height:34px;}
@media (max-width: 767px){
  .hc-logo-full{display:none;}
  .hc-logo-icon{display:inline-block;}
}
@media (min-width: 768px){
  .hc-logo-full{display:inline-block;}
  .hc-logo-icon{display:none;}
}

/* Chat: room users bar */
.hc-room-users-bar {
  padding: 6px 10px;
  border: 1px solid var(--hc-surface-border);
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
}

.hc-room-users-bar img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 6px;
}

/* Gallery cards */
.hc-gallery-card {
  border: 1px solid var(--hc-surface-border);
  border-radius: 16px;
  overflow: hidden;
}

.hc-gallery-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
}

.hc-gallery-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

.hc-gallery-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.65));
}

.hc-gallery-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.hc-gallery-meta {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Gallery thumbnails grid */
.hc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 768px){
  .hc-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hc-thumb {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hc-surface-border);
  background: rgba(0,0,0,0.25);
}

.hc-thumb::before {
  content: "";
  display: block;
  padding-top: 100%; /* square */
}

.hc-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hc-thumb-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 120ms ease;
}

.hc-thumb:hover .hc-thumb-actions { opacity: 1; }

/* Simple lightbox */
.hc-lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 16px;
}

/* Profile chips (Interests / Looking for) */
.hx-chipset{display:flex;flex-wrap:wrap;gap:.5rem}
.hx-chip{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);color:#fff;border-radius:999px;padding:.25rem .65rem;font-size:.9rem;line-height:1.2;cursor:pointer}
.hx-chip:hover{background:rgba(255,255,255,.10)}
.hx-chip.is-selected{background:rgba(13,110,253,.25);border-color:rgba(13,110,253,.55)}



/* --- PATCH Chat UX: actions hidden, context menu, focus mode --- */
.hc-msg-actions { opacity: 0; pointer-events: none; transition: opacity .12s ease-in-out; }
.hc-chat-message:hover .hc-msg-actions { opacity: 1; pointer-events: auto; }
.hc-msg-actions button { padding: 2px 6px; line-height: 1; }

.hc-msg-menu { min-width: 220px; border-radius: 12px; overflow: hidden; }
.hc-msg-menu .list-group-item { background: rgba(20,20,25,0.95); color: rgba(255,255,255,0.92); border-color: rgba(255,255,255,0.06); }
body.theme-light .hc-msg-menu .list-group-item,
body.theme-soft .hc-msg-menu .list-group-item { background: rgba(255,255,255,0.96); color: rgba(10,16,32,0.92); border-color: rgba(0,0,0,0.06); }

#hcChatLayout.hc-focus #hcRoomsCol,
#hcChatLayout.hc-focus #hcPeopleCol { display: none !important; }
#hcChatLayout.hc-focus #hcChatCol { flex: 0 0 100%; max-width: 100%; }

#hcChatLayout.hc-focus .hc-chat-input textarea { min-height: 96px; }

/* --- Emoji sizing (Twemoji) --- */
img.emoji {
  height: 1em;
  width: 1em;
  vertical-align: -0.15em;
}

.btn img.emoji,
.badge img.emoji,
.nav-link img.emoji,
.dropdown-item img.emoji {
  height: 1em;
  width: 1em;
}

/* Preserve new lines in jokes */
.hc-preline,
.joke-text {
  white-space: pre-line;
}
