/* Lassy Meet — app frame, toasts, menus and dialogs.

   There is no chrome: no app rail, no title bar, no search. A guest opening
   a join link gets the meeting filling the window, which is what the real
   join-by-link client does. What remains here is the frame screens mount
   into, and the layers that float above it.
*/

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  width: 100%;
  background-color: var(--colorNeutralBackground3);
}

/* --------------------------------------------------------------------- */
/* Main content area                                                      */
/* --------------------------------------------------------------------- */

.shell__main {
  /* No `grid-area` — the frame is a single implicit cell now that the named
     areas are gone, and naming one that does not exist mis-places it. */
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background-color: var(--colorNeutralBackground3);
}

/* --------------------------------------------------------------------- */
/* Tablet and phone                                                       */
/* --------------------------------------------------------------------- */

@media (max-width: 640px) {
  .shell__main { border-top-left-radius: 0; }

  .toasts { left: 1.2rem; right: 1.2rem; top: 1.2rem; }
  .toast { min-width: 0; max-width: none; }

  .dialog-overlay { padding: 0; align-items: flex-end; }
  .dialog {
    max-width: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 90vh;
    padding-bottom: calc(var(--spacingVerticalXXL) + env(safe-area-inset-bottom, 0px));
  }
}

@media (pointer: coarse) {
  .menu__item { min-height: 4.4rem; }
}


/* --------------------------------------------------------------------- */
/* Toasts                                                                 */
/* --------------------------------------------------------------------- */

.toasts {
  position: fixed;
  top: 1.2rem;
  right: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: var(--spacingVerticalS);
  z-index: var(--zIndexMessages);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: start;
  gap: var(--spacingHorizontalS);
  min-width: 28rem;
  max-width: 40rem;
  padding: var(--spacingVerticalM) var(--spacingHorizontalM);
  background-color: var(--colorNeutralBackground1);
  border-radius: var(--borderRadiusMedium);
  box-shadow: var(--shadow16);
  font-size: var(--fontSizeBase300);
  line-height: var(--lineHeightBase300);
  color: var(--colorNeutralForeground1);
  pointer-events: auto;
  animation: toast-in var(--durationNormal) var(--curveDecelerateMid);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.toast__icon { font-size: 20px; line-height: 0; flex-shrink: 0; }
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-weight: var(--fontWeightSemibold); }
.toast--error .toast__icon { color: var(--colorStatusDangerForeground1); }
.toast--success .toast__icon { color: var(--colorStatusSuccessForeground1); }
.toast--warning .toast__icon { color: var(--colorStatusWarningForeground1); }
.toast--info .toast__icon { color: var(--colorBrandForeground1); }
@media screen and (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* --------------------------------------------------------------------- */
/* Dialog                                                                 */
/* --------------------------------------------------------------------- */

.dialog-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--colorBackgroundOverlay);
  z-index: var(--zIndexOverlay);
  padding: 2.4rem;
}
.dialog {
  display: flex;
  flex-direction: column;
  gap: var(--spacingVerticalL);
  width: 100%;
  max-width: 60rem;
  max-height: 100%;
  padding: var(--spacingVerticalXXL) var(--spacingHorizontalXXL);
  background-color: var(--colorNeutralBackground1);
  border-radius: var(--borderRadiusXLarge);
  box-shadow: var(--shadow64);
  overflow: auto;
}
/* Wider, for a surface whose content is a grid rather than a paragraph — the
   effects picker wants six tiles across, as the reference lays it out. */
.dialog--wide { max-width: 82rem; gap: var(--spacingVerticalM); }
.dialog__title { font-size: var(--fontSizeBase500); line-height: var(--lineHeightBase500); font-weight: var(--fontWeightSemibold); }
.dialog__head { display: flex; align-items: center; gap: var(--spacingHorizontalM); }
.dialog__head .dialog__title { flex: 1 1 auto; min-width: 0; }
.dialog__actions { display: flex; justify-content: flex-end; gap: var(--spacingHorizontalS); }
/* An empty action row would still eat a gap, and the dialog would look like
   it had lost its buttons rather than never having had any. */
.dialog__actions:empty { display: none; }
