/* Stock Table Component - Clean Modern Design */

.stock-table-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family);
}

/* Table Header */
.stock-table thead {
  background-color: #fafafa;
  border-bottom: 2px solid #e5e7eb;
}

.stock-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  position: relative;
}

.stock-table th:first-child {
  padding-left: 24px;
}

.stock-table th:not(:first-child) {
  text-align: center;
}

.table-header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

.stock-table th:first-child .table-header-container {
  justify-content: flex-start;
}

/* Table Body */
.stock-table tbody tr {
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.stock-table tbody tr:hover {
  background-color: #fafafa;
}

.stock-table tbody tr:last-child {
  border-bottom: none;
}

.stock-table td {
  padding: 20px;
  vertical-align: middle;
  font-size: 14px;
  color: #111827;
}

.stock-table td:first-child {
  padding-left: 24px;
}

.stock-table td:not(:first-child) {
  text-align: center;
}

/* Company Info */
.company-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-rank {
  font-size: 16px;
  font-weight: 700;
  color: #6b3305;
  min-width: 24px;
}

.company-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.company-flag {
  width: 24px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-top: 2px;
}

.company-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.company-name-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-name {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
  text-decoration: none;
  transition: color 0.2s ease;
}

.company-name:hover {
  color: #6b3305;
  text-decoration: underline;
}

.company-industry {
  font-size: 13px;
  color: #6b7280;
  margin-left: 34px;
}

/* Score Container */
.score-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
}

.score-number {
  font-weight: 700;
  font-size: 16px;
  color: #111827;
  min-width: 30px;
  text-align: right;
}

/* Progress Bar */
.progress-bar {
  width: 80px;
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease-out;
  position: absolute;
  top: 0;
  left: 0;
}

/* Progress Bar Colors */
.progress-fill.light_green {
  background-color: #79B758;
}

.progress-fill.dark_green { 
  background-color: #339933;
}

.progress-fill.yellow {
  background-color: #FFC239;
}

.progress-fill.red {
  background-color: #E71313;
}

/* Blurred Columns */
.blurred-column {
  position: relative;
  opacity: 0.3;
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

/* Subscription Overlay */
.subscription-overlay {
  position: absolute;
  top: 50%;
  right: 20%;
  transform: translateY(-50%);
  background: white;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid #e5e7eb;
  z-index: 10;
  max-width: 320px;
}

.overlay-img {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.overlay-img img {
  width: 64px;
  height: 64px;
}

.overlay-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 16px;
  line-height: 1.4;
}

.subscribe-button {
  background: #6b3305;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.subscribe-button:hover {
  background: #8b4507;
}

.subscribe-button svg {
  width: 16px;
  height: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .stock-table-container {
    border-radius: 12px;
  }

  .stock-table th,
  .stock-table td {
    padding: 12px;
    font-size: 13px;
  }

  .stock-table th:first-child,
  .stock-table td:first-child {
    padding-left: 16px;
  }

  .company-flag {
    width: 20px;
    height: 15px;
  }

  .company-name {
    font-size: 14px;
  }

  .company-industry {
    font-size: 12px;
    margin-left: 0;
  }

  .progress-bar {
    width: 60px;
    height: 5px;
  }

  .score-number {
    font-size: 14px;
  }

  .subscription-overlay {
    padding: 24px;
    right: 10%;
  }

  .overlay-title {
    font-size: 16px;
  }

  /* Hide table on mobile and show cards */
  .stock-table-container {
    display: none;
  }

  .stock-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}

/* Mobile Card Styles */
.stock-cards-mobile {
  display: none;
}

.stock-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-top {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
  background-color: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

.card-rank {
  font-size: 18px;
  font-weight: 700;
  color: #6b3305;
  min-width: 24px;
}

.card-company-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.card-flag {
  width: 24px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-company-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-company-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.card-company-industry {
  font-size: 12px;
  color: #6b7280;
}

.card-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 16px;
  gap: 16px;
}

.card-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.card-score {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.card-score-label {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .stock-cards-mobile {
    display: flex;
  }
}

@media (min-width: 769px) {
  .stock-cards-mobile {
    display: none;
  }
}