/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Tajawal","arguments":[{"subsets":["arabic","latin"],"weight":["400","700"]}],"variableName":"tajawal"} ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* arabic */
@font-face {
  font-family: '__Tajawal_0b42c5';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/dd994fbf464986f0-s.p.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin */
@font-face {
  font-family: '__Tajawal_0b42c5';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/e97026df054cf2a3-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* arabic */
@font-face {
  font-family: '__Tajawal_0b42c5';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/1ebb550cd0a67fc6-s.p.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin */
@font-face {
  font-family: '__Tajawal_0b42c5';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/ce401babc0566bc1-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: '__Tajawal_Fallback_0b42c5';src: local("Arial");ascent-override: 67.93%;descent-override: 37.71%;line-gap-override: 21.13%;size-adjust: 94.66%
}.__className_0b42c5 {font-family: '__Tajawal_0b42c5', '__Tajawal_Fallback_0b42c5';font-style: normal
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --background: #050505;
  --foreground: #ffffff;
  --accent: #ff6b00;
  --panel-bg: rgba(20, 20, 20, 0.8);
  --border: rgba(255, 255, 255, 0.1);
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: 'Tajawal', sans-serif;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  /* allow page scrolling */
  overflow-x: hidden;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* allow content to grow and scroll */
  padding: 1rem;
  gap: 1rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background);
}

.dashboard-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
}

.dashboard-header .version {
  color: var(--accent);
}

/* Header Menu */
.header-menu {
  display: flex;
  gap: 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.menu-item {
  color: #888;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  position: relative;
}

.menu-item:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
  color: var(--accent);
}

.menu-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-logo {
  height: 75px;
  /* 25% larger */
  width: auto;
}

.version-tag {
  color: #888;
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
}

.clock {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: #888;
}

/* Main Content - Video Grid */
.main-content {
  display: block;
  /* don't consume extra vertical space */
  overflow: visible;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  /* don't stretch rows; let aspect-ratio define height */
  grid-gap: 1rem;
  gap: 1rem;
  width: 100%;
  height: auto;
}

.video-slot {
  background: #000;
  border: 4px solid #333;
  border-radius: 8px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.video-slot.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 1.5rem;
}

.slot-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-name {
  font-weight: bold;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.slot-controls {
  display: flex;
  gap: 0.5rem;
  opacity: 0.7;
}

.video-content {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* keep thumbnails proportional */
}

.video-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-video {
  color: #333;
}

/* Face Boxes */
.face-box {
  position: absolute;
  border: 2px solid;
  z-index: 5;
}

.face-label {
  position: absolute;
  top: -20px;
  left: -2px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  padding: 2px 4px;
  white-space: nowrap;
}

/* Slot Footer */
.slot-footer {
  position: relative;
  /* place below the screenshot, not overlay */
  background: rgba(0, 0, 0, 0.8);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  z-index: 1;
  min-height: 44px;
  height: auto;
  /* allow content to grow */
  line-height: 1.2;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.faces-meta {
  color: #000;
  background: #fff;
  font-size: 1.6rem;
  /* doubled for readability */
  padding: 0.6rem 0.4rem 0.2rem 0.4rem;
  border-radius: 4px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  min-height: 32px;
  /* keep rows aligned even with few faces */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.live-indicator {
  background: red;
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 2px;
}

.scrolling-text {
  flex: 1 1;
  white-space: nowrap;
  overflow: hidden;
  font-size: 1.25rem;
  direction: rtl;
  text-align: right;
  color: #ddd;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
          mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Bottom Section */
.bottom-section {
  min-height: 300px;
  /* base height */
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Breaking Ticker */
.breaking-ticker {
  background: #220000;
  border-left: 4px solid red;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  color: white;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  color: red;
  margin-right: 1rem;
  white-space: nowrap;
}

.ticker-content {
  flex: 1 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content.rtl {
  direction: rtl;
  text-align: right;
}

.ticker-scroll {
  display: inline-block;
  animation: ticker 20s linear infinite;
}

@keyframes ticker {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.separator {
  margin: 0 1rem;
  color: red;
}

/* Intelligence Row */
.intelligence-row {
  display: flex;
  gap: 1rem;
  overflow: visible;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.trending-panel {
  flex: 3 1;
}

.faces-panel {
  flex: 2 1;
  overflow-y: auto;
  /* allow content below faces-grid to be visible */
}

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

.panel-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: right;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.tab {
  border: none;
  background: transparent;
  color: #ccc;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 700;
}

.tab.active {
  background: var(--accent);
  color: #000;
}

.info-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #aaa;
  cursor: help;
  transition: all 0.2s ease;
}

.info-icon-wrapper:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.info-icon-svg {
  display: block;
}

/* Ticker Card (static list) */
.ticker-card {
  margin-top: 1rem;
}

.ticker-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ticker-row {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
}

/* Comparison Card */
.comparison-card {
  margin-top: 1rem;
  margin-bottom: 3rem;
}

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

.comparison-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  grid-gap: 1.5rem;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
}

.comparison-logo {
  width: 72px;
  height: 44px;
  object-fit: contain;
  filter: none;
  background: #fff;
  padding: 6px;
  border-radius: 6px;
  display: inline-block;
}

.comparison-logo-box {
  width: 88px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
}

.comparison-logo-box.logo-dark {
  background: #000;
  border: 1px solid #fff;
}

.comparison-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.comparison-bars {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
}

.airtime-bar {
  width: 320px;
  max-width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.airtime-fill {
  height: 100%;
  background: var(--accent);
}

.sentiment-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.comparison-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #ccc;
  font-size: 1.35rem;
  white-space: nowrap;
}

.meta-sep {
  color: #666;
}

/* bump the comparison card title size without affecting others */
.comparison-card .panel-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: right;
}

/* Trending List */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Conversation Blocks */
.blocks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.block-item {
  display: flex;
  align-items: flex-start;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.block-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1;
}

.block-headline {
  font-weight: 600;
  font-size: 1.35rem;
}

.block-meta {
  color: #aaa;
  font-size: 1rem;
}

.block-meta-item {
  margin-right: 0.4rem;
}

.badge-multi {
  background: #222;
  color: #ffb703;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2px 6px;
  margin-right: 0.4rem;
  font-size: 0.85rem;
}

.block-summary {
  color: #ddd;
  font-size: 1.05rem;
}

/* RTL helpers for Arabic content */
.rtl {
  direction: rtl;
  text-align: right;
}

.trending-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.rank {
  font-weight: bold;
  color: #666;
  width: 42px;
  font-size: 1.1rem;
}

.entity-text {
  flex: 1 1;
  font-weight: 500;
  font-size: 1.5rem;
  /* larger trending entity text */
}

.entity-count {
  font-size: 1rem;
  color: var(--accent);
}

/* Faces Grid */
.faces-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  margin-top: 0.75rem;
  /* add breathing room below comparison card */
}

.face-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.face-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #333;
  margin-bottom: 0.5rem;
  overflow: hidden;
  /* Ensure image doesn't overflow */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
}

.face-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face-info {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.placeholder-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #666;
}

.face-name {
  font-size: 1.6rem;
  /* slightly reduced */
  font-weight: 700;
  margin-bottom: 0.2rem;
  display: block;
}

.face-count {
  font-size: 1.2rem;
  /* slightly reduced */
  color: var(--accent);
  display: block;
}

.loading-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: var(--accent);
  font-size: 1.5rem;
  letter-spacing: 2px;
}

/* Sentiment Timeline & Geographic Focus Cards */
.sentiment-panel,
.geo-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.new-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Geographic Focus List */
.geo-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.geo-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.geo-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ddd;
  font-size: 1.1rem;
}

.geo-name {
  font-weight: 600;
  direction: rtl;
  text-align: right;
}

.geo-count {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

.geo-bar-bg {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.geo-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff8c00);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.geo-bar-segment {
  height: 100%;
  transition: width 0.3s ease;
  cursor: pointer;
}

.geo-bar-segment:hover {
  opacity: 0.8;
}

.empty-state {
  color: #666;
  font-size: 1rem;
  text-align: center;
  padding: 2rem;
  direction: rtl;
}

/* Responsive adjustments for new cards */
@media (max-width: 1400px) {
  .new-insights-grid {
    grid-template-columns: 1fr;
  }
}

.comparison-channel-name {
  margin-left: 10px;
  min-width: 80px;
  font-size: 0.9rem;
  color: #ddd;
  direction: rtl;
  text-align: right;
}

/* Geographic Focus Legend */
.geo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 20px;
  height: 12px;
  border-radius: 2px;
}

.legend-label {
  font-size: 0.95rem;
  color: #ccc;
  white-space: nowrap;
}

