/* Vezi impreuna v6 - simple room directory and room UI */
.vezi-impreuna-page { padding-top: 26px; padding-bottom: 56px; }
.party-directory-hero {
  position: relative; overflow: hidden; margin: 0 0 18px; padding: 24px 26px;
  border: 1px solid #2b456b; border-radius: 16px;
  background: linear-gradient(135deg, #172a4c 0%, #1e3d70 60%, #264f88 100%);
  box-shadow: 0 18px 52px rgba(1, 8, 22, .26);
}
.party-directory-hero::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -130px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 50%;
}
.party-directory-hero__row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.party-directory-hero__eyebrow { color: #9ec1ff; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.party-directory-hero h1 { margin: 5px 0 5px; color: #fff; font-size: clamp(25px, 3vw, 36px); }
.party-directory-hero p { margin: 0; max-width: 720px; color: #c5d7f2; font-size: 13px; }
.party-directory-hero__note { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #dbe8ff; background: rgba(4,14,33,.18); font-size: 11px; font-weight: 700; }

.party-directory-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 16px 0; }
.party-directory-tools h2 { margin: 0; font-size: 20px; }
.party-code-form { display: flex; gap: 8px; align-items: center; }
.party-code-form input {
  width: 160px; height: 38px; padding: 0 11px; border: 1px solid #2b4163; border-radius: 9px;
  background: #0b1424; color: #eef5ff; text-transform: uppercase; letter-spacing: .08em;
}
.party-code-form .btn { height: 38px !important; min-height: 38px !important; padding: 7px 13px !important; border-radius: 9px !important; }

.party-public-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.party-public-card {
  display: flex; align-items: stretch; min-height: 118px; overflow: hidden;
  border: 1px solid #223957; border-radius: 13px; background: #0d1728;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.party-public-card:hover { transform: translateY(-2px); border-color: #456fae; background: #111e33; }
.party-public-card__poster { flex: 0 0 82px; background: #172238; }
.party-public-card__poster img { display: block; width: 82px; height: 100%; min-height: 118px; object-fit: cover; }
.party-public-card__body { min-width: 0; padding: 12px; display: flex; flex-direction: column; justify-content: center; }
.party-public-card__host { color: #7f93af; font-size: 10px; }
.party-public-card h3 { margin: 3px 0 3px; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-public-card__content { color: #90a2bc; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-public-card__tags { display: flex; gap: 6px; margin-top: 10px; }
.party-public-card__tags span { padding: 3px 6px; border-radius: 6px; background: #172642; color: #9fbbeb; font-size: 9px; font-weight: 800; }
.party-public-card__tags .is-public { background: rgba(81, 143, 234, .16); color: #83aff2; }
.party-empty {
  grid-column: 1 / -1; padding: 34px 18px; border: 1px dashed #2a405f; border-radius: 14px; background: #0a1220; color: #8ea0bb; text-align: center;
}
.party-empty strong { display: block; color: #e8f0fc; margin-bottom: 5px; }

.watch-room-page { padding-top: 26px; padding-bottom: 50px; }
.watch-room-shell { max-width: 1180px; margin: 0 auto; }
.watch-room-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.watch-room-back { color: #9bb0ce; font-size: 12px; }
.watch-room-code { padding: 6px 9px; border: 1px solid #2a3e5c; border-radius: 8px; color: #94a6c0; font-size: 10px; letter-spacing: .08em; }
.watch-room-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); gap: 12px; align-items: stretch; }
.watch-room-player-card, .watch-room-chat {
  overflow: hidden; border: 1px solid #233a5d; border-radius: 14px; background: #0d1628; box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.watch-room-card-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #203654; background: #101b2f; }
.watch-room-card-head h1, .watch-room-card-head h2 { margin: 0; font-size: 16px; line-height: 1.25; }
.watch-room-card-head p { margin: 3px 0 0; color: #7f92ad; font-size: 10px; }
.watch-room-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.watch-room-badges span { padding: 4px 7px; border: 1px solid #2b456b; border-radius: 999px; color: #9fbaea; background: #14233c; font-size: 9px; font-weight: 800; }
.watch-room-player {
  position: relative; aspect-ratio: 16 / 9; min-height: 420px; background: #000;
}
.watch-room-player iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.watch-room-player__loading, .watch-room-player__error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #8fa4c3; font-size: 12px; background: #03070d; }
.watch-room-player__error { color: #ff9b9b; }
.watch-room-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid #203654; background: #101b2f; }
.watch-room-actions .btn { min-height: 34px !important; height: 34px !important; padding: 6px 10px !important; border-radius: 8px !important; font-size: 11px !important; }

.watch-room-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 100%; }
.watch-room-chat__head { padding: 13px 14px; border-bottom: 1px solid #203654; background: #101b2f; }
.watch-room-chat__head h2 { margin: 0; font-size: 15px; }
.watch-room-chat__head p { margin: 3px 0 0; color: #7e90aa; font-size: 9px; }
.watch-room-messages { min-height: 320px; max-height: 535px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.watch-room-message { padding: 8px 9px; border: 1px solid #203551; border-radius: 9px; background: #0a1221; }
.watch-room-message.is-mine { border-color: #365e94; background: #0e1b30; }
.watch-room-message__meta { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.watch-room-message__meta strong { color: #dce9ff; font-size: 10px; }
.watch-room-message__meta span { color: #667994; font-size: 8px; }
.watch-room-message__text { color: #b9c7da; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.watch-room-chat__empty { margin: auto; color: #72839c; text-align: center; font-size: 10px; }
.watch-room-chat-form { padding: 10px; border-top: 1px solid #203654; background: #101b2f; }
.watch-room-chat-form textarea { width: 100%; min-height: 62px; max-height: 110px; resize: vertical; padding: 9px 10px; border: 1px solid #2b4162; border-radius: 8px; background: #080f1c; color: #eff5ff; font: inherit; font-size: 11px; }
.watch-room-chat-form__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.watch-room-chat-form__row small { color: #71839e; font-size: 8px; }
.watch-room-chat-form .btn { min-height: 32px !important; height: 32px !important; padding: 5px 10px !important; border-radius: 7px !important; font-size: 10px !important; }
.watch-room-login { margin: auto; padding: 20px; text-align: center; color: #8fa2bd; font-size: 11px; }
.watch-room-login .btn { margin-top: 10px; }
.watch-room-chat__status { min-height: 13px; margin: 0 0 7px; color: #7d91af; font-size: 9px; line-height: 1.35; }
.watch-room-chat__status:empty { display: none; }
.watch-room-chat__status.is-error { color: #ff8f8f; }
.watch-room-exit-fullscreen { display: none; }

@media (max-width: 980px) {
  .party-public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-room-grid { grid-template-columns: 1fr; }
  .watch-room-player { min-height: 0; }
  .watch-room-messages { min-height: 260px; max-height: 420px; }
}
@media (max-width: 620px) {
  .vezi-impreuna-page, .watch-room-page { padding-top: 16px; }
  .party-directory-hero { padding: 18px; }
  .party-directory-hero__row, .party-directory-tools { align-items: flex-start; flex-direction: column; }
  .party-directory-hero__note { white-space: normal; }
  .party-code-form { width: 100%; }
  .party-code-form input { min-width: 0; flex: 1; width: auto; }
  .party-public-grid { grid-template-columns: 1fr; }
  .watch-room-card-head { align-items: flex-start; flex-direction: column; }
  .watch-room-badges { justify-content: flex-start; }
  .watch-room-player { aspect-ratio: 16 / 10; }
}


/* Fullscreen + chat: fullscreen the whole room grid, not the third-party iframe. */
.watch-room-grid:fullscreen,
.watch-room-grid:-webkit-full-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: stretch;
  background: #050914;
  overflow: hidden;
}
.watch-room-grid:fullscreen .watch-room-player-card,
.watch-room-grid:-webkit-full-screen .watch-room-player-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}
.watch-room-grid:fullscreen .watch-room-card-head,
.watch-room-grid:fullscreen .watch-room-actions,
.watch-room-grid:-webkit-full-screen .watch-room-card-head,
.watch-room-grid:-webkit-full-screen .watch-room-actions {
  display: none !important;
}
.watch-room-grid:fullscreen .watch-room-player,
.watch-room-grid:-webkit-full-screen .watch-room-player {
  width: 100%;
  height: 100vh;
  min-height: 0;
  aspect-ratio: auto;
}
.watch-room-grid:fullscreen .watch-room-chat,
.watch-room-grid:-webkit-full-screen .watch-room-chat {
  width: 340px;
  min-width: 340px;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-left: 1px solid #203654;
  border-radius: 0;
  box-shadow: none;
  background: #0d1628;
}
.watch-room-grid:fullscreen .watch-room-messages,
.watch-room-grid:-webkit-full-screen .watch-room-messages {
  min-height: 0;
  max-height: none;
}
.watch-room-grid:fullscreen .watch-room-chat-form textarea,
.watch-room-grid:-webkit-full-screen .watch-room-chat-form textarea {
  resize: none;
}
.watch-room-grid:fullscreen .watch-room-exit-fullscreen,
.watch-room-grid:-webkit-full-screen .watch-room-exit-fullscreen {
  position: absolute;
  z-index: 50;
  top: 12px;
  right: 352px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #3b5274;
  border-radius: 8px;
  background: rgba(9, 17, 31, .88);
  color: #eaf2ff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.watch-room-grid:fullscreen .watch-room-exit-fullscreen[hidden],
.watch-room-grid:-webkit-full-screen .watch-room-exit-fullscreen[hidden] { display: none !important; }

@media (max-width: 760px) {
  .watch-room-grid:fullscreen,
  .watch-room-grid:-webkit-full-screen {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 66vh) minmax(0, 34vh);
  }
  .watch-room-grid:fullscreen .watch-room-player-card,
  .watch-room-grid:-webkit-full-screen .watch-room-player-card,
  .watch-room-grid:fullscreen .watch-room-player,
  .watch-room-grid:-webkit-full-screen .watch-room-player { height: 66vh; }
  .watch-room-grid:fullscreen .watch-room-chat,
  .watch-room-grid:-webkit-full-screen .watch-room-chat {
    width: 100%;
    min-width: 0;
    height: 34vh;
    border-left: 0;
    border-top: 1px solid #203654;
  }
  .watch-room-grid:fullscreen .watch-room-exit-fullscreen,
  .watch-room-grid:-webkit-full-screen .watch-room-exit-fullscreen { right: 12px; }
}

/* V8 self-contained watch-party icons: no dependency on Font Awesome names. */
.party-directory-hero__eyebrow,
.party-directory-hero__note,
.watch-room-actions .btn,
.watch-room-exit-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.party-inline-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: currentColor;
}
.party-inline-icon::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.party-inline-icon--users::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8-1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM1.5 21v-2.1A6.8 6.8 0 0 1 8.3 12h.4a6.8 6.8 0 0 1 6.8 6.9V21h-14Zm14.2 0v-2.1c0-1.7-.5-3.3-1.5-4.6.7-.5 1.6-.8 2.5-.8a5.8 5.8 0 0 1 5.8 5.8V21h-6.8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8-1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM1.5 21v-2.1A6.8 6.8 0 0 1 8.3 12h.4a6.8 6.8 0 0 1 6.8 6.9V21h-14Zm14.2 0v-2.1c0-1.7-.5-3.3-1.5-4.6.7-.5 1.6-.8 2.5-.8a5.8 5.8 0 0 1 5.8 5.8V21h-6.8Z'/%3E%3C/svg%3E");
}
.party-inline-icon--info::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-6h2v6Zm0-8h-2V7h2v2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-6h2v6Zm0-8h-2V7h2v2Z'/%3E%3C/svg%3E");
}
.party-inline-icon--copy::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 2h11a3 3 0 0 1 3 3v11h-3V5H8V2ZM5 6h10a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3Zm0 3v10h10V9H5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 2h11a3 3 0 0 1 3 3v11h-3V5H8V2ZM5 6h10a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3Zm0 3v10h10V9H5Z'/%3E%3C/svg%3E");
}
.party-inline-icon--share::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-7-4a3.2 3.2 0 0 0 0-2.4l7-4A3 3 0 1 0 15 5l-7 4a3 3 0 1 0 0 6l7 4a3 3 0 1 0 3-3Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-7-4a3.2 3.2 0 0 0 0-2.4l7-4A3 3 0 1 0 15 5l-7 4a3 3 0 1 0 0 6l7 4a3 3 0 1 0 3-3Z'/%3E%3C/svg%3E");
}
.party-inline-icon--expand::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h7v3H6v4H3V3Zm11 0h7v7h-3V6h-4V3ZM3 14h3v4h4v3H3v-7Zm15 0h3v7h-7v-3h4v-4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h7v3H6v4H3V3Zm11 0h7v7h-3V6h-4V3ZM3 14h3v4h4v3H3v-7Zm15 0h3v7h-7v-3h4v-4Z'/%3E%3C/svg%3E");
}
.party-inline-icon--compress::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8h5V3h3v8H3V8Zm13-5h3v5h5v3h-8V3ZM3 13h8v8H8v-5H3v-3Zm13 0h8v3h-5v5h-3v-8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 8h5V3h3v8H3V8Zm13-5h3v5h5v3h-8V3ZM3 13h8v8H8v-5H3v-3Zm13 0h8v3h-5v5h-3v-8Z'/%3E%3C/svg%3E");
}
