/* Alves Meet 2.7 — shared layout, room management and meeting conversation. */
:root { --radius: 18px; }
body { -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { transition: background-color .16s, border-color .16s, box-shadow .16s; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
svg { max-width: 100%; }
.workspace { padding-top: 24px; padding-bottom: 48px; }
.workspace > .topline { margin-bottom: 30px; }
.sidebar { background: var(--panel); }
.sidebar nav button { min-height: 48px; }
.sidebar footer { border-radius: 14px; background: var(--surface); padding: 16px; }
.sidebar footer p { margin: 4px 0 16px; }
.sidebar footer button { width: 100%; background: var(--panel); }
.intro h1 { font-size: clamp(1.9rem,3vw,2.55rem); }
.card { border-radius: var(--radius); box-shadow: 0 5px 24px #05142b05; }
.room-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 22px 0; }
.room-stats article { padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.room-stats span { color: var(--muted); font-size: .82rem; }
.room-stats strong { font-size: 1.8rem; font-weight: 750; line-height: 1; letter-spacing: -.05em; }
.start-grid { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.start-grid .card { padding: 28px; min-height: 250px; }
.start-grid .start-card { background: linear-gradient(125deg,color-mix(in srgb,var(--accent) 11%,var(--panel)),var(--panel)); }
.start-card h2 { max-width: 360px; font-size: 1.8rem; margin-bottom: 14px; }
.start-card > p:not(.eyebrow) { max-width: 430px; }
.room-search-actions { flex-wrap: wrap; gap: 8px; }
.room-search-actions input { width: 235px; }
.room-search-actions select { width: auto; min-width: 135px; }
.room-list { display: grid; gap: 14px; }
.room-item { gap: 18px; padding: 22px; border-radius: 16px; transition: border-color .16s; }
.room-item:hover { border-color: color-mix(in srgb,var(--accent) 35%,var(--line)); }
.room-item h3 { font-size: 1rem; }
.room-symbol { border-radius: 14px; width: 46px; height: 46px; flex-shrink: 0; }
.room-content { min-width: 0; }
.room-code-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.room-code-label code { padding: 3px 7px; border-radius: 5px; background: var(--surface); }
.room-code-label > span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.room-code-label svg { width: 14px; height: 14px; }
.room-entry-actions { justify-content: flex-end; max-width: 350px; }
.room-entry-actions button { padding: 9px 12px; font-size: .8rem; }
.room-advanced { margin-top: 12px; }
.room-advanced summary { color: var(--muted); }
.settings-guide { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.settings-guide a { padding: 10px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: .85rem; }
.settings-section-title { padding-top: 24px; margin-top: 10px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.settings-grid { align-items: start; }
.settings-grid .turn-help { background: var(--surface); }
.settings-grid .turn-help h3 { font-size: .9rem; margin-top: 22px; }
.settings-grid .turn-help p { font-size: .82rem; }
.settings-owner-note { display: flex; gap: 20px; align-items: start; }
.settings-owner-note > svg { flex: 0 0 32px; width: 32px; height: 32px; color: var(--accent); }
.settings-owner-note p { max-width: 700px; }
.form label { line-height: 1.6; }
.form input:not([type=checkbox]):not([type=range]), .form select { min-height: 46px; }
.auth-grid .card, .register-card { border-radius: 24px; }
.auth-grid > section:first-child .badge { padding: 8px 14px; }
.plan-admin-grid > .card { display: flex; flex-direction: column; }
.plan-admin-grid > .card > button:last-child { margin-top: auto; }
.prejoin-grid > section { border-radius: 22px; }
.home-join, .pricing-grid > article { border-radius: 24px; }
.home-steps { border-radius: 18px; }
.home-tag { letter-spacing: .07em; }
dialog { border-radius: 22px; padding: 26px; max-height: calc(100dvh - 40px); }
dialog::backdrop { background: #050b18a6; backdrop-filter: blur(5px); }
dialog.wide-dialog { width: min(1000px,calc(100vw - 32px)); max-width: 1000px; }
.dialog-head { gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.dialog-head h2 { margin-bottom: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.room-dialog-subtitle { overflow-wrap: anywhere; }
.room-settings-tabs { display: flex; gap: 6px; padding: 5px; margin: 20px 0 26px; border-radius: 13px; background: var(--surface); }
.room-settings-tabs button { flex: 1; border-color: transparent; background: transparent; }
.room-settings-tabs button.active { color: var(--accent); background: var(--panel); box-shadow: 0 2px 5px #0000000a; }
#room-details { max-width: 650px; }
.branding-cards { gap: 18px; }
.branding-card { border-radius: 16px; padding: 20px; }
.branding-card .branding-preview { min-height: 140px; max-height: 220px; border-radius: 12px; }
.branding-card-heading { min-height: 70px; }
.branding-preview-empty { color: #b6c6de; }
.admin-room-summary { display: flex; gap: 16px; align-items: center; margin: 10px 0 28px; }
.admin-room-summary p { margin-bottom: 0; font-size: .82rem; }
#room-duration h3 { display: flex; gap: 8px; align-items: center; }
#room-duration h3 svg { width: 20px; height: 20px; }
.room-danger-zone { padding: 20px; border: 1px solid color-mix(in srgb,var(--danger) 35%,var(--line)); border-radius: 14px; margin-top: 26px; background: color-mix(in srgb,var(--danger) 4%,var(--panel)); }
.room-danger-zone p { font-size: .83rem; color: var(--muted); }
.meeting-body { gap: 16px; }
.meeting-header h2 { font-weight: 700; }
.meeting-time { display: flex; align-items: center; flex: 0 0 auto; gap: 16px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.meeting-time-now { display: flex; gap: 10px; align-items: center; }
.meeting-time-now > svg { width: 19px; height: 19px; color: var(--accent); }
.meeting-time span { display: block; color: var(--muted); font-size: .6rem; margin-bottom: 3px; white-space: nowrap; }
.meeting-time time, .meeting-time strong { display: block; font-size: .9rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.meeting-time-elapsed { border-left: 1px solid var(--line); padding-left: 16px; }
.has-header-branding .meeting-time { background: #111827e8; border-color: #ffffff40; color: white; }
.has-header-branding .meeting-time span { color: #c7d3e8; }
.has-header-branding .meeting-time-now > svg { color: #b8d0ff; }
.branding-autosave-note { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .78rem; }
.branding-status { font-size: .78rem; line-height: 1.6; }
.branding-status[data-phase="saved"] { color: #57dab7; }
body.light .branding-status[data-phase="saved"] { color: #157557; }
.branding-status[data-phase="error"] { color: var(--danger); }
.branding-status[data-phase="saving"], .branding-status[data-phase="pending"] { color: var(--accent); }
@media(max-width:1100px) {
  .meeting-time { padding: 8px 10px; gap: 10px; }
  .meeting-time-now > svg { display: none; }
  .meeting-time-elapsed { padding-left: 10px; }
}
@media(max-width:800px) {
  .meeting-header { flex-wrap: wrap; gap: 10px; }
  .meeting-header > .brand { display: none; }
  .meeting-header > div.meeting-heading { flex: 1 1 100%; width: 100%; max-width: none; text-align: left; }
  .meeting-header .meeting-heading h2 { max-width: 100%; }
  .meeting-header > .actions { margin-left: auto; gap: 6px; }
  .meeting-time { padding: 6px 9px; gap: 10px; }
  .meeting-time time, .meeting-time strong { font-size: .78rem; }
  .meeting-time span { font-size: .54rem; }
  .meeting .sidepanel { top: 145px; }
}
@media(max-width:420px) {
  .meeting-header { padding: 10px; gap: 8px; }
  .meeting-header > .actions { gap: 4px; }
  .meeting-header .actions button, .meeting-header #room-appearance { width: 32px; min-width: 32px; min-height: 34px; padding: 6px; }
  .meeting-header button.meeting-network-badge { width: 32px; min-width: 32px; padding: 6px; }
  .meeting-time { gap: 8px; padding: 6px 8px; }
  .meeting-time-elapsed { padding-left: 8px; }
}
.meeting .sidepanel { width: 370px; min-width: 330px; border-radius: 20px; padding: 0; overflow: hidden; box-shadow: 0 12px 40px #0000000a; }
.sidepanel-title { padding: 22px 22px 16px; margin: 0; }
.sidepanel-title h2 { font-size: 1rem; letter-spacing: -.015em; }
.sidepanel .live-badge { display: inline-flex; align-items: center; gap: 5px; color: #37c99c; background: #37c99c0f; border: 1px solid #37c99c24; font-size: .65rem; }
.live-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.sidepanel .tabs { padding: 5px; margin: 0 16px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); gap: 2px; flex-shrink: 0; }
.sidepanel .tabs button { font-size: .8rem; border: 0; border-radius: 8px; min-height: 42px; padding: 8px 10px; gap: 6px; white-space: nowrap; background: transparent; }
.sidepanel .tabs button svg { width: 17px; height: 17px; }
.sidepanel .tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 5px #0000000a; }
.sidepanel .tabs #close-panel { margin-left: auto; flex: 0 0 34px; padding: 8px; }
.tab-count, .unread-count { font-size: .65rem; border-radius: 6px; padding: 1px 5px; background: var(--panel); line-height: 1.6; }
.unread-count { color: var(--on-accent,#fff); background: var(--accent); }
.sidepanel .messages { padding: 16px 20px; overscroll-behavior: contain; scrollbar-width: thin; }
.sidepanel #chat-area { display: flex; flex-direction: column; gap: 18px; }
.sidepanel #chat-area.hidden { display: none; }
.chat-empty { margin: auto 0; padding: 36px 8px; }
.chat-empty > svg { width: 42px; height: 42px; padding: 10px; box-sizing: content-box; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--accent); }
.chat-empty h3 { font-size: .95rem; margin-top: 18px; }
.chat-empty p { font-size: .8rem; line-height: 1.6; }
.sidepanel .message { padding: 0; margin: 0; max-width: 92%; min-width: 130px; border: 0; align-self: flex-start; }
.message-meta { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; margin: 0 2px 6px; }
.message-meta strong { color: var(--text); font-size: .72rem; overflow-wrap: anywhere; }
.message-meta time { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.sidepanel .message p { padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px 14px 14px; margin: 0; font-size: .85rem; line-height: 1.6; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.sidepanel .message-own { align-self: flex-end; }
.sidepanel .message-own p { background: color-mix(in srgb,var(--accent) 16%,var(--panel)); border-color: color-mix(in srgb,var(--accent) 24%,var(--line)); border-radius: 14px 3px 14px 14px; }
.sidepanel .chat-form { margin: 0; padding: 16px; border-top: 1px solid var(--line); display: block; background: var(--panel); }
.sidepanel .chat-form.hidden { display: none; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); }
.chat-compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent); }
.chat-compose textarea { color: var(--text); background: transparent; border: 0; outline: none; padding: 10px 8px; resize: vertical; min-height: 42px; max-height: 130px; width: 100%; min-width: 0; font-size: .84rem; line-height: 1.5; box-shadow: none; }
.sidepanel .chat-form .chat-send { width: 42px; height: 42px; min-height: 42px; flex: 0 0 42px; border-radius: 11px; padding: 10px; background: var(--accent); color: var(--on-accent,#fff); }
.chat-form > small { display: block; font-size: .6rem; margin: 9px 2px 0; }
.people-moderation { padding: 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.owner-label { display: flex; gap: 7px; align-items: center; font-size: .7rem; color: var(--muted); margin-bottom: 12px; }
.owner-label svg { width: 15px; height: 15px; color: var(--accent); }
.people-moderation #mute-others { width: 100%; background: var(--panel); font-size: .8rem; }
.people-moderation p { font-size: .68rem; line-height: 1.5; margin: 10px 0 0; color: var(--muted); }
.people-moderation .text-button { border: 0; background: transparent; width: 100%; padding: 8px 0 0; min-height: 32px; font-size: .7rem; color: var(--accent); }
.people-moderation .text-button svg { width: 14px; height: 14px; }
.participant { display: flex; align-items: center; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.participant:last-child { border-bottom: 0; }
.participant-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line); font-size: .7rem; font-weight: 700; }
.participant-avatar.is-owner { background: color-mix(in srgb,var(--accent) 20%,var(--panel)); border-color: color-mix(in srgb,var(--accent) 30%,var(--line)); }
.participant-identity { flex: 1; min-width: 0; }
.participant-identity strong { font-size: .79rem; font-weight: 650; }
.you-label { font-weight: 400; color: var(--muted); font-size: .7rem; }
.owner-badge { display: block; color: var(--accent); font-size: .62rem; margin: 2px 0; }
.participant-mic { font-size: .65rem; gap: 4px; line-height: 1.5; margin-top: 4px; }
.participant-mic svg { width: 12px; height: 12px; }
.presenting-label { display: block; color: var(--accent); font-size: .63rem; }
.participant-actions { display: flex; gap: 4px; flex-shrink: 0; }
.participant-actions button { width: 34px; height: 36px; min-height: 36px; border-radius: 9px; padding: 8px; background: transparent; border-color: transparent; }
.participant-actions button:hover { background: var(--surface); border-color: var(--line); }
.participant-actions button svg { width: 17px; height: 17px; }
.waiting-entry { border: 1px solid color-mix(in srgb,var(--accent) 30%,var(--line)); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: color-mix(in srgb,var(--accent) 5%,var(--panel)); }
.waiting-entry p { margin-bottom: 8px; font-size: .8rem; font-weight: 650; }
.waiting-entry button { font-size: .72rem; padding: 8px 12px; min-height: 36px; }
@media(min-width:901px) { .meeting:has(.sidepanel:not(.hidden)) .meeting-body { grid-template-columns: minmax(0,1fr) 370px; } }
@media(max-width:1200px) { .room-item { flex-wrap: wrap; } .room-item > .room-entry-actions { max-width: none; width: 100%; padding-left: 64px; } }
@media(max-width:900px) {
  .workspace { padding: 20px 18px 36px; }
  .room-stats article { padding: 16px; }
  .start-grid .card { min-height: 225px; padding: 24px; }
  .meeting .sidepanel { position: fixed; inset: 88px 12px 88px auto; width: min(370px,calc(100vw - 24px)); min-width: 0; z-index: 40; height: auto; box-shadow: 0 10px 80px #0008; }
  .meeting-header #room-appearance { width: 38px; padding: 8px; }
}
@media(max-width:600px) {
  .room-stats { gap: 8px; }
  .room-stats article { flex-direction: column; align-items: flex-start; padding: 13px; gap: 10px; }
  .room-stats span { font-size: .66rem; }
  .room-stats strong { font-size: 1.6rem; }
  .start-grid { grid-template-columns: 1fr; }
  .start-grid .card { min-height: auto; padding: 22px; }
  .room-search-actions { width: 100%; }
  .room-search-actions input { flex: 1; width: 150px; }
  .room-search-actions select { max-width: 130px; min-width: 110px; }
  .room-item { padding: 18px; gap: 12px; }
  .room-item > .room-entry-actions { padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .room-entry-actions button { width: 100%; }
  .room-content { flex: 1 1 calc(100% - 70px); }
  .room-code-label { gap: 8px; }
  .room-settings-tabs button { font-size: .75rem; padding: 10px 6px; }
  .room-settings-tabs button svg { width: 17px; height: 17px; }
  .branding-cards { grid-template-columns: 1fr; }
  dialog, dialog.wide-dialog { padding: 18px; width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .dialog-actions button { flex: 1; }
  .settings-guide { gap: 6px; }
  .settings-guide a { padding: 9px; font-size: .72rem; }
  .settings-owner-note { gap: 12px; }
  .meeting-header .brand { display: none; }
  .meeting .sidepanel { inset: 78px 10px 84px; width: auto; }
  .participant-actions button { min-width: 36px; min-height: 40px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; } }
@media(max-width:900px) {
  .meeting-body { position: relative; }
  .meeting .sidepanel { position: absolute; inset: 10px 10px 8px auto; width: min(370px,calc(100% - 20px)); }
}

/* 2.7.7: visible dialog headers and viewport-aware meeting menus. */
dialog, dialog.wide-dialog { padding: 0; overflow: hidden; max-height: calc(100dvh - 24px); }
dialog[open] { display: flex; flex-direction: column; }
.dialog-head { flex: 0 0 auto; padding: 18px 24px; margin: 0; background: var(--panel); }
.dialog-head h2 { font-size: 1.12rem; line-height: 1.4; overflow-wrap: anywhere; }
.dialog-head .icon-btn { flex: 0 0 40px; height: 40px; min-height: 40px; border-radius: 12px; }
.dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 22px 24px 26px; }
.dialog-body > :last-child { margin-bottom: 0; }
.dialog-body input, .dialog-body select { max-width: 100%; }
.dialog-body .room-settings-tabs { margin-top: 16px; }
.room-settings-tabs button { min-width: 0; min-height: 46px; }
.room-settings-tabs button[aria-selected=true] { box-shadow: 0 2px 8px #00000012; }
.room-advanced { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 640px; }
.room-advanced summary { display: flex; align-items: center; gap: 8px; list-style: none; padding: 10px 12px; font-size: .76rem; color: var(--text); cursor: pointer; }
.room-advanced summary::-webkit-details-marker { display: none; }
.room-advanced summary svg { width: 16px; height: 16px; color: var(--muted); }
.room-advanced summary .connection-label { font-size: .76rem; }
.room-advanced[open] summary { border-bottom: 1px solid var(--line); }
.room-advanced[open] summary > svg[data-icon="chevronDown"] { transform: rotate(180deg); }
.room-advanced > p, .room-advanced > .actions { margin: 12px; }
.room-advanced .actions { flex-wrap: wrap; }
.room-advanced .actions button { font-size: .74rem; min-height: 40px; }
.meeting .more-menu { position: fixed; inset: auto; transform: none; z-index: 80; width: 320px; max-width: calc(100vw - 24px); padding: 8px; border-radius: 18px; box-shadow: 0 12px 48px #0005; overscroll-behavior: contain; }
.more-menu button { flex-shrink: 0; }
.more-menu button:focus-visible { outline-offset: -3px; background: var(--surface); }
.more-menu button:hover { background: var(--surface); }
.dialog-body select { cursor: pointer; border-radius: 11px; }
.dialog-body select:disabled { opacity: .6; cursor: not-allowed; }
@media(max-width:600px) {
  dialog, dialog.wide-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .dialog-head { padding: 14px 16px; gap: 12px; }
  .dialog-head h2 { font-size: 1rem; }
  .dialog-body { padding: 18px 16px 22px; }
  .dialog-body .branding-card { padding: 16px; }
  .room-advanced summary { min-height: 42px; }
}
