/* Shared SF2027 layout and component styles for Knowledge inner tool pages */

.kb-main {
  flex: 1 0 auto;
  background: #ffffff;
  overflow-x: clip;
}

/* Full-bleed light-blue hero band */
.kb-band {
  position: relative;
  overflow: hidden;
  background: #ecf3ff;
}

.kb-band-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: center;
  max-width: 1248px;
  margin-inline: auto;
  padding: 32px 24px 64px;
  box-sizing: border-box;
}

.kb-band-in > div {
  min-width: 0;
}

.kb-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5878;
}

.kb-crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -10px;
  color: #0064ff;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease;
}

.kb-crumb a:hover {
  color: #0e3692;
}

.kb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px 14px 5px;
  border: 1.5px solid #e3ecfa;
  border-radius: 999px;
  background: #ffffff;
  color: #0e3692;
  font-family: var(--sf-en, "Josefin Sans", "IBM Plex Sans Thai", sans-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kb-h1 {
  margin: 0;
  color: #000000;
  font-family: var(--sf-font, "IBM Plex Sans Thai", system-ui, sans-serif);
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.kb-hl {
  color: #0064ff;
}

.kb-lead {
  margin: 14px 0 0;
  max-width: 640px;
  color: #1f2a44;
  font-size: 18px;
  line-height: 1.65;
}

.kb-art {
  justify-self: end;
  width: 260px;
  height: 260px;
  overflow: hidden;
  border-radius: 50% 50% 50% 36px;
  background: #e5effe;
  box-shadow: 0 34px 64px -34px rgba(0, 51, 153, 0.6);
}

.kb-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Tool content container overlapping bottom edge of hero band */
.kb-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1248px;
  margin: -28px auto 0;
  padding: 0 24px 64px;
  box-sizing: border-box;
}

/* Scoped card, button, and form-control refinements inside .kb-body */
.kb-body .card,
.kb-body .rounded-2xl.border,
.kb-body .kb-card {
  border: 1.5px solid #e3ecfa;
  border-radius: 28px;
  box-shadow: 0 24px 48px -32px rgba(0, 51, 153, 0.5);
}

.kb-body .primary-gradient.rounded-2xl {
  border-radius: 32px;
  box-shadow: 0 24px 48px -32px rgba(0, 51, 153, 0.5);
}

.kb-body .btn,
.kb-body .kb-btn {
  min-height: 44px;
  border-radius: 999px;
}

.kb-body .btn-primary,
.kb-body .btn-secondary,
.kb-body button.bg-primary,
.kb-body button.bg-primary-container,
.kb-body a.bg-primary,
.kb-body a.bg-primary-container {
  min-height: 48px;
  border-radius: 999px;
  padding-inline: 22px;
}

.kb-body .btn-icon {
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
}

.kb-body .seg-btn {
  min-height: 44px;
  border-radius: 10px;
}

.kb-body [data-position],
.kb-body #templateList button {
  min-height: 44px;
}

.kb-body #myFormsList a,
.kb-body nav[aria-label="สารบัญคู่มือ"] a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.kb-body .field,
.kb-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
.kb-body select,
.kb-body textarea {
  min-height: 48px;
  border: 2px solid #e3ecfa;
  border-radius: 14px;
  background-color: #f7faff;
}

.kb-body .field:focus,
.kb-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):focus,
.kb-body select:focus,
.kb-body textarea:focus {
  border-color: #0064ff;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.16);
  outline: none;
}

.kb-body .field.invalid {
  border-color: #ba1a1a;
  box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.14);
}

/* Bottom More Tools section */
.kb-more {
  background: #ecf3ff;
  padding: 72px 24px;
}

.kb-more-in {
  max-width: 1248px;
  margin-inline: auto;
}

.kb-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.kb-more-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 44px;
  padding: 22px;
  border: 1.5px solid #e3ecfa;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 24px 48px -32px rgba(0, 51, 153, 0.5);
  color: #000000;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease;
}

.kb-more-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 50px -28px rgba(0, 51, 153, 0.55);
}

.kb-more-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.kb-more-title {
  color: #0e3692;
  font-family: var(--sf-en, "Josefin Sans", "IBM Plex Sans Thai", sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.kb-more-desc {
  color: #1f2a44;
  font-size: 15px;
  line-height: 1.55;
}

:is(.kb-crumb a, .kb-more-card, .kb-body a, .kb-body button, .kb-body summary, .kb-body input, .kb-body select, .kb-body textarea):focus-visible {
  outline: 3px solid #f9a530;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .kb-band-in {
    grid-template-columns: 1fr;
    padding: 24px 16px 52px;
  }

  .kb-art {
    display: none;
  }

  .kb-more {
    padding: 56px 16px;
  }

  .kb-more-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kb-body {
    padding: 0 16px 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kb-crumb a,
  .kb-more-card,
  .kb-body .btn,
  .kb-body .kb-btn {
    transition: none;
  }

  .kb-more-card:hover {
    transform: none;
  }
}

/* Set 2 Knowledge guide & cookbook refinements */
.kb-band .kb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.kb-band .kb-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
}

.kb-body .glass-card {
  border: 1.5px solid #e3ecfa;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 48px -32px rgba(0, 51, 153, 0.5);
}

.kb-body .tab-btn {
  min-height: 44px;
  border-radius: 10px;
}

.kb-body .copy-btn,
.kb-body #bookmarklet-link,
.kb-body #copy-btn,
.kb-body #suggest-btn,
.kb-body #view-step-message-btn,
.kb-body #copy-checklist-btn,
.kb-body #download-userscript-btn {
  min-height: 44px;
}

.kb-body pre,
.kb-body .code-block {
  max-width: 100%;
}
