/* =========================================================
   🏛️ PRAÇA + SALAS — Comunidade (premium polish)
========================================================= */

.plaza-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  transition: opacity 0.2s ease;
}

.plaza-hub--hidden {
  display: none !important;
}

.plaza-hub--loading {
  opacity: 0.65;
}

/* ——— Hero compacto ——— */
.plaza-hero--compact {
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(49, 46, 129, 0.22);
}

.plaza-hero-kicker {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.plaza-hero-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.plaza-hero-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.plaza-hero-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.plaza-hero-tag--pro {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.plaza-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.plaza-live-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: plazaPulse 2s ease infinite;
}

@keyframes plazaPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ——— Lock banner ——— */
.plaza-lock-banner {
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), rgba(249, 115, 22, 0.06));
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.plaza-lock-banner__inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plaza-lock-banner__icon {
  font-size: 22px;
  flex-shrink: 0;
}

.plaza-lock-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #7f1d1d;
}

.plaza-lock-banner__text strong {
  font-size: 13px;
  color: #991b1b;
}

/* ——— Weekly ——— */
.plaza-weekly {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.plaza-weekly.is-live {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(234, 88, 12, 0.35);
}

.plaza-weekly__title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 900;
  color: #92400e;
}

.plaza-weekly__sub {
  margin: 0;
  font-size: 12px;
  color: #78350f;
  line-height: 1.4;
}

/* ——— Sections ——— */
.plaza-section {
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
}

.plaza-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.plaza-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #1e1b4b;
}

.plaza-section-hint {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.plaza-empty {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.plaza-empty--chat {
  font-size: 12px;
  opacity: 0.75;
}

/* ——— Friends strip ——— */
.plaza-friends-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.plaza-friend-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.plaza-friend-chip.is-same-room {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.25);
}

.plaza-friend-chip__av {
  font-size: 20px;
}

.plaza-friend-chip__meta {
  flex: 1;
  min-width: 0;
}

.plaza-friend-chip__name {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plaza-friend-chip__status {
  display: block;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plaza-friend-chip__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.plaza-chip-btn {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.plaza-chip-btn--primary {
  background: #eef2ff;
  color: #4338ca;
}

/* ——— Room grid ——— */
.plaza-room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 480px) {
  .plaza-room-grid {
    grid-template-columns: 1fr;
  }
}

.plaza-room-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  background: #fafbff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.plaza-room-card:hover:not(.is-plan-locked) {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.plaza-room-card.is-plan-locked {
  opacity: 0.72;
  cursor: pointer;
  background: #f1f5f9;
}

.plaza-room-lock {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 14px;
}

.plaza-room-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.plaza-room-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.plaza-room-name {
  font-size: 14px;
  font-weight: 900;
  color: #1e1b4b;
}

.plaza-room-count {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
}

.plaza-room-card.is-plan-locked .plaza-room-count {
  color: #64748b;
}

.plaza-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ——— Buttons ——— */
.plaza-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.plaza-btn--sm {
  padding: 8px 12px;
  font-size: 12px;
  flex-shrink: 0;
}

.plaza-btn:active {
  transform: scale(0.98);
}

.plaza-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.plaza-btn--ghost {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.plaza-modal-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #334155;
}

.plaza-modal-label--spaced {
  margin-top: 14px;
}

.plaza-modal-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.plaza-modal-picker {
  margin-bottom: 4px;
}

.plaza-modal-picker .pnv-ms-wrap {
  width: 100%;
}

.plaza-modal-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
}

.plaza-loading {
  padding: 28px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* ——— Sala ao vivo ——— */
.study-room-live {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: #fff;
  box-shadow: 0 12px 40px rgba(30, 27, 75, 0.08);
  margin-bottom: 16px;
}

.study-room-live[hidden] {
  display: none !important;
}

.study-room-head {
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, #312e81, #4f46e5);
  color: #fff;
}

.study-room-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.study-room-head-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.study-room-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 900;
}

.study-room-sub {
  margin: 0;
  font-size: 12px;
  opacity: 0.88;
  line-height: 1.4;
}

.study-room-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.study-room-scope__label {
  font-size: 12px;
  font-weight: 700;
  color: #e0e7ff;
}

.study-room-scope__edit {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.study-room-scope__edit:hover {
  background: rgba(255, 255, 255, 0.22);
}

.study-room-leave,
.study-room-invite-btn {
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.study-room-invite-btn {
  font-size: 14px;
  padding: 7px 9px;
}

.study-room-stack {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.study-room-stack-av {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.study-room-stack-av.is-you {
  border-color: #fde68a;
  box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.35);
}

.study-room-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 680px) {
  .study-room-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  }
}

.study-room-col {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

@media (min-width: 680px) {
  .study-room-col--main {
    border-bottom: none;
    border-right: 1px solid rgba(15, 23, 42, 0.06);
  }
}

.study-room-col-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.study-room-blitz {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.study-room-blitz--locked {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.35);
}

.study-room-blitz__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 900;
  color: #92400e;
}

.study-room-blitz--locked .study-room-blitz__title {
  color: #475569;
}

.study-room-blitz__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #78350f;
  line-height: 1.45;
}

.study-room-blitz--locked .study-room-blitz__hint {
  color: #64748b;
}

.study-room-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.study-room-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
}

.study-room-member-row.is-you {
  background: #eef2ff;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.study-room-member-score {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.study-room-member-score.is-done {
  color: #059669;
}

.study-room-chat-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.study-room-chat-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}

.study-room-chat-line strong {
  color: #4338ca;
  font-weight: 800;
  margin-right: 4px;
}

.study-room-chat-compose {
  display: flex;
  gap: 6px;
}

.study-room-chat-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 14px;
}

.study-room-chat-send {
  width: 42px;
  border-radius: 11px;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.dash-zone-badge--live {
  background: #059669 !important;
  box-shadow: 0 0 0 2px #fff, 0 0 12px rgba(16, 185, 129, 0.45);
  animation: plazaBadgePulse 2.2s ease-in-out infinite;
}

@keyframes plazaBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.plaza-modal-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.plaza-guild-details {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  overflow: hidden;
}

.plaza-guild-details[open] {
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.plaza-guild-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.plaza-guild-summary::-webkit-details-marker {
  display: none;
}

.plaza-guild-summary::after {
  content: "▾";
  font-size: 12px;
  color: #64748b;
  transition: transform 0.15s ease;
}

.plaza-guild-details[open] .plaza-guild-summary::after {
  transform: rotate(180deg);
}

.plaza-guild-summary__title {
  font-size: 14px;
  font-weight: 900;
  color: #334155;
}

.plaza-guild-summary__hint {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-left: auto;
  margin-right: 8px;
}

@media (max-width: 520px) {
  .plaza-guild-summary__hint {
    display: none;
  }
}

.plaza-guild-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.plaza-guild-body .guild-panel {
  margin-top: 10px;
}

.community-block--guild {
  margin-top: 0;
}
