/*
 * Styling for the underconstruction widget (see underconstruction.html/.js).
 * Lives beside its template/behavior siblings, discovered and linked the
 * same way -- see Canary.Core.Widgets.WidgetDiscovery. Relies on the
 * color tokens framework.css
 * defines on :root (--bg, --bg-elevated, --text, --text-dim, --border,
 * --accent); those cascade globally once defined, regardless of which
 * stylesheet file references them, so this file doesn't need to redefine
 * or import them -- same reasoning as slideshow.css/downloads.css.
 *
 * Sized like a small dialog rather than a full-width card, so it reads as
 * a window sitting on the page instead of another site section.
 */

.uc-window {
  margin: 1.5rem 0;
  max-width: 28rem;
  padding: 2px;
  /* Win98 dialog frame: raised 2px bevel, hard offset shadow. Bevel
     tokens come from theme.css. */
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  background: var(--bg-elevated);
  box-shadow: 4px 4px 0 #000;
  overflow: hidden;
}

.uc-titlebar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.2rem 0.2rem 0.4rem;
  background: linear-gradient(90deg, var(--titlebar), var(--accent));
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  font-family: Consolas, "Cascadia Code", "SF Mono", Menlo, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  user-select: none;
}

.uc-window.is-collapsed .uc-titlebar {
  cursor: pointer;
}

.uc-caption {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uc-btn {
  box-sizing: border-box;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  background: var(--bg-elevated);
  color: var(--text);
  text-shadow: none;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.uc-btn-toggle:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
}

.uc-btn-toggle:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: -4px;
}

.uc-stripes {
  height: 10px;
  background-image: repeating-linear-gradient(
    -45deg,
    #14161a 0 8px,
    var(--accent) 8px 16px
  );
  background-size: 22px 22px;
  margin: 2px 0;
}

.uc-body {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1rem 0.7rem;
}

.uc-cone {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: var(--bg);
}

.uc-copy {
  min-width: 0;
}

.uc-heading {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.uc-message {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
}

.uc-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 1rem 0.85rem;
}

.uc-ok {
  padding: 0.25rem 1.1rem;
  min-width: 4.5rem;
  /* Win98 default button: raised bevel inside an extra 1px black frame. */
  border: 2px solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  background: var(--bg-elevated);
  color: var(--text);
  outline: 1px solid #000;
  font-family: Consolas, "Cascadia Code", "SF Mono", Menlo, "Liberation Mono", monospace;
  font-size: 0.9rem;
  cursor: pointer;
}

.uc-ok:hover {
  color: var(--accent);
}

.uc-ok:active {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
}

.uc-ok:focus-visible {
  outline: 1px dotted var(--accent);
  outline-offset: 2px;
}

.uc-window.is-collapsed .uc-stripes,
.uc-window.is-collapsed .uc-body,
.uc-window.is-collapsed .uc-actions {
  display: none;
}

@media (max-width: 520px) {
  .uc-window {
    max-width: none;
  }

  .uc-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .uc-actions {
    justify-content: center;
  }
}
