/* ProjectDeveloperTime.css - Clean Light Blue Theme */

.project-developer-time {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

/* Header */
.pdt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.25);
}

.pdt-header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.pdt-header h1 svg {
  color: white;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-4px);
}

.date-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.date-picker-wrapper span {
  color: rgba(255, 255, 255, 0.8);
}

.date-picker-wrapper input {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  color: #334155;
  background: white;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Project Info Row - Inline Layout */
.project-info-row {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  background: white;
  padding: 20px 28px;
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.project-select-wrapper {
  min-width: 280px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-label svg {
  color: #0ea5e9;
}

.project-dropdown-wrapper {
  position: relative;
}

.project-dropdown {
  width: 100%;
  padding: 10px 36px 10px 14px;
  font-size: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  appearance: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.project-dropdown:hover {
  border-color: #0ea5e9;
  background: white;
}

.project-dropdown:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  background: white;
}

.dropdown-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.dropdown-loading {
  padding: 10px 14px;
  font-size: 14px;
  color: #64748b;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

/* Info Fields */
.info-field {
  display: flex;
  flex-direction: column;
}

.info-field.developers-field {
  flex: 1;
  min-width: 200px;
}

.developers-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.developer-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  color: #0369a1;
  transition: all 0.2s ease;
}

.developer-chip:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
}

.field-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.field-value.highlight {
  color: #0284c7;
}

.field-value.overall {
  color: #10b981;
}

/* Charts Container */
.charts-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.chart-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4, #10b981);
}

.chart-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px 0;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.chart-card h3 svg {
  color: #0ea5e9;
}

/* Pie Chart Card */
.pie-chart-card {
  max-width: 100%;
}

.pie-chart-card::before {
  background: linear-gradient(90deg, #10b981, #06b6d4, #0ea5e9);
}

/* Split View Layout */
.pie-chart-card.split-view {
  padding: 28px;
}

.split-container {
  display: flex;
  gap: 40px;
}

.split-half {
  flex: 1;
  min-width: 0;
}

.split-half h3 {
  margin-bottom: 20px;
}

.split-half .pie-chart-wrapper {
  margin-bottom: 16px;
}

.split-half .pie-legend {
  padding-top: 16px;
  gap: 8px;
  display: none;
}

.split-half .legend-item {
  padding: 8px 14px;
  font-size: 13px;
}

/* Developer Time Breakdown List */
.developer-time-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.developer-time-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.developer-time-item:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
}

.dev-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dev-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dev-name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.dev-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dev-time {
  font-size: 20px;
  font-weight: 700;
  color: #0284c7;
}

.dev-percentage {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 20px;
}

.dev-progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.dev-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.pie-chart-wrapper {
  margin-bottom: 24px;
}

.pie-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding-top: 20px;
  border-top: 2px dashed #e2e8f0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.legend-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: white;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.legend-name {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.legend-value {
  font-size: 14px;
  font-weight: 700;
  color: #0ea5e9;
}

/* Area Chart Card */
.area-chart-card {
  grid-column: 1 / -1;
}

.area-chart-card::before {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #7dd3fc);
}

.area-chart-wrapper {
  margin-top: 10px;
}

/* Custom Tooltip */
.custom-tooltip {
  background: white;
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.custom-tooltip .tooltip-date,
.custom-tooltip .tooltip-name {
  font-weight: 700;
  color: #0ea5e9;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  font-size: 15px;
}

.custom-tooltip p {
  margin: 6px 0;
  font-size: 14px;
  color: #334155;
}

.custom-tooltip .tooltip-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #e2e8f0;
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
}

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px;
  background: white;
  border-radius: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-container p {
  margin-top: 16px;
  color: #0ea5e9;
  font-weight: 500;
}

/* No Selection / No Data */
.no-selection,
.no-data {
  text-align: center;
  padding: 100px 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.no-selection svg {
  color: #94a3b8 !important;
}

.no-selection h3 {
  margin: 24px 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.no-selection p,
.no-data p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
}

/* Recharts overrides */
.recharts-legend-item-text {
  color: #334155 !important;
  font-size: 13px;
  font-weight: 500;
}

.recharts-cartesian-axis-tick-value {
  fill: #64748b;
  font-weight: 500;
}

.recharts-label {
  fill: #64748b;
  font-size: 12px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .split-container {
    flex-direction: column;
    gap: 30px;
  }

  .split-half {
    width: 100%;
  }

  .split-half .pie-legend {
    display: flex;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .project-info-row {
    gap: 20px;
  }

  .info-field.developers-field {
    width: 100%;
    flex: none;
  }
}

@media (max-width: 768px) {
  .project-developer-time {
    padding: 16px;
  }

  .pdt-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
  }

  .pdt-header h1 {
    font-size: 20px;
  }

  .date-picker-wrapper {
    width: 100%;
    flex-wrap: wrap;
  }

  .project-info-row {
    flex-direction: column;
    gap: 16px;
  }

  .project-select-wrapper {
    width: 100%;
    min-width: auto;
  }

  .info-field {
    width: 100%;
  }

  .chart-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .pie-legend {
    flex-direction: column;
    align-items: center;
  }

  .legend-item {
    width: 100%;
    justify-content: space-between;
  }

  .developer-chip {
    padding: 4px 10px;
    font-size: 12px;
  }

  .field-value {
    font-size: 18px;
  }
}
