/* Tira Rooms — shared UI styles (status pill + modal) */

.room-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 16px 8px; padding: 8px 14px;
  background: rgba(255,184,0,0.12); border: 1px solid var(--gold, #FFB800);
  border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--gold-text, #8a6a00);
}
[data-theme="dark"] .room-status { background: rgba(255,184,0,0.18); color: var(--gold, #FFB800); }
.room-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2E7D32; box-shadow: 0 0 0 0 rgba(46,125,50,0.5);
  animation: roomPulse 2s infinite;
}
.room-status.viewer .room-status-dot { background: var(--gold, #FFB800); animation: none; }
.room-status.disconnected .room-status-dot { background: var(--burgundy, #722F37); animation: none; }
@keyframes roomPulse {
  0% { box-shadow: 0 0 0 0 rgba(46,125,50,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(46,125,50,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }
}

.room-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 250;
  align-items: center; justify-content: center; padding: 16px;
}
.room-modal.open { display: flex; }
.room-modal-card {
  background: var(--bg, #F5F0E6); border-radius: 20px; padding: 20px;
  max-width: 380px; width: 100%; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  color: var(--navy, #1A2744);
}
[data-theme="dark"] .room-modal-card { color: var(--cream, #F5F0E6); }
.room-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; font-weight: 800; font-size: 16px;
}
.room-modal .modal-close {
  background: none; border: none; cursor: pointer;
  color: inherit; padding: 4px;
}
.room-code-label {
  text-align: center; font-size: 12px; font-weight: 700;
  color: var(--gold-text, #8a6a00); margin-bottom: 6px; opacity: 0.7;
}
[data-theme="dark"] .room-code-label { color: var(--gold, #FFB800); }
.room-code-display {
  text-align: center; font-size: 44px; font-weight: 900;
  letter-spacing: 10px; color: var(--burgundy, #722F37);
  font-family: monospace; padding: 8px 0;
}
[data-theme="dark"] .room-code-display { color: var(--gold, #FFB800); }
.room-qr { display: flex; justify-content: center; padding: 12px 0; }
.room-qr img, .room-qr canvas { border-radius: 8px; }
.room-peer-count {
  text-align: center; font-size: 12px; font-weight: 700;
  opacity: 0.65; margin-bottom: 12px;
}
.room-modal-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.room-modal-actions .btn-primary, .room-modal-actions .btn-secondary { flex: 1; }
.room-modal-actions .btn-danger {
  flex: 1; padding: 12px 16px; font-size: 14px; font-weight: 700;
  background: transparent; color: var(--burgundy, #722F37);
  border: 1.5px solid var(--burgundy, #722F37);
  border-radius: 12px; cursor: pointer;
}
.room-hint {
  text-align: center; font-size: 11px; font-weight: 500;
  opacity: 0.55; padding-top: 12px;
}
.room-code-input {
  width: 100%; box-sizing: border-box; text-align: center;
  font-size: 36px; font-weight: 900; letter-spacing: 10px;
  font-family: monospace; padding: 14px 0;
  background: rgba(26,39,68,0.04); border: 1.5px solid rgba(26,39,68,0.1);
  border-radius: 12px; color: var(--burgundy, #722F37); text-transform: uppercase;
  margin-bottom: 8px;
}
[data-theme="dark"] .room-code-input {
  background: rgba(245,240,230,0.05); border-color: rgba(245,240,230,0.15);
  color: var(--gold, #FFB800);
}
.room-code-input:focus { outline: none; border-color: var(--gold, #FFB800); }
.room-join-status {
  text-align: center; font-size: 13px; font-weight: 700;
  min-height: 18px; padding: 4px 0;
}
.room-join-status.error { color: var(--burgundy, #722F37); }
.room-join-status.ok { color: #2E7D32; }
.room-join-status.info { color: var(--gold-text, #8a6a00); }
[data-theme="dark"] .room-join-status.info { color: var(--gold, #FFB800); }
