/* END PERPLEXITY DESIGN SYSTEM */
/* Custom styles for Enhanced LabhTark Dashboard */
/* Dashboard Styles */
.dashboard {
  background: var(--color-background);
  min-height: calc(100vh - 64px);
  padding: var(--space-24) 0;
}

/* Top Section - Keep exactly the same */
.top-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-24);
  margin-bottom: var(--space-32);
}

.market-indices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
}

.index-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
}

.index-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.index-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-16);
}

.index-header h3 {
  color: var(--color-primary-dark);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.index-value {
  text-align: right;
}

.index-value .value {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.change {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
}

.change.positive {
  color: var(--color-success);
}

.change.negative {
  color: var(--color-error);
}

/* Market Info Section */
.market-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.risk-status-card,
.headlines-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
}

.risk-status-card:hover,
.headlines-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.risk-status-card h4,
.headlines-card h4 {
  color: var(--color-primary-dark);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 var(--space-16) 0;
}

.indicators-container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex: 1;
}

.indicator-group {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.indicator-name {
  font-size: 11px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 500;
  line-height: 1.2;
}

.indicator-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 8px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;

}

.indicator-value {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  line-height: 1;
}

.indicator-key {
  font-size: 12px;
  color: #888;
  line-height: 1.1;
}

.buying-signal {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  min-height: 80px;
}

.signal-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.signal-text {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.market-trend {
  font-weight: bold;
  font-size: 20px;
  color: #333;
}

.market-trend-message {
  color: #6c757d;
  font-size: 13px;
  margin-top: 8px;
}
.trend-text-success{
color: var(--color-success);
}
.trend-text-error{
color: var(--color-error);
}

.signal-icon {
  background: #28a745;
  color: white;
  border-radius: 3px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-left: 15px;
}

/* Status colors */
.pe-value {
  color: #007bff;
}

/* Stock Filter Section */
.stock-bar {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 8px 15px;
  margin-bottom: 15px;
}

.stock-text {
  margin: 0;
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.explore-btn {
  background: #87CEEB;
  color: #333;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
  display: inline-block;
  transition: all 0.3s ease;
}

.explore-btn:hover {
  background: #77BFDA;
  color: #333;
  text-decoration: none;
  transform: translateY(-1px);
}

.status-normalvix-value {
  color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .indicators-container {
    gap: 8px;
  }

  .indicator-name {
    font-size: 10px;
  }

  .indicator-value {
    font-size: 16px;
  }

  .indicator-key {
    font-size: 8px;
  }

  .indicator-box {
    padding: 10px 6px;
    min-height: 45px;
  }

  .signal-text {
    font-size: 12px;
  }

  .signal-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .risk-status-card {
    padding: 12px;
  }

  .indicators-container {
    gap: 6px;
  }

  .indicator-name {
    font-size: 9px;
  }

  .indicator-value {
    font-size: 14px;
  }

  .indicator-key {
    font-size: 7px;
  }

  .indicator-box {
    padding: 8px 4px;
    min-height: 40px;
  }

  .buying-signal {
    padding: 10px 12px;
  }

  .signal-text {
    font-size: 11px;
  }

  .signal-icon {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
}

.headlines-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.headlines-list li {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard);
}

.headlines-list li:last-child {
  border-bottom: none;
}

.headlines-list li:hover {
  color: var(--color-primary);
}

/* Middle Section - Major changes */
.middle-section {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-24);
  margin-bottom: var(--space-32);
}

/* Unified Stocks Card (40% width) */
.unified-stocks-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
}

.unified-stocks-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stocks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-16);
}

.stocks-header h4 {
  color: var(--color-primary-dark);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

/* Enhanced Dropdown Styling */
.stocks-dropdown {
  min-width: 150px;
  font-size: var(--font-size-sm);
  padding: var(--space-6) var(--space-32) var(--space-6) var(--space-12);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-base);
  color: var(--color-primary-dark);
  font-family: var(--font-family-lt);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
}

.stocks-dropdown:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.stocks-dropdown:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(30, 66, 88, 0.1);
}

.stocks-dropdown option {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-8);
}

.table-container {
  overflow-x: auto;
}

.stocks-table {
  width: 100%;
  border-collapse: collapse;
}

.stocks-table th {
  text-align: left;
  padding: var(--space-8) var(--space-12);
  border-bottom: 2px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.stocks-table td {
  padding: var(--space-8) var(--space-12);
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-primary-light) !important;
  font-size: var(--font-size-xm);
}

.stocks-table tbody tr:hover {
  background: var(--color-secondary);
}

.stocks-table .positive {
  color: var(--color-success);
}

.stocks-table .negative {
  color: var(--color-error);
}

/* Expanded Heatmap Card (60% width) */
.expanded-heatmap-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
}

.expanded-heatmap-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.expanded-heatmap-card h4 {
  color: var(--color-text);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 var(--space-20) 0;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-12);
}

.heatmap-item {
  padding: var(--space-16);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-standard);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.heatmap-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  transition: opacity var(--duration-normal) var(--ease-standard);
}

.heatmap-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.heatmap-item:hover::before {
  opacity: 0.2;
}

.heatmap-item.positive {
  background: var(--color-bg-3);
  border: 2px solid rgba(var(--color-success-rgb), 0.4);
}

.heatmap-item.positive::before {
  background: var(--color-success);
}

.heatmap-item.negative {
  background: var(--color-bg-4);
  border: 2px solid rgba(var(--color-error-rgb), 0.4);
}

.heatmap-item.negative::before {
  background: var(--color-error);
}

.heatmap-item.neutral {
  background: var(--color-bg-2);
  border: 2px solid rgba(var(--color-warning-rgb), 0.4);
}

.heatmap-item.neutral::before {
  background: var(--color-warning);
}

.heatmap-item .sector-name {
  display: block;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  position: relative;
  z-index: 1;
}

.heatmap-item .sector-change {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  position: relative;
  z-index: 1;
}

.heatmap-item.positive .sector-change {
  color: var(--color-success);
}

.heatmap-item.negative .sector-change {
  color: var(--color-error);
}

.heatmap-item.neutral .sector-change {
  color: var(--color-warning);
}

/* Bottom Section - Modern cards */
.bottom-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-24);
  margin-bottom: var(--space-32);
}

.modern {
  position: relative;
  overflow: hidden;
}

.modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-teal-400));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-standard);
}

.modern:hover::before {
  opacity: 1;
}

.watchlist-card,
.commodity-card,
.exchange-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-standard);
}

.watchlist-card:hover,
.commodity-card:hover,
.exchange-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-16);
}

.card-header h4 {
  color: var(--color-text);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.card-badge {
  background: var(--color-success);
  color: var(--color-btn-primary-text);
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.watchlist-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.watchlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-12);
  background: var(--color-background);
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border-subtle);
  transition: all var(--duration-fast) var(--ease-standard);
}

.watchlist-item:hover {
  background: var(--color-secondary);
  transform: translateX(4px);
}

.watchlist-item .ticker {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.watchlist-item .price {
  text-align: right;
}

.watchlist-item .price .value {
  display: block;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.watchlist-item .price .change {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.commodity-header,
.exchange-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-16);
}

.commodity-title h4,
.exchange-title h4 {
  color: var(--color-primary-dark);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.commodity-value,
.exchange-value {
  text-align: right;
}

.commodity-value .value,
.exchange-value .value {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.commodity-value .change,
.exchange-value .change {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .navbar-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .top-section {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }

  .middle-section {
    grid-template-columns: 1fr;
  }

  .bottom-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

  .container {
    padding: 0 var(--space-12);
  }

  .dashboard {
    padding: var(--space-16) 0;
  }

  .bottom-section {
    grid-template-columns: 1fr;
  }

  .stocks-header {
    /* flex-direction: column; */
    align-items: flex-start;
    gap: var(--space-12);
  }

  .stocks-dropdown {
    width: 100%;
  }

  .heatmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-container {
    padding: var(--space-20);
  }

  .info-hero h2 {
    font-size: var(--font-size-3xl);
  }
}

@media (max-width: 480px) {

  .stocks-dropdown {
    width: 100%;
  }

  .index-card,
  .risk-status-card,
  .headlines-card,
  .unified-stocks-card,
  .expanded-heatmap-card,
  .watchlist-card,
  .commodity-card,
  .exchange-card {
    padding: var(--space-16);
  }

  .stocks-table th,
  .stocks-table td {
    padding: var(--space-6) var(--space-8);
    font-size: var(--font-size-xs);
  }

  .heatmap-grid {
    grid-template-columns: 1fr;
  }

  .info-cards-grid {
    grid-template-columns: 1fr;
  }

  .info-container {
    padding: var(--space-16);
  }
}

/* Define CSS styles for the heatmap */
.heatmap-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  /* 12 grid units */
  gap: 0px;
  /* Adjust gap as necessary */
  padding: 2px;
  /* Add padding if necessary */
  height: auto;
  width: auto;


}

.tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.85);
  /* dark background */
  color: #fff;
  /* white text */
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  /* space between logo and text */
}

.sector-container {
  position: relative;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  border: 1px solid #e9eff5;
  /* Add border to each sector container */
}

.sector-header {
  text-align: center;
  font-weight: bold;
  font-size: 9px;
  padding: 8px;
  background: var(--color-primary-dark);
  /* Reverse gradient on hover */
  color: var(--color-white);
  border-bottom: 1px solid #ddd;
  height: auto;
  width: auto;

}

.treemap {
  position: absolute;
  top: 30px;
  /* Adjust based on header height */
  left: 0;
  right: 0;
  bottom: 0;
}

.stock {
  position: absolute;
  text-align: center;
  overflow: hidden;
  font-size: 0.5em;
  /* Adjust font size as necessary */
  display: flex;
  align-items: center;
  justify-content: center;

}

.highlight {
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
}

.positive {
  color: rgb(8, 153, 129);
  font-weight: var(--font-weight-bold);
}

.negative {
  color: rgb(242, 54, 69);
  font-weight: var(--font-weight-bold);
}

/* dashboard Content */
.dashboard__featured-image {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.dashboard__featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard__content {
  padding: var(--space-2);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.dashboard__content h2 {
  margin-top: var(--space-32);
  margin-bottom: var(--space-16);
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-border-subtle);
  padding-bottom: var(--space-8);
}

.dashboard__content h3 {
  margin-top: var(--space-24);
  margin-bottom: var(--space-12);
  color: var(--color-primary-dark);
}

.dashboard__content p {
  margin-bottom: var(--space-16);
}

.dashboard__content .section-content {
  background: var(--color-cream);
  padding: var(--space-20);
  border-radius: var(--radius-base);
  margin: var(--space-16) 0;
  border-left: 4px solid var(--color-primary-dark);
}

/* Trade On 5Paisa */
.trade__banner {
  background: linear-gradient(135deg, #C1FF72 0%,  #f5beb2 100%);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 2px solid #ffc700;
  /* margin-bottom: 16px; */
  height: 380px;
}

.trade__banner__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.trade__banner__subtitle {
  font-size: 16px;
  color: #333;
  line-height: 1.5;
  font-weight: 500;
  text-align: left;
  word-spacing: normal;
  letter-spacing: normal;
  max-width: 520px;
}


.trade__banner__features {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}

.feature {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #1a1a1a;
  font-weight: 500;
}

.feature__icon {
  width: 6px;
  height: 6px;
  background-color: #1a1a1a;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.trade__banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #FF6D4D;
  color: white;
  padding: 12px 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
  margin-top: 14px;
}

.trade__banner__cta:hover {
  background-color: #fa4646;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 71, 87, 0.4);
}

.trade__banner__cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.cta__icon {
  font-size: 18px;
  display: inline-block;
}

.highlight {
  color: #ff4757;
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
  .trade__banner {
    padding: 24px;
  }

  .trade__banner__title {
    font-size: var(--font-size-lg);
    margin-bottom: 12px;
  }

  .trade__banner__subtitle {
    font-size: 16px;
    margin-bottom: 18px;
  }

  .feature {
    font-size: 13px;
  }

  .trade__banner__cta {
    padding: 11px 24px;
    font-size: 14px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .trade__banner {
    padding: 20px;
    border-radius: 10px;
  }

  .trade__banner__title {
    font-size: var(--font-size-lg);
    margin-bottom: 10px;
  }

  .trade__banner__subtitle {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .trade__banner__features {
    margin-bottom: 10px;
  }

  .feature {
    font-size: 12px;
  }

  .trade__banner__cta {
    padding: 10px 20px;
    font-size: 13px;
    width: 100%;
  }
}

/* Focus states for accessibility */
.trade__banner__cta:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}