/* Periodic Table Component Styles */
.periodic-table-wrapper {
  width: 100%;
}

.pt-selection-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.pt-selection-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pt-selection-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.pt-selected-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.pt-placeholder {
  font-size: 0.75rem;
  color: #94a3b8;
}

.pt-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.pt-tag-name {
  opacity: 0.8;
}

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

.pt-clear-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
}

.pt-clear-btn:hover {
  background: #e2e8f0;
  color: #334155;
}

.pt-view-btn {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: #0891b2;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background 0.2s;
}

.pt-view-btn:hover {
  background: #0e7490;
}

.pt-view-btn.pt-disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
}

.pt-grid-container {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pt-grid {
  display: grid;
  grid-template-columns: repeat(18, minmax(40px, 1fr));
  grid-template-rows: repeat(10, minmax(40px, 1fr));
  gap: 2px;
  min-width: 750px;
}

.pt-element {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2px;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s, box-shadow 0.1s;
  min-height: 40px;
}

.pt-element:hover {
  filter: brightness(1.1);
  z-index: 1;
}

.pt-element.pt-selected {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px white, 0 0 0 4px #0891b2;
  filter: brightness(1.15);
  z-index: 2;
}

.pt-element.pt-max-reached {
  opacity: 0.4;
  cursor: not-allowed;
}

.pt-el-number {
  font-size: 8px;
  opacity: 0.8;
  line-height: 1;
}

.pt-el-symbol {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.pt-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

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

.pt-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.pt-legend-text {
  font-size: 10px;
  color: #64748b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pt-selection-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .pt-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
