/* Custom styles for GMA Intelligent Qualification Query System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
  --color-primary: #000000;
  --color-secondary: #333333;
  --color-accent: #0066cc;
  --color-background: #f5f5f7;
  --color-surface: #ffffff;
  --color-border: #e2e2e2;
  --color-success: #34c759;
  --color-warning: #ff9500;
  --color-error: #ff3b30;
}

/* Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: var(--color-secondary);
  background-color: var(--color-background);
  position: relative;
}

/* Utility classes */
.font-geist-mono {
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;
}

/* Subtle enhancements */
.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

button,
select,
textarea,
input {
  transition: all 0.15s ease-in-out;
}

/* Focus states */
button:focus,
select:focus,
textarea:focus,
input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Card hover effects */
.bg-white.border {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bg-white.border:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Results formatting */
#results-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

#results-content h2:first-child {
  margin-top: 0;
}

#results-content ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  list-style-type: none;
}

#results-content ul li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

#results-content ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

#results-content strong {
  font-weight: 600;
}

#results-content p {
  margin-bottom: 1rem;
}

/* Prevent zooming on mobile */
@media screen and (max-width: 768px) {

  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Regulation query form styles */
.query-section {
  margin: 2rem 0;
  max-width: 1200px;
}

#regulation-query-form {
  background-color: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
}

.form-group.checkbox label {
  margin-bottom: 0;
  margin-left: 0.5rem;
}

button[type="submit"] {
  background-color: #4a6fa5;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

button[type="submit"]:hover {
  background-color: #395d8f;
}

/* Results container styles */
.requirements-container {
  margin-top: 2rem;
}

.requirements-header h2 {
  color: #333;
  margin-bottom: 1rem;
}

.requirements-summary {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

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

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

.requirements-table th {
  background-color: #4a6fa5;
  color: white;
}

.requirements-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.requirements-table tr:hover {
  background-color: #f1f1f1;
}

/* Compliance section styles */
#compliance-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding-top: 1rem;
  position: relative;
}

#compliance-content table {
  border-collapse: collapse;
  width: 100%;
}

#compliance-content th,
#compliance-content td {
  padding: 0.5rem 0.75rem;
}

#compliance-content th {
  text-align: left;
  font-weight: 600;
}

#compliance-content tr:nth-child(even) {
  background-color: var(--color-background);
}

#compliance-content .border {
  border-color: var(--color-border);
}

#compliance-content h3 {
  font-weight: 600;
}

#compliance-content h4 {
  color: var(--color-secondary);
  font-weight: 600;
}

/* Clause display styles */
#compliance-content .bg-gray-50 {
  background-color: #f9fafb;
}

#compliance-content ul.space-y-4 {
  padding-left: 0;
  list-style-type: none;
}

#compliance-content li h5 {
  font-weight: 600;
  color: var(--color-primary);
}

/* Badge styles */
.inline-flex.items-center.px-2\.5.py-0\.5.rounded-full {
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  padding: 0 0.75rem;
}

/* Animation for loading state */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive adjustments for the compliance section */
@media (max-width: 768px) {
  #compliance-content .overflow-x-auto {
    max-width: 100%;
    overflow-x: auto;
  }

  #compliance-content th,
  #compliance-content td {
    white-space: nowrap;
  }
}

/* Export button styles */
#export-compliance-btn {
  transition: all 0.2s ease;
}

#export-compliance-btn:hover {
  transform: translateY(-1px);
}

/* Test protocols section styles */
#test-protocols-section {
  margin-top: 3rem;
  padding-top: 1rem;
  position: relative;
}

#test-protocols-content table {
  border-collapse: collapse;
  width: 100%;
}

#test-protocols-content th,
#test-protocols-content td {
  padding: 0.5rem 0.75rem;
}

#test-protocols-content th {
  text-align: left;
  font-weight: 600;
}

#test-protocols-content tr:nth-child(even) {
  background-color: var(--color-background);
}

#test-protocols-content h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#test-protocols-content h6 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

#test-protocols-content ul {
  margin-left: 1.5rem;
}

#test-protocols-content li {
  margin-bottom: 0.25rem;
}

/* Equipment list styling */
#test-protocols-content ul.list-disc {
  list-style-type: disc;
  padding-left: 1rem;
}

/* Result badges */
#test-protocols-content .flex-wrap .rounded-full {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

/* Animation for loading state */
@keyframes protocol-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

#test-protocols-loading .animate-pulse {
  animation: protocol-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive adjustments for the test protocols section */
@media (max-width: 768px) {
  #test-protocols-content .overflow-x-auto {
    max-width: 100%;
    overflow-x: auto;
  }

  #test-protocols-content th,
  #test-protocols-content td {
    white-space: nowrap;
  }
}

/* 板块样式优化修正 */
/* 外层板块边框 */
#results-section>div.bg-white,
#compliance-section>div.bg-white,
#test-protocols-section>div.bg-white {
  border-left: 4px solid #9ca3af;
  /* 灰色 */
}

#results-section>div.bg-white {
  border-left-color: #9ca3af;
  /* 灰色边框 */
}

#compliance-section>div.bg-white {
  border-left-color: #10b981;
  /* 绿色边框 */
}

#test-protocols-section>div.bg-white {
  border-left-color: #4a6fa5;
  /* 蓝色边框 */
}

/* 确保内层板块没有彩色边框 */
#results-section>div.bg-white>div>div.bg-white,
#compliance-section>div.bg-white>div>div.bg-white,
#test-protocols-section>div.bg-white>div>div.bg-white {
  border-left: 1px solid #e5e7eb;
  /* 普通灰色边框 */
}

/* 标题背景颜色 */
#results-section .bg-gray-50 {
  background-color: #f9fafb;
}

#compliance-section .bg-gray-50 {
  background-color: #f0f9f6;
}

#test-protocols-section .bg-gray-50 {
  background-color: #f0f4f9;
}

/* Animation classes for toast notifications */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-fadeOut {
  animation: fadeOut 0.3s ease-in forwards;
}