/* Base CSS for Terms & Conditions CMS */
/* Uses CSS custom properties for airline theming */

:root {
  /* Default values - will be overridden by inline styles per airline */
  --primary-color: #1A2E5A;

  /* Typography and spacing */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --line-height: 1.6;
  --max-width: 800px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;

  /* Colors for accessibility */
  --text-color: #333333;
  --background-color: #ffffff;
  --border-color: #e0e0e0;
  --error-color: #d32f2f;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

/* Header styling */
header {
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-lg);
  text-align: center;
  position: relative;
}

header h1 {
  color: white;
  margin: var(--spacing-md) 0 0 0;
  font-size: 1.8rem;
  font-weight: 600;
}

.airline-logo {
  max-height: 60px;
  max-width: 200px;
  height: auto;
  width: auto;
}

/* Main content area */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* Form controls styling */
.selector-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-color);
}

select {
  width: 100%;
  max-width: 300px;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: border-color 0.2s ease;
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 46, 90, 0.1);
}

select:disabled {
  background-color: #f5f5f5;
  color: #666666;
  cursor: not-allowed;
}

/* Button styling with primary color */
button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: color-mix(in srgb, var(--primary-color) 85%, black);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 46, 90, 0.3);
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Link styling with primary color */
a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: color-mix(in srgb, var(--primary-color) 85%, black);
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Content area styling */
.content-area {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--background-color);
  min-height: 200px;
}

.content-area.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  font-style: italic;
}

/* Terms & Conditions content styling */
.tc-content h1,
.tc-content h2,
.tc-content h3,
.tc-content h4,
.tc-content h5,
.tc-content h6 {
  color: var(--text-color);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
}

.tc-content h1 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: var(--spacing-sm);
}

.tc-content h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.tc-content h3 {
  font-size: 1.3rem;
}

.tc-content p {
  margin-bottom: var(--spacing-md);
  text-align: justify;
}

.tc-content ul,
.tc-content ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.tc-content li {
  margin-bottom: var(--spacing-sm);
}

.tc-content strong {
  font-weight: 600;
  color: var(--text-color);
}

.tc-content em {
  font-style: italic;
}

/* Error and status messages */
.error-message {
  color: var(--error-color);
  background-color: #ffebee;
  border: 1px solid #ffcdd2;
  padding: var(--spacing-md);
  border-radius: 4px;
  margin: var(--spacing-md) 0;
}

.no-content-message {
  text-align: center;
  color: #666666;
  font-style: italic;
  padding: var(--spacing-lg);
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    padding: var(--spacing-md);
    background: var(--primary-color);
  }

  main {
    padding: var(--spacing-md);
  }

  .airline-logo {
    max-height: 40px;
    max-width: 150px;
  }

  h1 {
    font-size: 1.5rem;
  }

  select {
    max-width: 100%;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-color: #000000;
  }

  select {
    border-width: 3px;
  }

  button {
    border: 2px solid white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}