/**
 * Palette Lab — Gradient Tab Styles
 * css/gradient.css
 *
 * Implements the dedicated Gradient view per DESIGN.md and SPEC.md:
 * - Generous full-bleed gradient band as the star of the page
 * - Orientation row with 8 arrows + radial + conic circle buttons
 * - Steps and Blend ghost pill toggles
 * - Monospace CSS code block with teal COPY CSS & ghost COPY OKLCH pills
 * - Gradient Stops row below the band with square swatches & hairline divider
 * - "Gradient Ideas" section: 8 wide rounded (4px) gradient bars ~110px tall,
 *   title above, small teal COPY CSS pill under each, same rhythm as palettes page
 * - Full responsiveness on mobile (<640px): no horizontal overflow at 360/390px
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   Root View & Full-Bleed Reset
   ========================================================================== */

.app-main:has(.gradient-view) {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.gradient-view {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  background-color: #ffffff;
  color: #1b1b1b;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 100px 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. Gradient Hero Band (Star of the Page)
   ========================================================================== */

.gradient-hero-section {
  width: 100%;
  box-sizing: border-box;
}

.gradient-hero-band {
  width: 100%;
  margin-top: -1px;
  padding: 88px 24px 96px 24px;
  min-height: 480px;
  box-sizing: border-box;
  transition: background-image 0.25s ease;
  background-size: cover;
  background-position: center;
}

@media (max-width: 640px) {
  .gradient-hero-band {
    padding: 48px 16px 56px 16px;
    min-height: auto;
  }
}

.gradient-hero-content {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gradient-hero-headline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 44px;
  color: #ffffff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
  margin: 0 0 28px 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (max-width: 640px) {
  .gradient-hero-headline {
    font-size: 26px;
    margin-bottom: 20px;
  }
}

/* Orientation controls (8 arrows + 1 radial + 1 conic in a row) */
.gradient-control-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gradient-orientation-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
  max-width: 100%;
}

.gradient-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.gradient-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.gradient-arrow-btn.is-active {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 2px #ffffff;
}

/* Toggles row (Steps & Blend) */
.gradient-toggles-row {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.gradient-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.gradient-pill-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  margin-right: 4px;
}

.gradient-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.gradient-ghost-pill {
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 999px;
  height: 32px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gradient-ghost-pill:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.85);
}

.gradient-ghost-pill.is-active {
  background: #ffffff;
  color: #1b1b1b;
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* CSS Code box */
.gradient-code-label {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 740px;
  text-align: left;
}

.gradient-code-box {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.12);
  border-left: 3px solid #ffffff;
  border-radius: 0 8px 8px 0;
  padding: 18px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: block;
  box-sizing: border-box;
  text-align: left;
}

@media (max-width: 640px) {
  .gradient-code-box {
    padding: 14px;
  }
}

.gradient-code-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #ffffff;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  display: block;
}

.gradient-code-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.gradient-copy-pill {
  background-color: #00c9a7;
  color: #ffffff;
  border-radius: 999px;
  height: 44px;
  padding: 0 28px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gradient-copy-pill:hover {
  background-color: #00a383;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.gradient-copy-pill:active {
  transform: translateY(0);
}

.gradient-copy-pill-ghost {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.85);
  color: #ffffff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gradient-copy-pill-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #ffffff;
}

/* ==========================================================================
   2. Stops Area (below band in white area style)
   ========================================================================== */

.gradient-stops-area {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 20px 0 20px;
  box-sizing: border-box;
  text-align: center;
}

.gradient-section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #1b1b1b;
  margin: 0 0 24px 0;
  letter-spacing: -0.01em;
  text-align: center;
}

.gradient-swatches-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.gradient-hairline {
  width: 100%;
  max-width: 920px;
  height: 1px;
  background-color: #eeeeee;
  margin: 44px auto 44px auto;
}

/* ==========================================================================
   3. Gradient Ideas Section
   ========================================================================== */

.gradient-ideas-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px 80px 20px;
  box-sizing: border-box;
  text-align: center;
}

.gradient-ideas-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: #1b1b1b;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
  text-align: center;
}

.gradient-ideas-subline {
  font-size: 13px;
  font-weight: 500;
  color: #888888;
  margin: 0 0 40px 0;
  letter-spacing: 0.02em;
  text-align: center;
}

.gradient-ideas-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gradient-idea-entry {
  padding: 0;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gradient-idea-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #1b1b1b;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Wide rounded 4px gradient bar ~110px tall */
.gradient-idea-bar {
  width: 100%;
  max-width: 860px;
  height: 110px;
  border-radius: var(--radius-swatch); /* 4px */
  margin: 0 auto 16px auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-size: cover;
  background-position: center;
}

.gradient-idea-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.gradient-idea-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
}

.gradient-idea-copy-btn {
  background-color: #00c9a7;
  color: #ffffff;
  border-radius: 999px;
  height: 36px;
  padding: 0 24px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gradient-idea-copy-btn:hover {
  background-color: #00a383;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

.gradient-idea-copy-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   4. Mobile Responsiveness (< 640px)
   ========================================================================== */

@media (max-width: 640px) {
  .gradient-orientation-row {
    gap: 4px;
    margin-bottom: 20px;
  }

  .gradient-arrow-btn {
    width: 32px;
    height: 32px;
  }

  .gradient-stops-area {
    padding: 32px 14px 0 14px;
  }

  .gradient-ideas-section {
    padding: 12px 14px 60px 14px;
  }

  .gradient-section-title,
  .gradient-ideas-heading {
    text-align: left;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 16px auto;
    font-size: 19px;
  }

  .gradient-ideas-subline {
    text-align: left;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 24px auto;
  }

  /* Stops swatches stack vertically as wide bars on phone (same as palettes) */
  .gradient-swatches-row {
    flex-direction: column;
    align-items: flex-start;
    max-width: 340px;
    margin: 0 auto;
    gap: 5px;
  }

  .gradient-idea-entry {
    width: 100%;
  }

  .gradient-idea-title {
    text-align: left;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 12px auto;
    font-size: 17px;
  }

  .gradient-idea-bar {
    max-width: 340px;
    height: 88px;
    margin: 0 auto 14px auto;
  }

  .gradient-idea-actions {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    justify-content: flex-start;
  }

  .gradient-hairline {
    margin: 32px auto;
  }
}
