/* ========== ОКНО БРАУЗЕРА КОМНАТ ========== */

#roomBrowserOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

#roomBrowserWindow {
  background: white;
  width: 90%;
  max-width: 800px;
  height: 80vh;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

#roomBrowserContent {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.room-loading,
.room-empty {
  text-align: center;
  color: #888;
  padding: 30px;
}

.room-error {
  color: #e74c3c;
  padding: 8px 0;
  font-size: 13px;
}

/* ========== КАТЕГОРИИ ========== */

.room-category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.room-category-tab {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.room-category-tab:hover {
  background: #f5f6ff;
}

.room-category-tab.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
  font-weight: 600;
}

.room-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

/* ========== СПИСОК КОМНАТ ========== */

.room-list-table {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}

.room-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr 2fr;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.room-list-row:last-child {
  border-bottom: none;
}

.room-list-head {
  background: #f7f8fc;
  font-weight: 600;
  font-size: 12px;
  color: #666;
}

.room-name-cell {
  font-weight: 500;
}

.room-favorite-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  color: #ccc;
  padding: 0 2px;
  vertical-align: middle;
}

.room-favorite-btn.active {
  color: #f5b301;
}

.room-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  background: #2ecc71;
  color: white;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

.room-actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.room-password-input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  width: 100px;
}

/* ========== ФОРМЫ (СОЗДАНИЕ/УПРАВЛЕНИЕ) ========== */

.room-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.room-form-label {
  font-size: 13px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-cost-hint {
  font-size: 12px;
  color: #888;
  margin: 2px 0 6px;
}

/* Предупреждение о том, что расставить декорацию можно только физически
   находясь в комнате — обычный .room-cost-hint слишком незаметен для этого,
   легко пропустить и решить, что кнопка "Поставить" просто не работает. */
.room-warning-hint {
  font-size: 12px;
  color: #b45309;
  background: #fff7e6;
  border: 1px solid #f5c46c;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 2px 0 6px;
}

.room-inline-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.room-inline-form input {
  flex: 1;
}

.room-list-simple {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.room-simple-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}

.room-delete-btn {
  margin-top: 16px;
}

@media (max-width: 768px) {
  .room-list-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .room-list-head {
    display: none;
  }

  .room-actions-cell {
    justify-content: flex-start;
  }
}

/* Плашка "режима расстановки" декорации (см. startDecorationPlacement в
   js/rooms.js) — тот же принцип, что .staff-tools-bar, но сверху по центру:
   низ справа уже занят плашкой невидимости для персонала. */
.decoration-placement-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2c2c34;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  font-size: 13px;
}

.decoration-placement-banner button {
  border: none;
  background: #e74c3c;
  color: #fff;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.room-decor-count {
  color: #1976D2;
  margin-left: 4px;
}
