/* OVK ID Landscape Map - Stylesheet */

/* Inter is served locally; the files are synced from @fontsource/inter. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url('/fonts/inter/inter-latin-300-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/inter/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/fonts/inter/inter-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/fonts/inter/inter-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('/fonts/inter/inter-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('/fonts/inter/inter-latin-800-normal.woff2') format('woff2');
}

/* Custom properties for consistency */
:root {
  --color-ovk-red: #e2401c;
  --color-ovk-blue: #004bb4;
  --color-ovk-light-blue: #0056cc;
  --color-bg-light: #f6f8fa;
  --color-bg-sand: #edeae5;
  --color-bg-dark: #0b1c34;
  --color-text-charcoal: #2d3748;
  --color-text-light: #718096;
  --color-border: #e2e8f0;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-light);
  color: var(--color-text-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--color-ovk-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-ovk-red);
}

/* Header Styles */
.main-header {
  background-color: var(--color-ovk-red);
  color: #ffffff;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
  position: relative;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.logo-area {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.logo-ovk {
  color: #ffffff;
  letter-spacing: 0.05em;
  background-color: #000000;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 1.1rem;
}

.logo-separator {
  margin: 0 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

.logo-title {
  color: #ffffff;
  font-weight: 500;
  font-size: 1.1rem;
}

.header-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.header-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.header-nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.header-tagline {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}

/* Hero Section */
.hero-section {
  background-color: var(--color-ovk-blue);
  color: #ffffff;
  padding: 1.25rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -10px 20px rgba(0,0,0,0.05);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 75, 180, 0.9) 0%, rgba(0, 45, 120, 0.95) 100%);
  z-index: 1;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-size: 2.0rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero-description {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

/* Main Content Container */
.app-container {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Controls Panel */
.controls-panel {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.filter-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-charcoal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.active-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.no-filter-text {
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-style: italic;
}

.filter-chip {
  background-color: var(--color-bg-sand);
  color: var(--color-text-charcoal);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.filter-chip.chip-usecase {
  border-left: 3px solid var(--color-ovk-red);
}

.filter-chip.chip-dsp {
  border-left: 3px solid var(--color-ovk-blue);
}

.filter-chip .btn-remove-filter {
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.filter-chip .btn-remove-filter:hover {
  color: var(--color-ovk-red);
}

.btn-reset {
  background-color: #000000;
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-reset:hover:not(:disabled) {
  background-color: var(--color-ovk-red);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-reset:active:not(:disabled) {
  transform: translateY(0);
}

.btn-reset:disabled {
  background-color: var(--color-border);
  color: var(--color-text-light);
  cursor: not-allowed;
  box-shadow: none;
}

/* Stage 1: Horizontal Usecase Selector Panel */
.usecase-selector-panel {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
  border-bottom: 3px solid var(--color-ovk-red);
}

.usecase-selector-panel:hover {
  box-shadow: var(--shadow-md);
}

.usecase-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 160px;
}

.usecase-header-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-charcoal);
  margin: 0;
}

.usecase-panel-cards {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.usecase-panel-cards .partner-card {
  margin-bottom: 0;
  flex: 1;
  max-width: 450px;
  min-height: 58px;
}

/* Landscape Grid (3 Columns) */
.landscape-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
}

/* Stage Columns */
.stage-column {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.stage-column:hover {
  box-shadow: var(--shadow-md);
}

.stage-header {
  border-bottom: 2px solid var(--color-bg-light);
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.stage-badge {
  background-color: var(--color-bg-sand);
  color: var(--color-text-charcoal);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(0,0,0,0.05);
}

.stage-column .stage-badge,
.stage-column .stage-header {
  border-bottom-color: var(--color-ovk-blue);
}

.stage-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-charcoal);
}

.stage-subtitle {
  font-size: 0.72rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.1rem;
}

.cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

/* Card Styles */
.partner-card {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast),
              opacity var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
}



/* Clickable / interactive hover */
.partner-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-text-light);
}

.partner-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-charcoal);
}

.partner-card-desc {
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin-top: 0.15rem;
  line-height: 1.25;
}

/* Selection / Filtering States */

/* Selected Card in any column */
.partner-card.selected {
  border: 2px solid var(--color-ovk-blue) !important;
  background-color: rgba(0, 75, 180, 0.03) !important;
  box-shadow: var(--shadow-md) !important;
}

#stage-usecase .partner-card.selected {
  border: 2px solid var(--color-ovk-red) !important;
  background-color: rgba(226, 64, 28, 0.03) !important;
}

/* Indicator dot for selected cards */
.partner-card.selected::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-ovk-blue);
}

#stage-usecase .partner-card.selected::after {
  background-color: var(--color-ovk-red);
}

/* Highlighted (Compatible) state for down-stream cards */
.partner-card.highlighted {
  border: 2px solid var(--color-ovk-blue);
  background-color: rgba(0, 75, 180, 0.02);
  box-shadow: var(--shadow-md);
}

/* Inactive (Faded-out) state for incompatible items */
.partner-card.inactive {
  opacity: 0.15;
  cursor: not-allowed;
  pointer-events: none;
}



/* Group container for SSP (nested look) */
.ssp-group-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.1rem;
  transition: opacity var(--transition-normal);
}

.ssp-group-header.inactive {
  opacity: 0.15;
}

.ssp-group-subtitle {
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: none;
  color: var(--color-text-light);
  margin-left: 0.25rem;
}

/* Detail Drawer (bottom sticky sheet) */
.detail-drawer {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-normal);
  animation: slideUp 0.3s ease-out;
}

.detail-drawer.open {
  display: flex;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.drawer-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-ovk-blue);
}

.btn-close-drawer {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  color: var(--color-text-light);
  line-height: 1;
  padding: 0 0.5rem;
}

.btn-close-drawer:hover {
  color: var(--color-ovk-red);
}

.drawer-content {
  font-size: 0.9rem;
  color: var(--color-text-charcoal);
}

/* Footer Styles */
.main-footer {
  background-color: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 2rem;
  font-size: 0.85rem;
  margin-top: auto;
  border-top: 4px solid var(--color-ovk-red);
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.footer-logo {
  color: #ffffff;
  font-size: 1rem;
}

.footer-logo strong {
  background-color: var(--color-ovk-red);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-ovk-red);
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Grid adjustments */
@media (max-width: 1200px) {
  .landscape-grid {
    grid-template-columns: 1fr 1fr;
  }

  .usecase-selector-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .usecase-panel-cards {
    width: 100%;
  }
}

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

  .usecase-panel-cards {
    flex-direction: column;
  }
  .main-header {
    height: auto;
    padding: 1rem;
  }
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  .header-nav ul {
    gap: 1rem;
  }
  .controls-panel {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  .btn-reset {
    justify-content: center;
  }
}

/* Publisher Inventory Type Icons */
.publisher-inventory-types {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
}

.inventory-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all var(--transition-fast);
  cursor: help;
}

.inventory-icon-wrapper:hover {
  background-color: #e0f2fe;
  color: var(--color-ovk-blue);
  border-color: var(--color-ovk-blue-light);
  transform: translateY(-1px);
}

.inventory-icon-wrapper svg {
  display: block;
}

/* ID Systems Badges */
.partner-card-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  align-items: center;
}

.id-badge {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 3px;

  letter-spacing: 0.02em;
  display: inline-block;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.partner-card:hover .id-badge {
  transform: scale(1.03);
}



/* Stage 1a: Data Partner specific styling */
.stage-datapartner-panel {
  border-bottom: 3px solid #0056cc !important; /* Blue color for Stage 1a */
}

.stage-datapartner-panel .stage-badge {
  background-color: #0056cc !important;
  color: #ffffff !important;
}

.stage-datapartner-panel .partner-card.selected {
  border: 2px solid #0056cc !important;
  background-color: rgba(0, 86, 204, 0.03) !important;
}

.stage-datapartner-panel .partner-card.selected::after {
  background-color: #0056cc !important;
}

/* Publisher Inventory Type Icons */
.publisher-inventory-types {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 6px;
  vertical-align: middle;
}

.inventory-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all var(--transition-fast);
  cursor: help;
}

.inventory-icon-wrapper:hover {
  background-color: #e0f2fe;
  color: var(--color-ovk-blue);
  border-color: var(--color-ovk-light-blue);
  transform: translateY(-1px);
}

.inventory-icon-wrapper svg {
  display: block;
}

.partner-card:focus-visible,
.btn-reset:focus-visible,
.btn-remove-filter:focus-visible,
.btn-close-drawer:focus-visible {
  outline: 3px solid rgba(226, 64, 28, 0.45);
  outline-offset: 2px;
}
