/* Validator Page Styles */
/* Note: Base styles (.content, .btn, header) come from landing.css to maintain theme consistency */

/* Validator-specific content adjustments */
main .content {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 40px; /* Preserve margin-top from landing.css */
}

.validator-intro {
  text-align: center;
  margin-bottom: 50px;
}

.validator-intro h1 {
  font-size: 2.5rem;
  color: #4c5fd8;
  margin-bottom: 20px;
}

.validator-intro .subtitle {
  font-size: 1.2rem;
  color: #4a5568;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* Input Tabs */
.input-tabs {
  margin-bottom: 40px;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #4a5568;
  transition: all 0.3s ease;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}

.tab-btn:hover {
  color: #4c5fd8;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.tab-btn.active {
  color: #4c5fd8;
  border-bottom-color: #4c5fd8;
  font-weight: 600;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Input Groups */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2d3748;
}

.url-input-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.url-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.url-input:focus {
  outline: none;
  border-color: #4c5fd8;
  box-shadow: 0 0 0 3px rgba(76, 95, 216, 0.1);
}

.text-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  resize: vertical;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.text-input:focus {
  outline: none;
  border-color: #4c5fd8;
  box-shadow: 0 0 0 3px rgba(76, 95, 216, 0.1);
}

/* File Upload */
.file-upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  background: #f7fafc;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.file-upload-area:hover {
  border-color: #4c5fd8;
  background: #edf2f7;
}

.file-upload-area.dragover {
  border-color: #4c5fd8;
  background: #e6f3ff;
}

.file-upload-text p {
  margin: 10px 0;
  color: #4a5568;
}

.file-name {
  margin-top: 15px;
  padding: 10px;
  background: #e6f3ff;
  border-radius: 6px;
  color: #2d3748;
  font-weight: 500;
  display: none;
}

.file-name.show {
  display: block;
}

#file-input {
  display: none;
}

/* Buttons - scoped to validator content only (override landing.css for validator-specific buttons) */
.input-group .btn,
.input-tabs .btn {
  padding: 12px 24px;
  border: none;
  border-radius: 30px; /* Match landing page button style */
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.input-group .btn-primary,
.input-tabs .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.input-group .btn-primary:hover,
.input-tabs .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.input-group .btn-primary:disabled,
.input-tabs .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.input-group .btn-secondary,
.input-tabs .btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
}

.input-group .btn-secondary:hover,
.input-tabs .btn-secondary:hover {
  background: #cbd5e0;
  transform: translateY(-2px);
}

/* Status Messages */
.status-message {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.status-message.loading {
  background: #e6f3ff;
  color: #2c5282;
}

.status-message.error {
  background: #fed7d7;
  color: #c53030;
}

.status-message.success {
  background: #c6f6d5;
  color: #22543d;
}

/* Results Section */
.results-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e2e8f0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.results-header h2 {
  color: #2d3748;
  font-size: 1.8rem;
}

.validation-status {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.validation-status.valid {
  background: #c6f6d5;
  color: #22543d;
}

.validation-status.invalid {
  background: #fed7d7;
  color: #c53030;
}

.validation-status.warning {
  background: #feebc8;
  color: #7c2d12;
}

.results-summary {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 30px;
  border-left: 4px solid #4c5fd8;
}

.results-summary p {
  margin: 5px 0;
  color: #2d3748;
}

.results-summary strong {
  color: #4c5fd8;
}

/* Errors and Warnings */
.errors-section,
.warnings-section {
  margin-bottom: 30px;
}

.errors-title,
.warnings-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.errors-title {
  color: #c53030;
}

.warnings-title {
  color: #7c2d12;
}

.errors-list,
.warnings-list {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  max-height: 400px;
  overflow-y: auto;
}

.error-item,
.warning-item {
  padding: 15px 20px;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.error-item:hover,
.warning-item:hover {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  transform: translateX(2px);
}

.error-item:last-child,
.warning-item:last-child {
  border-bottom: none;
}

.error-item {
  border-left: 4px solid #fc8181;
}

.warning-item {
  border-left: 4px solid #f6ad55;
}

.error-line,
.warning-line {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.error-line {
  color: #c53030;
}

.warning-line {
  color: #7c2d12;
}

.error-message,
.warning-message {
  color: #4a5568;
  margin-bottom: 5px;
}

.error-property,
.warning-property {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #718096;
  background: #edf2f7;
  padding: 2px 6px;
  border-radius: 3px;
}

.error-suggestion,
.warning-suggestion {
  margin-top: 8px;
  padding: 8px;
  background: #f7fafc;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #4a5568;
  font-style: italic;
}

/* Success Message */
.success-section {
  text-align: center;
  padding: 40px;
}

.success-message h3 {
  color: #22543d;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.success-message p {
  color: #4a5568;
  font-size: 1.1rem;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .content {
    padding: 20px;
    margin: 15px;
  }

  .validator-intro h1 {
    font-size: 2rem;
  }

  .tab-buttons {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  .url-input-wrapper {
    flex-direction: column;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}
