/**
 * public/css/tools/design-tools-shared.css
 * Premium shared styles for ALL design tool pages — v2
 * Theme tokens from style.css:
 *   --primary #1E88E5   --primary-dark #1565C0  --primary-light #E3F2FD
 *   --bg #F8F9FA        --surface #FFF           --border #E2E8F0
 *   --text-primary #1A1F2E  --text-secondary #5A6478  --text-muted #9AA3B2
 *   --radius-sm 8px     --radius-md 12px         --radius-lg 20px
 *   --shadow-sm/md/lg   --transition
 */

/* ================================================================
   ICON VARIANTS
================================================================ */
.tc-icon--violet { background: #F5F3FF; color: #7C3AED; }

/* ================================================================
   TOOL HERO — premium compact variant
================================================================ */
.tool-hero-simple {
  border-bottom: 1px solid var(--border);
  padding: 32px 0 28px;
  position: relative;
  overflow: hidden;
}
.tool-hero-simple::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 50%, rgba(255,255,255,.6) 0%, transparent 60%);
  pointer-events: none;
}

.ths-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* Breadcrumb */
.ths-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-wrap: wrap;
  letter-spacing: .02em;
}
.ths-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.ths-breadcrumb a:hover { color: var(--primary); }
.ths-breadcrumb svg { color: #d1d5db; flex-shrink: 0; }
.ths-breadcrumb span { color: var(--text-secondary); }

/* Content row: icon + text */
.ths-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* Tool icon chip */
.ths-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.07);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.ths-icon:hover {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.ths-icon--blue   { background: #EFF6FF; color: #1E88E5; }
.ths-icon--teal   { background: #F0FDF9; color: #0D9488; }
.ths-icon--indigo { background: #EEF2FF; color: #6366F1; }
.ths-icon--green  { background: #F0FDF4; color: #16A34A; }
.ths-icon--orange { background: #FFF7ED; color: #F97316; }
.ths-icon--violet { background: #F5F3FF; color: #7C3AED; }
.ths-icon--pink   { background: #FDF2F8; color: #DB2777; }
.ths-icon--purple { background: #FAF5FF; color: #8E24AA; }

.ths-text h1 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -.02em;
}
.ths-text p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  max-width: 620px;
}

/* ================================================================
   TOOL BODY SECTION
================================================================ */
.design-tool-section {
  padding: 36px 0 56px;
  background: var(--bg);
}

.design-tool-card {
  background: var(--surface);
  border: 1px solid rgba(226,232,240,.8);
  border-radius: 20px;
  padding: 32px;
  box-shadow:
    0 1px 3px rgba(0,0,0,.04),
    0 4px 16px rgba(0,0,0,.06),
    0 16px 48px rgba(0,0,0,.04);
  margin-bottom: 32px;
  transition: box-shadow .25s;
}

/* ================================================================
   SHARED INPUTS & COPY UTILITIES
================================================================ */
.cp-code-lbl {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.cp-code-val {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace;
  font-size: .87rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.cp-code-val:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,136,229,.12);
}

.cp-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 600;
  transition: border-color .15s, color .15s, background .15s, transform .1s;
  flex-shrink: 0;
  min-height: 40px;
}
.cp-copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.cp-copy-btn:active { transform: scale(.96); }
.cp-copy-btn.copied {
  border-color: #22c55e;
  color: #15803d;
  background: #f0fdf4;
}

.cp-color-name {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cp-color-lum {
  display: block;
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Native color input */
.pg-native-picker {
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 3px;
  background: none;
  transition: border-color .15s, transform .1s;
}
.pg-native-picker:hover {
  border-color: var(--primary);
  transform: scale(1.04);
}

.pg-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ================================================================
   BUTTON VARIANTS
================================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(30,136,229,.3), 0 1px 2px rgba(0,0,0,.1);
  min-height: 42px;
}
.btn-primary:hover {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,136,229,.35), 0 2px 6px rgba(0,0,0,.12);
}
.btn-primary:active { transform: scale(.97) translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, color .15s;
  min-height: 42px;
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: #94a3b8;
  color: var(--text-primary);
  transform: translateY(-1px);
}
.btn-secondary:active { transform: scale(.97); }

/* ================================================================
   RELATED TOOLS STRIP
================================================================ */
.design-related { margin-top: 40px; }
.design-related-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8rem;
  color: var(--text-muted);
}

/* Tool cards (tc) enhancement */
.tc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  transition:
    transform .2s cubic-bezier(.34,1.56,.64,1),
    box-shadow .2s,
    border-color .15s;
  position: relative;
  overflow: hidden;
}
.tc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 50%, rgba(255,255,255,.4) 100%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.tc:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  border-color: #cbd5e1;
}
.tc:hover::after { opacity: 1; }
.tc:active { transform: scale(.98) translateY(0); }

.tc-body h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px;
  transition: color .15s;
}
.tc:hover .tc-body h3 { color: var(--primary); }
.tc-body p {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.tc-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), color .15s;
}
.tc:hover .tc-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ================================================================
   SEO / HOW-TO SECTION
================================================================ */
.design-seo-section {
  padding: 56px 0 68px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.design-seo-inner {
  max-width: 900px;
  margin: 0 auto;
}

.design-seo-inner > h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 36px;
  color: var(--text-primary);
  letter-spacing: -.02em;
}

.design-seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.design-seo-step {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 24px 22px;
  position: relative;
  transition: transform .2s, box-shadow .2s, border-color .15s;
}
.design-seo-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
  border-color: #cbd5e1;
}

.design-seo-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(30,136,229,.3);
}

.design-seo-step h3 {
  font-size: .97rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.design-seo-step p {
  font-size: .85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.design-seo-text p {
  font-size: .9rem;
  line-height: 1.85;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
}
.design-seo-text code {
  font-family: 'Courier New', Courier, monospace;
  font-size: .82em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--primary);
}

/* ================================================================
   RESPONSIVE — shared layout
================================================================ */
@media (max-width: 900px) {
  .design-seo-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 600px) {
  .tool-hero-simple { padding: 22px 0 20px; }
  .ths-content { flex-direction: column; gap: 14px; }
  .ths-icon { width: 48px; height: 48px; }
  .ths-text h1 { font-size: 1.35rem; }
  .design-tool-section { padding: 24px 0 40px; }
  .design-tool-card { padding: 22px 18px; border-radius: 16px; }
  .design-seo-section { padding: 40px 0 48px; }
  .design-seo-grid { grid-template-columns: 1fr; gap: 12px; }
  .design-seo-inner > h2 { margin-bottom: 24px; }
  .btn-primary, .btn-secondary { min-height: 48px; padding: 12px 20px; font-size: .9rem; }
}

@media (max-width: 380px) {
  .ths-text h1 { font-size: 1.2rem; }
  .design-tool-card { padding: 18px 14px; }
}
