/* Font detail page styles */
.font-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.font-header {
  text-align: center;
  margin-bottom: 3rem;
}

.font-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.font-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.font-badge.category {
  background-color: #dbeafe;
  color: #1e40af;
}

.font-badge.subset {
  background-color: #f3f4f6;
  color: #374151;
}

.font-controls-section {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.font-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .font-controls-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: #374151;
}

.control-value {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.preview-section {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.preview-area {
  min-height: 8rem;
  padding: 1.5rem;
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.preview-text {
  transition: all 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.sample-texts {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.sample-text {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sample-text:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.sample-text p {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.6;
}

.variants-section {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.variant-grid {
  display: grid;
  gap: 1rem;
}

.variant-item {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.variant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.variant-name {
  font-weight: 500;
  color: #374151;
}

.variant-preview {
  font-size: 1.75rem;
  line-height: 1.4;
  margin: 0;
}

.css-section {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.css-code-block {
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
}

.css-code-block pre {
  margin: 0;
  white-space: pre-wrap;
}

.css-code-block code {
  font-family: inherit;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: #1d4ed8;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

/* RTL support */
[dir="rtl"] .font-controls-grid {
  direction: rtl;
}

[dir="rtl"] .variant-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .back-button {
  flex-direction: row-reverse;
}

/* Responsive design */
@media (max-width: 768px) {
  .font-detail-container {
    padding: 1rem;
  }

  .font-controls-section,
  .preview-section,
  .variants-section,
  .css-section {
    padding: 1rem;
  }

  .sample-text p {
    font-size: 1.25rem;
  }

  .variant-preview {
    font-size: 1.5rem;
  }
}
