/* =============================================================================
   HOME-DEMO-SPACE.CSS — ENIBUSINESS Homepage: Follow-Up Rooms Space Demo
   Scope   : home page only (/index.html)
   Version : 6
   ============================================================================= */

.demo-space {
  width: min(100%, 1080px);
  margin: 2rem auto 1.5rem;
  filter: drop-shadow(0 0 16px rgba(0,0,0,0.9));
}
@media (min-width: 769px) {
  .demo-space { width: min(100%, 1160px); }
}

/* ── Frame ── */
.ds-frame {
  background: #000;
  border: 1px solid #353535;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 630px;
}

/* ══════════════════════════════════════════════════
   PAGE HEADER  (.gwtsspaces — Back button + Spaces title)
   ══════════════════════════════════════════════════ */
.ds-header {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  flex-shrink: 0;
  background-color: transparent;
  border-bottom: 1px solid #353535;
  position: relative;
}
/* ← Back button (.gblabspaces): absolute left, accent color */
.ds-header-back {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #245AF6;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: default;
}
/* Page title (.page_title): centered, white, 700, ~18-20px */
.ds-header-title {
  color: white;
  font-weight: 700;
  font-size: clamp(16px, 2.2vw, 20px);
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
}

/* ══════════════════════════════════════════════════
   TOOLBAR  (MeetingHeader.css + MeetingHeader.jsx)
   ══════════════════════════════════════════════════ */
.ds-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px 10px;
  background: #000;
  border-bottom: 1px solid #353535;
  flex-shrink: 0;
}

/* BTN: flex-direction ROW, gap 4px, padding 2px 6px */
.ds-tb-btn {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: transparent;
  border: none;
  cursor: default;
  font-family: Arial, sans-serif;
}
.ds-tb-btn + .ds-tb-btn {
  border-left: 1px solid rgba(255,255,255,0.1);
  padding-left: 8px;
  margin-left: 2px;
}

/* ICON_WRAP: 22×22 */
.ds-tb-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
}

/* LABEL: 12px Arial, accent color */
.ds-tb-label {
  font-size: 12px;
  font-family: Arial, sans-serif;
  color: #245AF6;
  white-space: nowrap;
}

/* rec-pulse from MeetingHeader.css */
.ds-rec-pulse {
  display: inline-block;
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 50%;
  background: #245AF6;
  animation: ds-rec-blink 2s infinite;
}
@keyframes ds-rec-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 5px #245AF6; }
  50%       { opacity: 0.3; box-shadow: none; }
}

/* currentFollowUpRoom dot */
.ds-rooms-dot {
  position: absolute;
  top: 0; right: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #000;
}

/* ══════════════════════════════════════════════════
   BODY
   ══════════════════════════════════════════════════ */
.ds-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════════════════════════════════
   VIDEO GRID  (desktop-layout-3-participants)
   ══════════════════════════════════════════════════ */
.ds-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
  background: #000;
  min-width: 0;
  overflow: hidden;
}
.ds-grid-top {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  min-height: 0;
}
.ds-grid-bottom {
  flex: 1;
  display: flex;
  justify-content: center;
  min-height: 0;
}
/* 3rd tile: grid-column 1/-1; max-width 50%; margin 0 auto */
.ds-grid-bottom .ds-tile {
  width: 50%;
  height: 100%;
}

/* .participant-container (ParticipantTile.css exact) */
.ds-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border-radius: 23px;
  border: 1px solid #404040;
  position: relative;
  box-sizing: border-box;
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
}

/* .is-speaking: box-shadow from Spaces.css */
.ds-tile.is-speaking {
  box-shadow: 0 0 0 2px rgba(180,180,180,0.5);
  transition: box-shadow 0.2s ease;
}

/* .participant-initials-avatar (Spaces.css: font-size 38px, margin-bottom 8px) */
.ds-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #3a3a3a;
  color: #e0e0e0;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 500;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-bottom: 8px;
}

/* .user-name-label (Spaces.css: margin 5px 0, white, 14px, 500) */
.ds-tile-name {
  margin: 5px 0;
  color: white;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* .equalizer (ParticipantTile.css) */
.ds-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-top: 6px;
}
.ds-eq-bar {
  display: block;
  width: 4px;
  min-height: 3px;
  border-radius: 2px;
  background: #245AF6;
  opacity: 0.8;
  transition: height 0.08s ease;
}
/* Animated equalizer on speaking tile */
.ds-tile.is-speaking .ds-eq-bar:nth-child(1) { animation: ds-eq 0.9s 0.00s infinite ease-in-out; }
.ds-tile.is-speaking .ds-eq-bar:nth-child(2) { animation: ds-eq 0.9s 0.15s infinite ease-in-out; }
.ds-tile.is-speaking .ds-eq-bar:nth-child(3) { animation: ds-eq 0.9s 0.05s infinite ease-in-out; }
.ds-tile.is-speaking .ds-eq-bar:nth-child(4) { animation: ds-eq 0.9s 0.20s infinite ease-in-out; }
.ds-tile.is-speaking .ds-eq-bar:nth-child(5) { animation: ds-eq 0.9s 0.10s infinite ease-in-out; }
@keyframes ds-eq {
  0%, 100% { height: 3px; }
  50%       { height: 14px; }
}

/* .mic-icon (Spaces.css: absolute bottom 10px, rgba(0,0,0,0.7), border-radius 50%) */
.ds-mic-icon {
  position: absolute;
  bottom: 10px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  font-size: 14px;
  color: gray;
}

/* CollapseButton (ParticipantTile.jsx: absolute top 8px left 8px) */
.ds-collapse-btn-wrap {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 10;
}
.ds-collapse-btn {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.61);
  border-radius: 33px;
  color: white;
  width: 18px; height: 18px;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

/* ══════════════════════════════════════════════════
   SIDEBAR  (FollowUpRoomsSidebar.jsx dark-mode C tokens)
   ══════════════════════════════════════════════════ */
.ds-sidebar {
  position: relative;
  width: 280px;
  flex-shrink: 0;
  background: #000;
  border-left: 1px solid #2a2a2a;
  box-shadow: -6px 0 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header: padding 14px 16px */
.ds-sidebar-hd {
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.ds-sidebar-hd-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
}
.ds-sidebar-close {
  background: none;
  border: none;
  cursor: default;
  color: #888;
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: inherit;
}

/* Info: padding 10px 16px, color #888, fontSize 11px */
.ds-sidebar-info {
  padding: 10px 16px;
  border-bottom: 1px solid #1e1e1e;
  color: #888;
  font-size: 11px;
  flex-shrink: 0;
}

/* Rooms list: flex 1, overflow-y auto, padding 12px, paddingBottom 288px (chatPanelH+12 = 276+12) */
.ds-rooms-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  padding-bottom: 288px;
  min-height: 0;
}

/* Room card: marginBottom 10px, borderRadius 12px */
.ds-room-card {
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: #000;
  overflow: hidden;
}
.ds-room-card--active {
  border-color: #245AF6;
  background: rgba(36,90,246,0.08);
}

/* Card inner header: padding 10px 12px */
.ds-room-card-inner {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ds-room-card--active .ds-room-card-inner {
  border-bottom: 1px solid #1e1e1e;
}
.ds-room-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 9×9 accent dot */
.ds-accent-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #245AF6;
  flex-shrink: 0;
  display: inline-block;
}
/* Room name: white 13px 600 */
.ds-room-name { color: white; font-size: 13px; font-weight: 600; }
/* Count badge: #777 on #222, borderRadius 10px, padding 1px 7px */
.ds-room-count { color: #777; font-size: 11px; background: #222; border-radius: 10px; padding: 1px 7px; }

.ds-room-btn { font-family: inherit; cursor: default; }
/* Leave: border #555, color #bbbbbb, borderRadius 8px */
.ds-room-btn--leave {
  background: transparent;
  border: 1px solid #555;
  color: #bbbbbb;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
}
/* Join: background accent, color white, borderRadius 8px */
.ds-room-btn--join {
  background: #245AF6;
  border: none;
  color: white;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Participants: padding 8px 12px */
.ds-room-participants { padding: 8px 12px; }
.ds-p-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
/* 22×22 avatar: background #2a2a2a, PersonIcon #555 13px */
.ds-p-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ds-p-name { color: #cccccc; font-size: 12px; }
.ds-room-empty { padding: 8px 12px; color: #444; font-size: 11px; }

/* ══════════════════════════════════════════════════
   CHAT PANEL  (position: absolute bottom: 0)
   ══════════════════════════════════════════════════ */
.ds-chat {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #000;
  border-top: 2px solid #2a2a2a;
  z-index: 1;
}

/* Chat header: height 44px */
.ds-chat-hd {
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
  border-bottom: 1px solid #1e1e1e;
}
.ds-chat-room-lbl { color: #245AF6; font-size: 12px; font-weight: 600; }
.ds-chat-sep      { color: #555; font-size: 12px; }
.ds-chat-lbl      { color: #888; font-size: 12px; }
/* ← Main Room button */
.ds-chat-back {
  margin-left: auto;
  background: #245AF6;
  border: none;
  color: white;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
  font-family: inherit;
}

/* Messages: height 180px */
.ds-chat-msgs {
  height: 180px;
  overflow: hidden;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Message sender label: fontSize 10px, color #888, marginBottom 2px */
.ds-chat-sender { font-size: 10px; color: #888; margin-bottom: 2px; padding-left: 2px; }
/* Message bubbles */
.ds-bubble { padding: 6px 10px; font-size: 12px; line-height: 1.4; }
.ds-bubble--other { background: #2a2a2a; color: white; border-radius: 12px 12px 12px 2px; }
.ds-bubble--me    { background: #245AF6; color: white; border-radius: 12px 12px 2px 12px; }
/* Timestamp: fontSize 10px, color #444, marginTop 2px */
.ds-chat-time { font-size: 10px; color: #444; margin-top: 2px; }

/* Chat input: height 52px */
.ds-chat-input-row {
  height: 52px;
  padding: 8px 10px;
  border-top: 1px solid #1e1e1e;
  display: flex;
  gap: 6px;
  align-items: center;
}
/* input: background #000, border #333, borderRadius 16px, padding 7px 12px */
.ds-chat-input {
  flex: 1;
  background: #000;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 7px 12px;
  color: #555;
  font-size: 12px;
  outline: none;
  font-family: inherit;
}
/* Send button: 32×32, borderRadius 50%, background #2a2a2a (disabled) */
.ds-chat-send {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #2a2a2a;
  border: none;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   CONTROLS BAR  (outer-wrapper + MeetingControls.jsx)
   ══════════════════════════════════════════════════ */
.ds-controls-bar {
  background: #000;
  border-top: 1px solid #353535;
  padding: 5px;
  flex-shrink: 0;
}
.ds-controls-inner {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

/* BTN: flex column, padding 5px 4px — mobile: flex 1; desktop: flex 0 0 auto 70-90px */
.ds-ctrl-btn {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 4px;
  font-family: inherit;
  outline: none;
}
@media (min-width: 769px) {
  .ds-ctrl-btn {
    flex: 0 0 auto;
    min-width: 70px;
    max-width: 90px;
  }
}

/* ICON_WRAP: 44×44, border #3d3d3d, borderRadius 14px — use div not span */
.ds-ctrl-icon {
  width: 44px; height: 44px;
  border: 1px solid #3d3d3d;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 18px;
  background: transparent;
  transition: background-color 0.15s;
}
/* ctrl-btn:hover > div hover effect from Spaces.css */
.ds-ctrl-btn:hover .ds-ctrl-icon {
  background-color: rgba(255,255,255,0.08);
}

/* LABEL: 10px Arial, accent color, marginTop 4px */
.ds-ctrl-label {
  display: block;
  font-size: 10px;
  font-family: Arial, sans-serif;
  color: #245AF6;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   INSIDE LAPTOP FRAME — flush-fill, no own border/radius
   ══════════════════════════════════════════════════ */
.demo-laptop__display .ds-frame {
  border: none;
  border-radius: 0;
  height: 100%;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ds-frame { height: 550px; }
  .ds-sidebar { width: 210px; }
  .ds-sidebar-info { display: none; }
  .ds-room-participants { display: none; }
  .ds-chat-msgs { height: 90px; }
  .ds-chat-input-row { display: none; }
  .ds-rooms-list { padding-bottom: 150px; }
}

@media (max-width: 520px) {
  .ds-frame { height: 450px; border-radius: 12px; }
  .ds-sidebar { display: none; }
  .ds-grid-bottom .ds-tile { width: calc(50% - 5px); }
  .ds-avatar { width: 54px; height: 54px; font-size: 28px; margin-bottom: 6px; }
}
