﻿@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");
@import url("./dashboard-shared.css");

:root {
  color-scheme: light;
  --ink: #101b2d;
  --muted: #58595B;
  --soft: #f7fafd;
  --soft-blue: #e0f4ff;
  --blue: #17479E;
  --navy: #061325;
  --line: #dce7ef;
  --white: #ffffff;
  --green: #16a06b;
  --amber: #F68A46;
  --red: #ED1C24;
  --shadow: 0 18px 42px rgba(16, 27, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--soft);
  color: var(--ink);
  font-family: "Gotham", "Montserrat", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sidebar, brand, nav, support-panel → dashboard-shared.css */

.dashboard {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.topbar span {
  display: block;
  max-width: 700px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.top-actions {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.primary-button,
.ghost-button,
.primary-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}

.primary-button,
.primary-action {
  border: 0;
  background: var(--blue);
  color: var(--white);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.creation-shell {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.step span {
  display: inline-block;
  text-align: center;
  width: 20px;
  height: 20px;
  line-height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: #edf5fa;
  color: var(--blue);
  font-size: 10px;
}

.step.complete {
  border-color: #bee6d8;
  background: #f3fbf7;
  color: var(--green);
}

.step.complete span {
  background: var(--green);
  color: var(--white);
}

.step.active {
  border-color: var(--blue);
  background: #f3fbff;
  color: var(--ink);
}

.step.active span {
  background: var(--blue);
  color: var(--white);
}

.selected-channel-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.selected-channel-card h2 {
  margin: 2px 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.selected-channel-card span:not(.channel-avatar) {
  color: var(--muted);
  font-size: 13px;
}

.selected-channel-card a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--blue);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.creation-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.65fr) minmax(520px, 1.35fr);
  gap: 22px;
}

.left-config-column, .creation-grid > .setup-card { order: 2; }

.right-sidebar-column,
.context-card,
.summary-card {
  order: 1;
}

.setup-card,
.context-card,
.budget-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.setup-card,
.context-card,
.budget-panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-header h2,
.context-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.safe-pill {
  min-height: 30px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.ads-logo {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.ads-logo::before,
.ads-logo::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 7px;
  height: 16px;
  border-radius: 999px;
  transform-origin: bottom center;
}

.ads-logo::before {
  left: 4px;
  background: #1a73e8;
  transform: rotate(30deg);
}

.ads-logo::after {
  right: 4px;
  background: #fbbc04;
  transform: rotate(-30deg);
}

.ads-logo {
  background:
    radial-gradient(circle at 4px 14px, #34a853 0 4px, transparent 4px);
}

label {
  display: block;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  padding: 0 14px;
  background: #fafcfe;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

input:focus,
select:focus {
  border-color: #9fdcf7;
  box-shadow: 0 0 0 4px rgba(23, 71, 158, 0.06);
}

.url-field {
  margin-top: 26px;
}

.primary-action {
  width: 100%;
  margin-top: 18px;
}

.video-result {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #bfeaff;
  border-radius: 14px;
  background: #f3fbff;
}

.video-result[hidden],
.budget-panel[hidden] {
  display: none;
}

.youtube-thumb {
  position: relative;
  min-height: 124px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(23, 71, 158, 0.22), transparent 55%),
    var(--soft-blue);
}

.youtube-thumb::before {
  content: "";
  position: absolute;
  inset: auto 14px 14px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.youtube-thumb::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  height: 24px;
  border-radius: 6px;
  background: rgba(6, 19, 37, 0.12);
}

.youtube-thumb span {
  position: absolute;
  left: 94px;
  top: 48px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid var(--blue);
}

.video-meta h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.video-meta dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}

.video-meta dt,
.campaign-mini dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-meta dd,
.campaign-mini dd {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.context-card ul {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.context-card li {
  padding-left: 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
  position: relative;
}

.context-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.targeting-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(420px, 1.25fr);
  gap: 18px;
  margin-top: 24px;
}

.budget-card,
.targeting-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.budget-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.budget-chips button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #eef5fa;
  color: #48566b;
  font-size: 14px;
  font-weight: 600;
}

.budget-chips button.active {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: var(--blue);
}

.estimate-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: var(--soft-blue);
}

.estimate-box span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.estimate-box strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 26px;
}

.estimate-box small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.review-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--white);
}

.review-strip .primary-button {
  flex: 0 0 auto;
  width: max-content;
  white-space: nowrap;
  padding-left: 24px;
  padding-right: 24px;
}

.review-strip p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.review-strip span {
  display: block;
  margin-top: 6px;
  color: #a9b8c9;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .creation-grid,
  .targeting-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .panel-header,
  .review-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .review-strip .primary-button {
    width: 100%;
  }

  .stepper,
  .selected-channel-card,
  .video-result,
  .video-meta dl,
  .field-grid,
  .budget-chips {
    grid-template-columns: 1fr;
  }

  .selected-channel-card {
    justify-items: start;
  }

  .selected-channel-card a {
    width: 100%;
  }

  .youtube-thumb {
    min-height: 180px;
  }
}

/* --- Campaign Type Selector Screen --- */
.type-selection-screen {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin: 10px auto 40px;
  max-width: 900px;
}

.type-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.type-desc {
  font-size: 14px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.type-card {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 30px 24px;
  cursor: pointer;
  background: #fff;
  transition: all 0.24s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.type-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(23, 71, 158, 0.08);
}

.type-card.active {
  border-color: var(--blue);
  background: rgba(23, 71, 158, 0.02);
}

.card-icon {
  font-size: 44px;
  margin-bottom: 16px;
}

.type-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.type-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.type-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(23, 71, 158, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.type-badge.special {
  color: var(--amber);
  background: rgba(246, 138, 70, 0.08);
}

.type-select-btn {
  border: 0;
  background: var(--soft-blue);
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 999px;
  transition: all 0.2s ease;
  width: 100%;
}

.type-card:hover .type-select-btn,
.type-card.active .type-select-btn {
  background: var(--blue);
  color: #fff;
}

/* --- Multi-video Channel Promotion Picker --- */
.picker-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.tab-btn {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(23, 71, 158, 0.05);
  color: var(--ink);
}

.tab-btn.active {
  background: var(--blue);
  color: #fff;
}

.tab-instruction {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}

.video-picker-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px;
  gap: 16px;
}

.video-picker-card:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(16, 27, 45, 0.05);
}

.video-picker-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
}

.video-picker-thumb {
  width: 160px;
  flex: 0 0 160px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.video-picker-thumb .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.checkbox-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,0.3);
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.video-picker-card.selected .checkbox-indicator {
  background: var(--blue);
  border-color: var(--blue);
}

.video-picker-card.selected .checkbox-indicator::before {
  content: "\2713";
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.video-picker-info {
  flex-grow: 1;
  padding-right: 10px;
}

.video-picker-info h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.video-picker-info small {
  font-size: 11px;
  color: var(--muted);
}

/* Recommended tags inside best videos */
.recommend-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Paste URL Input fields */
.url-paste-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

.url-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--soft-blue);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.paste-url-input {
  flex-grow: 1;
  min-height: 44px;
}

/* Bottom Sticky Selection Counter Footer */
.picker-footer {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selection-counter {
  font-size: 13px;
  color: var(--muted);
}

.selection-counter strong {
  color: var(--blue);
  font-size: 16px;
}

@media (max-width: 768px) {
  .type-grid {
    grid-template-columns: 1fr;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }

  .picker-tabs {
    flex-wrap: wrap;
  }

  .picker-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    text-align: center;
  }
}

/* Force logo to top-left on flow focus */
body.flow-focus .global-header {
  justify-content: space-between !important;
}

/* --- Minimal Hero Layout --- */
.minimal-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 120px);
  text-align: center;
  padding: 0 20px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #09090b 0%, #52525b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

@keyframes text-gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.dynamic-text-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  overflow: visible;
}

@keyframes text-gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Typing Animation Cursor */
.type-cursor {
  border-right: 3px solid var(--blue);
  padding-right: 4px;
  animation: text-gradient-shift 4s linear infinite, blink-cursor 1.1s step-end infinite;
}

@keyframes blink-cursor {
  from, to { border-color: transparent }
  50% { border-color: var(--blue) }
}

.glow-text {
  display: inline-block;
  color: transparent;
  background-image: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899, #2563eb);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-gradient-shift 4s linear infinite;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero-input-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 8px 8px 8px 24px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-input-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 10px 30px rgba(23, 71, 158, 0.15);
}

.hero-input-box input {
  flex: 1;
  border: none;
  font-size: 16px;
  outline: none;
  color: var(--ink);
  background: transparent;
  min-height: auto;
}

.hero-input-box input:focus {
  box-shadow: none;
}

.hero-primary-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 40px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.hero-primary-btn:hover {
  background: #11367a;
}

/* --- Setup Timeline Stepper --- */
.setup-timeline {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--line);
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.timeline-step.active {
  opacity: 1;
}

.step-circle {
  display: inline-block;
  text-align: center;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.timeline-step.active .step-circle {
  background: var(--blue);
  color: var(--white);
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.timeline-divider {
  width: 40px;
  height: 2px;
  background: var(--line);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 40px;
  }
  .dynamic-text-wrapper {
    min-width: 180px;
  }
  .hero-input-box {
    flex-direction: column;
    border-radius: 20px;
    padding: 16px;
    gap: 16px;
  }
  .hero-input-box input {
    width: 100%;
    text-align: center;
  }
  .hero-primary-btn {
    width: 100%;
  }
  .setup-timeline {
    display: none;
  }
}






.topbar:has(.setup-timeline) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
}
.topbar:has(.setup-timeline) .top-actions {
  justify-self: end;
}











/* Dark mode / blend adjustments */
.hero-title {
  position: relative;
  z-index: 2;
}

/* Enhancing the spotlight effect */
.minimal-hero-container:hover::after {
  opacity: 1;
}













