/* Artist AMP Marketing Hub - Smartlinks + Fan Capture */

:root {
  --amp-black: #0A0A0A;
  --amp-washed-black: #161616;
  --amp-bone: #F3F0E8;
  --amp-stone: #B7AEA1;
  --amp-orange: #F16623;
  --amp-orange-soft: #FF8A50;
  --amp-border: rgba(243, 240, 232, 0.14);
  --amp-shadow: rgba(0, 0, 0, 0.22);
}

.marketing-hub {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--amp-bone);
}

.marketing-hero {
  background:
    radial-gradient(circle at top right, rgba(241, 102, 35, 0.18), transparent 34%),
    linear-gradient(135deg, var(--amp-black), var(--amp-washed-black));
  color: var(--amp-bone);
  border: 1px solid var(--amp-border);
  border-radius: 18px;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  box-shadow: 0 14px 34px var(--amp-shadow);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--amp-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 900;
}

.marketing-hero h1,
.marketing-panel h2 {
  margin: 0;
}

.marketing-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--amp-bone);
}

.hero-copy {
  margin: 0.85rem 0 0;
  max-width: 760px;
  color: rgba(243, 240, 232, 0.78);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.local {
  background: var(--amp-orange);
  color: #fff;
}

.status-pill.muted {
  background: rgba(243, 240, 232, 0.1);
  color: rgba(243, 240, 232, 0.78);
  border: 1px solid rgba(243, 240, 232, 0.14);
}

.marketing-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.overview-card,
.marketing-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    var(--amp-washed-black);
  border: 1px solid var(--amp-border);
  border-radius: 16px;
  box-shadow: 0 12px 28px var(--amp-shadow);
}

.overview-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amp-orange), var(--amp-orange-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}

.card-content h3 {
  margin: 0 0 0.2rem;
  color: var(--amp-bone);
  font-size: 1.75rem;
  font-weight: 900;
}

.card-content p {
  margin: 0;
  color: var(--amp-stone);
  font-size: 0.9rem;
}

.marketing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1.5rem;
}

.marketing-panel {
  padding: 1.35rem;
}

.primary-panel {
  min-height: 360px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.panel-header.compact {
  margin-bottom: 1rem;
}

.panel-header h2 {
  color: var(--amp-bone);
  font-size: 1.35rem;
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--amp-orange), var(--amp-orange-soft));
  color: #fff;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(241, 102, 35, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-primary:focus-visible,
.btn-mini:focus-visible,
.copy-smartlink-btn:focus-visible,
.modal-close:focus-visible,
.smartlink-path:focus-visible {
  outline: 3px solid var(--amp-orange-soft);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.manager-message {
  margin: -0.5rem 0 1rem;
  color: var(--amp-stone);
  font-size: 0.86rem;
}

.manager-message.error {
  color: #fecaca;
}

.empty-state {
  border: 1px dashed rgba(243, 240, 232, 0.2);
  background: rgba(10, 10, 10, 0.42);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.empty-state h3 {
  margin: 0 0 0.5rem;
  color: var(--amp-bone);
}

.empty-state p {
  margin: 0 auto;
  color: var(--amp-stone);
  max-width: 560px;
  line-height: 1.55;
}

.smartlink-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.smartlink-item {
  border: 1px solid var(--amp-border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(10, 10, 10, 0.35);
}

.smartlink-cover {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--amp-border);
  border-radius: 14px;
  background: var(--amp-black);
}

.smartlink-cover.placeholder {
  display: grid;
  place-items: center;
  color: var(--amp-stone);
  font-size: 1.5rem;
}

.smartlink-item h3 {
  margin: 0 0 0.25rem;
  color: var(--amp-bone);
}

.smartlink-item p,
.smartlink-meta {
  color: var(--amp-stone);
  font-size: 0.9rem;
}

.smartlink-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.capture-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flow-step {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(10, 10, 10, 0.36);
  border: 1px solid var(--amp-border);
}

.flow-step span,
.roadmap-item span {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--amp-black);
  color: var(--amp-bone);
  border: 1px solid rgba(243, 240, 232, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.82rem;
}

.flow-step.active span,
.roadmap-item.active span,
.roadmap-item.done span {
  background: var(--amp-orange);
  color: #fff;
  border-color: var(--amp-orange);
}

.flow-step strong {
  color: var(--amp-bone);
}

.flow-step p {
  margin: 0.25rem 0 0;
  color: var(--amp-stone);
  line-height: 1.45;
  font-size: 0.92rem;
}

.roadmap-list {
  display: grid;
  gap: 0.75rem;
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--amp-border);
  background: rgba(10, 10, 10, 0.36);
  border-radius: 14px;
}

.roadmap-item p {
  margin: 0;
  color: var(--amp-stone);
  line-height: 1.5;
}

.marketing-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: 420px;
  background: var(--amp-black);
  color: var(--amp-bone);
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--amp-border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
  z-index: 9999;
}

.marketing-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.marketing-toast.info {
  border-left: 4px solid var(--amp-orange);
}

@media (max-width: 1100px) {
  .marketing-overview,
  .marketing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .marketing-hero,
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .marketing-overview {
    grid-template-columns: 1fr;
  }

  .hero-status {
    justify-content: flex-start;
  }
}

/* Smartlink Release Picker Modal */
body.modal-open {
  overflow: hidden;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 1.25rem;
}

.smartlink-modal {
  width: min(860px, 100%);
  max-height: 88vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(241, 102, 35, 0.12), transparent 34%),
    var(--amp-washed-black);
  border: 1px solid var(--amp-border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  color: var(--amp-bone);
}

.smartlink-modal-header {
  padding: 1.25rem 1.35rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--amp-border);
}

.smartlink-modal-header h2 {
  margin: 0;
  color: var(--amp-bone);
}

.modal-close {
  background: rgba(243, 240, 232, 0.08);
  color: var(--amp-bone);
  border: 1px solid var(--amp-border);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.smartlink-modal-body {
  padding: 1.35rem;
  overflow: auto;
  max-height: calc(88vh - 95px);
}

.modal-help,
.release-picker-message {
  color: var(--amp-stone);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.release-picker-list {
  display: grid;
  gap: 0.85rem;
}

.release-picker-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--amp-border);
  border-radius: 16px;
  background: rgba(10, 10, 10, 0.34);
}

.release-picker-cover {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--amp-black);
  border: 1px solid var(--amp-border);
}

.release-picker-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amp-stone);
  font-size: 1.4rem;
}

.release-picker-info h3 {
  margin: 0 0 0.25rem;
  color: var(--amp-bone);
}

.release-picker-info p {
  margin: 0;
  color: var(--amp-stone);
  font-size: 0.92rem;
}

.release-picker-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.release-picker-tags span {
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  background: rgba(243, 240, 232, 0.08);
  border: 1px solid rgba(243, 240, 232, 0.12);
  color: var(--amp-stone);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: capitalize;
}

.release-picker-tags span.ready {
  background: rgba(241, 102, 35, 0.14);
  border-color: rgba(241, 102, 35, 0.4);
  color: var(--amp-bone);
}

.release-picker-tags span.missing {
  background: rgba(185, 28, 28, 0.18);
  border-color: rgba(248, 113, 113, 0.34);
  color: #fecaca;
}

.release-create-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.smartlink-main {
  min-width: 0;
  flex: 1;
}

.smartlink-path {
  margin-top: 0.45rem;
  color: var(--amp-orange);
  font-size: 0.86rem;
  word-break: break-all;
}

.marketing-toast.error {
  border-left: 4px solid #ef4444;
}

@media (max-width: 720px) {
  .release-picker-item {
    grid-template-columns: 56px 1fr;
  }

  .release-picker-cover {
    width: 56px;
    height: 56px;
  }

  .release-create-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

/* Full clickable smartlink URL */
.smartlink-url-row {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.smartlink-path {
  color: var(--amp-orange);
  font-size: 0.88rem;
  word-break: break-all;
  text-decoration: none;
  border-bottom: 1px solid rgba(241, 102, 35, 0.4);
}

.smartlink-path:hover {
  color: var(--amp-orange-soft);
  border-bottom-color: var(--amp-orange-soft);
}

.copy-smartlink-btn {
  border: 1px solid rgba(243, 240, 232, 0.16);
  background: rgba(243, 240, 232, 0.08);
  color: var(--amp-bone);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.copy-smartlink-btn:hover {
  border-color: rgba(241, 102, 35, 0.55);
  color: #fff;
}

/* Smartlink Editor */
.smartlink-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.smartlink-editor-modal {
  width: min(980px, 100%);
}

.editor-grid {
  display: grid;
  gap: 1.25rem;
}

.editor-section {
  border: 1px solid var(--amp-border);
  background: rgba(10, 10, 10, 0.36);
  border-radius: 18px;
  padding: 1rem;
}

.editor-section-header {
  margin-bottom: 1rem;
}

.editor-section-header h3 {
  margin: 0 0 0.3rem;
  color: var(--amp-bone);
}

.editor-section-header p {
  margin: 0;
  color: var(--amp-stone);
  font-size: 0.9rem;
  line-height: 1.45;
}

.editor-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.editor-field label,
.editor-toggle,
.editor-active-check {
  color: var(--amp-bone);
  font-size: 0.86rem;
  font-weight: 800;
}

.editor-field input,
.editor-field select,
.add-link-grid input,
.add-link-grid select,
.editor-link-fields input {
  width: 100%;
  background: rgba(10, 10, 10, 0.68);
  color: var(--amp-bone);
  border: 1px solid var(--amp-border);
  border-radius: 12px;
  padding: 0.78rem 0.85rem;
  outline: none;
}

.editor-field input:focus,
.editor-field select:focus,
.add-link-grid input:focus,
.add-link-grid select:focus,
.editor-link-fields input:focus {
  border-color: rgba(241, 102, 35, 0.72);
  box-shadow: 0 0 0 3px rgba(241, 102, 35, 0.12);
}

.editor-field small {
  color: var(--amp-orange);
  word-break: break-all;
}

.editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.editor-version-note {
  display: inline-flex;
  margin: 0 0 0.8rem;
  border: 1px solid rgba(241, 102, 35, 0.4);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--amp-bone);
  background: rgba(241, 102, 35, 0.12);
  font-size: 0.76rem;
  font-weight: 900;
}

.editor-toggle,
.editor-active-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.add-link-grid {
  display: grid;
  grid-template-columns: 150px minmax(140px, 0.7fr) minmax(220px, 1.3fr) 90px;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.editor-links-list {
  display: grid;
  gap: 0.75rem;
}

.editor-empty-links {
  border: 1px dashed var(--amp-border);
  background: rgba(10, 10, 10, 0.32);
  border-radius: 14px;
  padding: 1rem;
  color: var(--amp-stone);
}

.editor-empty-links strong {
  color: var(--amp-bone);
}

.editor-empty-links p {
  margin: 0.35rem 0 0;
}

.editor-link-row {
  border: 1px solid var(--amp-border);
  background: rgba(10, 10, 10, 0.34);
  border-radius: 16px;
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.editor-link-fields {
  display: grid;
  grid-template-columns: 140px minmax(140px, 0.7fr) minmax(220px, 1.3fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.editor-link-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-mini {
  border: 1px solid rgba(243, 240, 232, 0.16);
  background: rgba(243, 240, 232, 0.08);
  color: var(--amp-bone);
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-mini:hover {
  border-color: rgba(241, 102, 35, 0.55);
  color: #fff;
}

.btn-mini[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
}

.btn-mini.danger {
  border-color: rgba(239, 68, 68, 0.42);
  color: #fecaca;
}

@media (max-width: 820px) {
  .editor-row,
  .add-link-grid,
  .editor-link-fields {
    grid-template-columns: 1fr;
  }

  .editor-link-actions,
  .smartlink-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Smartlink Stats */
.smartlink-stats-modal {
  width: min(960px, 100%);
}

.stats-content {
  display: grid;
  gap: 1.25rem;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stats-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stats-modal-actions label {
  color: var(--amp-stone);
  font-size: 0.78rem;
  font-weight: 800;
}

.stats-modal-actions select {
  min-height: 44px;
  border: 1px solid var(--amp-border);
  border-radius: 10px;
  background: var(--amp-black);
  color: var(--amp-bone);
  padding: 0.55rem 0.7rem;
}

.stats-modal-actions select:focus-visible {
  outline: 3px solid rgba(241, 102, 35, 0.38);
  outline-offset: 2px;
}

.stats-card {
  border: 1px solid var(--amp-border);
  background: rgba(10, 10, 10, 0.38);
  border-radius: 16px;
  padding: 1rem;
}

.stats-card span {
  display: block;
  color: var(--amp-stone);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.stats-card strong {
  color: var(--amp-bone);
  font-size: 1.75rem;
  line-height: 1;
}

.stats-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.platform-stats-list,
.recent-events-list {
  display: grid;
  gap: 0.65rem;
}

.platform-stat-row,
.recent-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid rgba(243, 240, 232, 0.1);
  background: rgba(10, 10, 10, 0.26);
  border-radius: 12px;
  padding: 0.75rem;
}

.platform-stat-row span,
.recent-event-row span {
  color: var(--amp-bone);
  font-weight: 850;
  text-transform: capitalize;
}

.platform-stat-row strong {
  color: var(--amp-orange);
  font-size: 1.1rem;
}

.recent-event-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.recent-event-row small {
  color: var(--amp-orange);
  font-weight: 850;
}

.recent-event-row em {
  color: var(--amp-stone);
  font-style: normal;
  font-size: 0.78rem;
}

.stats-empty {
  color: var(--amp-stone);
  border: 1px dashed var(--amp-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

@media (max-width: 900px) {
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-detail-grid {
    grid-template-columns: 1fr;
  }

  .recent-event-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .stats-summary-grid {
    grid-template-columns: 1fr;
  }

  .smartlink-item {
    flex-direction: column;
  }

  .smartlink-cover {
    width: 72px;
    height: 72px;
  }

  .stats-modal-actions {
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
