/* Text Case Converter — page specific overrides (uses variables from main.css) */
.text-container { 
  padding: 80px 0; 
  min-height: calc(100vh - 200px); 
}

.text-header { 
  text-align: center; 
  margin-bottom: 40px; 
}

.text-header h1 { 
  font-size: 2.2rem; 
  margin-bottom: 8px; 
  color: var(--text); 
}

.text-header p { 
  color: var(--text-light); 
  max-width: 600px;
  margin: 0 auto;
}

.converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 60px;
}

.input-section, .results-section {
  display: flex;
  flex-direction: column;
}

.input-card, .results-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  height: 100%;
}

.input-card h2 {
  margin-bottom: 8px;
  color: var(--text);
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.input-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: var(--transition);
  line-height: 1.5;
}

.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(227,6,19,.1);
}

.text-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Options Group */
.options-group {
  margin-bottom: 24px;
}

.options-group h3 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.1rem;
}

.case-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.case-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text);
  text-align: left;
  font-family: monospace;
  font-size: 0.9rem;
}

.case-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.case-btn.active {
  background: rgba(227,6,19,.1);
  border-color: var(--primary);
  color: var(--primary);
}

.case-btn i {
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

/* Actions Group */
.actions-group {
  display: flex;
  gap: 12px;
}

.actions-group .btn-primary,
.actions-group .btn-secondary {
  flex: 1;
}

/* Results Section */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(227,6,19,.2);
}

.results-header h2 {
  color: var(--text);
  margin: 0;
}

.case-indicator {
  background: rgba(227,6,19,.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Output Group */
.output-group {
  margin-bottom: 24px;
}

.output-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.output-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  background: #f8fafc;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
  color: var(--text);
}

.output-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.output-actions .btn-secondary {
  flex: 1;
}

/* Conversion History */
.conversion-history h3 {
  margin-bottom: 16px;
  color: var(--text);
}

.history-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #f8fafc;
}

.history-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-light);
}

.history-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #e5e7eb;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  transition: var(--transition);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:hover {
  background: white;
}

.history-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  margin-right: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-case {
  font-size: 0.8rem;
  color: var(--text-light);
  background: #e5e7eb;
  padding: 2px 8px;
  border-radius: 12px;
}

#clear-history {
  width: 100%;
}

/* Examples Section */
.examples-section {
  margin-bottom: 60px;
}

.examples-section h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text);
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.example-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.example-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.example-card h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-family: monospace;
}

.example-text {
  font-family: monospace;
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
  color: var(--text);
}

.example-card small {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Info Section */
.info-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.info-section h2 {
  margin-bottom: 16px;
  color: var(--text);
}

.info-section p {
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--text);
}

.info-section h3 {
  margin: 24px 0 12px;
  color: var(--primary);
}

.case-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.case-type {
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid #e5e7eb;
}

.case-type h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  font-family: monospace;
}

.case-type h4 i {
  color: var(--primary);
}

.case-type p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-light);
}

.info-section ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

.info-section li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text);
}

.disclaimer {
  background: rgba(227,6,19,.05);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 4px;
  margin-top: 24px;
}

.disclaimer h3 {
  margin-top: 0;
  color: var(--primary);
}

.disclaimer p {
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 980px) {
  .converter-grid {
    grid-template-columns: 1fr;
  }
  
  .case-buttons {
    grid-template-columns: 1fr;
  }
  
  .actions-group {
    flex-direction: column;
  }
  
  .output-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .input-card, .results-card, .info-section {
    padding: 20px;
  }
  
  .text-header h1 {
    font-size: 1.8rem;
  }
  
  .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .case-types-grid {
    grid-template-columns: 1fr;
  }
  
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}