/*
 * Cool Web Tools — toolkit shell.
 *
 * Layout for pages that combine several related tools into one tabbed
 * surface. Each tab embeds an existing tool page in an iframe; the tool's
 * own header/footer are suppressed (see header.js / footer.js framed check),
 * so only its UI shows inside the frame.
 */

.cwt-toolkit {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--cwt-header-height));
}

.cwt-toolkit__bar {
  position: sticky;
  top: var(--cwt-header-height);
  z-index: 50;
  background: var(--cwt-header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--cwt-border);
}

.cwt-toolkit__bar-inner {
  display: flex;
  align-items: center;
  gap: var(--cwt-space-2);
  padding: 0 var(--cwt-space-6);
  overflow-x: auto;
  scrollbar-width: thin;
}

.cwt-toolkit__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cwt-text);
  white-space: nowrap;
  padding-right: var(--cwt-space-3);
  margin-right: var(--cwt-space-1);
  border-right: 1px solid var(--cwt-border);
  flex-shrink: 0;
}

.cwt-toolkit__tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--cwt-text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  padding: var(--cwt-space-4) var(--cwt-space-3);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.cwt-toolkit__tab:hover { color: var(--cwt-text); }
.cwt-toolkit__tab.is-active {
  color: var(--cwt-accent);
  border-bottom-color: var(--cwt-accent);
}

.cwt-toolkit__frames {
  position: relative;
  flex: 1 1 auto;
}

.cwt-toolkit__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
  background: var(--cwt-bg);
}
.cwt-toolkit__frame.is-active { display: block; }

.cwt-toolkit__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cwt-text-subtle);
  font-size: 0.9rem;
  pointer-events: none;
}
