/**
 * Allocation Chart Widget Styles
 */

.amplify-allocation-chart {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Tabs */
.allocation-tabs {
  display: flex;
  gap: 0;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: -1px;
}

.allocation-tab {
  background: #fff !important;
  border: 2px solid #152F41;
  border-right: none;
  border-bottom: 1px solid #000 !important;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 400;
  color: #152F41;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
  position: relative;
}

.allocation-tab:hover {
  background: #f5f5f5;
}

.allocation-tab.active {
  background: #fff !important;
  border-style: solid !important;
  border-width: 1px !important;
  border-color: #000 !important;
  border-bottom-color: #fff !important;
  color: #152F41;
  font-weight: 500;
  z-index: 1;
}

/* Content */
.allocation-content {
  width: 100%;
  border: 1px solid #000;
  padding: 30px !important;
}

.allocation-panel {
  width: 100%;
}

.allocation-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Chart container */
.allocation-chart-container {
  flex: 0 0 300px;
  max-width: 300px;
}

.allocation-chart-container canvas {
  max-width: 100%;
  height: auto;
}

/* Table container */
.allocation-table-container {
  flex: 1;
  min-width: 0;
}

.allocation-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.allocation-table thead {
  background: #152F41;
  color: #ffffff;
}

.allocation-table thead th {
  padding: 8px !important;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  border: 0px !important;
}

.allocation-table thead th.text-right {
  text-align: right;
}

.allocation-table tbody tr {
  border-bottom: 1px solid #E0E0E0;
}

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

.allocation-table tbody td {
  padding: 8px;
  font-size: 14px;
  color: #152F41;
  background-color: transparent !important;
  border: 0px !important;
}

.allocation-color-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.allocation-table tbody td.text-right {
  text-align: right;
  font-weight: 500;
}

.allocation-table tbody tr:hover {
  background: #F5F5F5;
}

/* Responsive */
@media (max-width: 768px) {
  .allocation-layout {
    flex-direction: column;
  }

  .allocation-chart-container {
    flex: 1;
    max-width: 100%;
    width: 100%;
  }

  .allocation-tabs {
    flex-wrap: wrap;
  }

  .allocation-tab {
    font-size: 14px;
    padding: 10px 16px;
  }
}

/* Error messages */
.amplify-allocation-chart p {
  padding: 20px;
  background: #f8f9fa;
  border-left: 4px solid #152F41;
  margin: 0;
}

.amplify-allocation-chart p[style*="color: red"] {
  border-left-color: #dc3545;
  color: #dc3545;
}
