/* AI Workflow Tools & Templates — front-end
   Scoped to .aiwt-* so it will not clash with your theme. */

:root { --aiwt-brand: #1E2761; --aiwt-accent: #C9A227; }

.aiwt-wrap, .aiwt-single { max-width: 1120px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.aiwt-wrap *, .aiwt-single *, .aiwt-formwrap * { box-sizing: border-box; }

/* ---------- Toolbar ---------- */
.aiwt-toolbar { margin: 0 0 26px; }
.aiwt-search { margin-bottom: 14px; }
.aiwt-search input {
  width: 100%; max-width: 460px; padding: 13px 18px; font-size: 15px;
  border: 1.5px solid #E1E5F2; border-radius: 10px; background: #fff; color: #2B2F45;
}
.aiwt-search input:focus { outline: none; border-color: var(--aiwt-brand); }

.aiwt-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.aiwt-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  color: #33395C; background: #fff; border: 1.5px solid #E1E5F2;
  border-radius: 999px; padding: 9px 16px; cursor: pointer;
  transition: all .15s ease; line-height: 1.2;
}
.aiwt-chip:hover { border-color: #B9C0DE; background: #F7F8FD; }
.aiwt-chip.is-active { background: var(--aiwt-brand); border-color: var(--aiwt-brand); color: #fff; }
.aiwt-chip-count { font-size: 11.5px; opacity: .6; font-weight: 700; }

/* ---------- Grid ---------- */
.aiwt-grid { display: grid; gap: 20px; }
.aiwt-cols-1 { grid-template-columns: 1fr; }
.aiwt-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aiwt-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aiwt-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Section header ---------- */
.aiwt-sectionhead {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 24px;
}
.aiwt-sectionhead-title {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-size: 26px; font-weight: 800; color: var(--aiwt-brand); line-height: 1.25; letter-spacing: -.3px;
}
.aiwt-sectionhead-icon { font-size: 24px; line-height: 1; }
.aiwt-sectionhead-sub { font-size: 15px; color: #6C7189; line-height: 1.5; }
.aiwt-sectionhead-rule { flex: 1 1 60px; height: 1px; background: #E4E8F0; min-width: 40px; }

/* ---------- Card ---------- */
.aiwt-card {
  --aiwt-card: #26307A;
  --aiwt-card-dark: #1B2358;
  background: #fff; border: 1px solid #E7EAF5; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.aiwt-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(30,39,97,.13); }
.aiwt-card[hidden] { display: none; }

/* Coloured header band */
.aiwt-card-head {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 152px;
  padding: 22px 22px 24px; text-decoration: none !important;
  background: linear-gradient(135deg, var(--aiwt-card) 0%, var(--aiwt-card-dark) 100%);
  color: #fff !important;
}
.aiwt-card-blob {
  position: absolute; top: -46px; right: -34px; width: 132px; height: 132px;
  border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none;
}
.aiwt-card-format {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.20); border-radius: 6px; padding: 5px 10px;
  backdrop-filter: blur(2px);
}
.aiwt-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 14px;
  background: rgba(255,255,255,.18); font-size: 21px; line-height: 1; position: relative; z-index: 1;
}
.aiwt-card-headtext { position: relative; z-index: 1; display: block; }
.aiwt-card-cat {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.1px;
  text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 5px;
}
.aiwt-card-title {
  display: block; font-size: 18.5px; font-weight: 800; line-height: 1.3; color: #fff;
}
.aiwt-card-head:hover .aiwt-card-title { text-decoration: underline; text-underline-offset: 3px; }

/* Body */
.aiwt-card-body { padding: 20px 22px 18px; flex: 1; }
.aiwt-card-badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: #7A5C05; background: #FFF3D0;
  border-radius: 20px; padding: 4px 11px; margin-bottom: 10px;
}
.aiwt-card-desc { font-size: 14.5px; line-height: 1.65; color: #4A4F63; margin: 0 0 14px; }
.aiwt-card-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.aiwt-chip-sm {
  font-size: 12px; font-weight: 600; color: #3B4260; background: #F2F4FB;
  border: 1px solid #E4E8F5; border-radius: 20px; padding: 5px 12px; line-height: 1.35;
}

/* Footer bar */
.aiwt-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; background: #F7F8FD; border-top: 1px solid #EDEFF7;
}
.aiwt-card-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.aiwt-stat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: #6C7189; white-space: nowrap; line-height: 1.4;
}
.aiwt-stat-ico { font-size: 12.5px; line-height: 1; opacity: .8; }
.aiwt-card-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: #fff !important; text-decoration: none !important;
  background: var(--aiwt-brand); border-radius: 8px; padding: 12px 18px;
  transition: background .18s ease, transform .15s ease;
}
.aiwt-card-btn:hover { background: #141A45; transform: translateY(-1px); }

/* Old tag pills, still used on the single page */
.aiwt-tag {
  font-size: 11.5px; font-weight: 600; color: #5A5F73; background: #F4F6FD;
  border: 1px solid #E7EAF5; border-radius: 6px; padding: 4px 9px; text-decoration: none;
}
a.aiwt-tag:hover { background: #EEF0FB; color: var(--aiwt-brand); }

/* Single-page stat row */
.aiwt-single-stats { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0 0 22px; }
.aiwt-single-stats .aiwt-stat { font-size: 13.5px; color: #5A5F73; }

.aiwt-noresults, .aiwt-empty { text-align: center; color: #6C7189; padding: 40px 0; font-size: 15px; }

/* ---------- Single download page ---------- */
.aiwt-single { padding-top: 30px; padding-bottom: 60px; }
.aiwt-breadcrumb { font-size: 13px; color: #8A8FA0; margin-bottom: 22px; }
.aiwt-breadcrumb a { color: #5A5F73; text-decoration: none; }
.aiwt-breadcrumb a:hover { text-decoration: underline; }
.aiwt-breadcrumb span { margin: 0 6px; }

.aiwt-single-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; }

.aiwt-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--aiwt-brand); background: #EEF0FB;
  border-radius: 20px; padding: 6px 15px; margin-bottom: 14px;
}
.aiwt-single-title {
  font-size: 38px; font-weight: 800; color: var(--aiwt-brand);
  line-height: 1.2; letter-spacing: -.6px; margin: 0 0 12px;
}
.aiwt-single-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: #7A5C05; background: #FFF3D0;
  border-radius: 20px; padding: 5px 13px; margin-bottom: 14px;
}
.aiwt-single-sub { font-size: 17px; line-height: 1.7; color: #4A4F63; margin: 0 0 24px; }
.aiwt-single-content { font-size: 15.5px; line-height: 1.8; color: #3D4155; margin-bottom: 24px; }

.aiwt-inside { background: #F7F8FD; border: 1px solid #E7EAF5; border-radius: 12px; padding: 22px; margin-bottom: 26px; }
.aiwt-inside-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--aiwt-brand); margin-bottom: 14px;
}
.aiwt-inside-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.aiwt-inside-chip {
  font-size: 13.5px; font-weight: 600; color: #33395C; background: #fff;
  border: 1px solid #E1E5F2; border-radius: 8px; padding: 9px 14px; line-height: 1.35;
}
.aiwt-single-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aiwt-single-tags-label { font-size: 13px; font-weight: 700; color: #6C7189; margin-right: 2px; }

/* ---------- Form ---------- */
.aiwt-formwrap {
  background: #fff; border: 1px solid #E4E8F0; border-radius: 16px; padding: 30px 28px;
  box-shadow: 0 8px 30px rgba(30,39,97,.08); position: sticky; top: 30px;
}
.aiwt-form-heading { font-size: 20px; font-weight: 800; color: var(--aiwt-brand); margin: 0 0 18px; line-height: 1.35; }
.aiwt-field { margin-bottom: 15px; }
.aiwt-field label {
  display: block; font-size: 13px; font-weight: 700; color: #33395C; margin-bottom: 6px;
}
.aiwt-req { color: #C0392B; }
.aiwt-field input {
  width: 100%; padding: 13px 15px; font-size: 15px; font-family: inherit;
  border: 1.5px solid #E1E5F2; border-radius: 9px; background: #fff; color: #2B2F45;
  transition: border-color .15s ease;
}
.aiwt-field input:focus { outline: none; border-color: var(--aiwt-brand); box-shadow: 0 0 0 3px rgba(30,39,97,.08); }
.aiwt-field input.aiwt-invalid { border-color: #C0392B; }

.aiwt-submit {
  width: 100%; margin-top: 6px; padding: 16px 20px; font-size: 16px; font-weight: 700;
  font-family: inherit; color: #fff; background: var(--aiwt-brand);
  border: none; border-radius: 9px; cursor: pointer;
  transition: background .18s ease, transform .15s ease;
}
.aiwt-submit:hover:not(:disabled) { background: #141A45; transform: translateY(-1px); }
.aiwt-submit:disabled { opacity: .65; cursor: not-allowed; }
.aiwt-form-note { font-size: 12.5px; color: #8A8FA0; margin: 12px 0 0; line-height: 1.6; text-align: center; }

.aiwt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.aiwt-msg { padding: 12px 15px; border-radius: 9px; font-size: 14px; margin-bottom: 16px; line-height: 1.6; }
.aiwt-msg-error { background: #FCF0EF; color: #8E2F2F; border: 1px solid #F0D2D0; }

.aiwt-success { text-align: center; }
.aiwt-success-head { font-size: 20px; font-weight: 800; color: #1B7A3E; margin: 0 0 8px; }
.aiwt-success-sub { font-size: 14.5px; color: #4A4F63; line-height: 1.7; margin: 0 0 18px; }
.aiwt-success-link {
  display: inline-block; font-size: 15px; font-weight: 700; color: #fff !important;
  background: var(--aiwt-brand); border-radius: 9px; padding: 14px 26px; text-decoration: none !important;
}
.aiwt-success-link:hover { background: #141A45; }
.aiwt-success-html { margin-top: 22px; text-align: left; }

/* ---------- Custom HTML + related ---------- */
.aiwt-custom-html { margin-top: 48px; }
.aiwt-related { margin-top: 56px; }
.aiwt-related-title { font-size: 24px; font-weight: 800; color: var(--aiwt-brand); margin: 0 0 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .aiwt-cols-4 { grid-template-columns: repeat(3, 1fr); }
  .aiwt-single-grid { grid-template-columns: 1fr; gap: 32px; }
  .aiwt-formwrap { position: static; }
}
@media (max-width: 820px) {
  .aiwt-cols-3, .aiwt-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .aiwt-cols-2, .aiwt-cols-3, .aiwt-cols-4 { grid-template-columns: 1fr; }
  .aiwt-card-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .aiwt-card-btn { justify-content: center; }
  .aiwt-card-stats { justify-content: flex-start; }
  .aiwt-sectionhead-title { font-size: 21px; }
  .aiwt-card-head { min-height: 0; }
  .aiwt-sectionhead-rule { display: none; }
  .aiwt-single-title { font-size: 27px; }
  .aiwt-single-sub { font-size: 15.5px; }
  .aiwt-formwrap { padding: 24px 20px; }
  .aiwt-related-title { font-size: 20px; }
}
