/* ===================================================================
   TYPOGRAPHY UTILITIES - Advanced Typography System
   ================================================================ */

/* Visual Status Indicators for Override Table */
.typo-status-default {
  position: relative;
}

.typo-status-default:before {
  content: "●";
  color: #9ca3af;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.typo-status-override {
  position: relative;
}

.typo-status-override:before {
  content: "●";
  color: #10b981;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

/* =================================================================
   TYPOGRAPHY PANEL INTERFACE STYLES
   UI styles for the typography management panel
   ================================================================= */

/* Panel Interface Styles */
.typography-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.typography-panel__header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.typography-panel__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
}

.typography-panel__subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
}

.typography-override-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.typography-override-table th,
.typography-override-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.typography-override-table th {
  background-color: #f9fafb;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
}

.typography-override-table td {
  font-size: 0.875rem;
}

.typography-override-table .status-cell {
  text-align: center;
  width: 80px;
}

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-indicator--default {
  background-color: #9ca3af;
}

.status-indicator--override {
  background-color: #10b981;
}

.status-indicator--partial {
  background-color: #f59e0b;
}

/* Form Field Enhancements */
.typography-field-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.typography-field {
  display: flex;
  flex-direction: column;
}

.typography-field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.typography-field__input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out;
}

.typography-field__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.typography-field__help {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Responsive Typography Preview */
.typo-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.typo-preview__device {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.typo-preview__device:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.typo-preview__device-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.typo-preview__text {
  margin: 0.5rem 0;
}

/* CSS Output Display */
.css-output {
  background: #1f2937;
  color: #f9fafb;
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-x: auto;
  margin: 1rem 0;
}

.css-output__header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #374151;
}

.css-output__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e5e7eb;
  margin: 0;
}

.css-output__copy-btn {
  background: #374151;
  color: #d1d5db;
  border: 1px solid #4b5563;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.css-output__copy-btn:hover {
  background: #4b5563;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .typography-field-group {
    grid-template-columns: 1fr;
  }
  
  .typography-override-table {
    font-size: 0.75rem;
  }
  
  .typography-override-table th,
  .typography-override-table td {
    padding: 0.5rem;
  }
  
  .typography-panel {
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .typography-panel,
  .typo-preview,
  .css-output {
    break-inside: avoid;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .typography-panel {
    background: #1f2937;
    border-color: #374151;
  }
  
  .typography-panel__title {
    color: #f9fafb;
  }
  
  .typography-panel__subtitle {
    color: #9ca3af;
  }
  
  .typography-override-table th {
    background-color: #374151;
    color: #e5e7eb;
  }
  
  .typography-override-table th,
  .typography-override-table td {
    border-color: #4b5563;
  }
  
  .typography-field__input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }
  
  .typography-field__label {
    color: #e5e7eb;
  }
  
  .typography-field__help {
    color: #9ca3af;
  }
} 