/* Modern CSS Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f8f9fa;
  margin: 0;
  padding: 0;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.app-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.25rem 0; /* Reduced from 0.5rem */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem; /* Reduced from 1.5rem */
  text-align: center;
}

.app-header h1 {
  font-size: 0.7rem; /* Reduced from 0.9rem */
  font-weight: 700;
  margin-bottom: 0.05rem; /* Reduced from 0.1rem */
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem; /* Reduced from 0.5rem */
}

.version-badge {
  font-size: 1.2rem; /* Increased from 0.5rem */
  font-weight: 600;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.5rem; /* Increased from 0.05rem 0.2rem */
  border-radius: 6px; /* Increased from 4px */
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.subtitle {
  font-size: 0.6rem; /* Reduced from 0.7rem */
  opacity: 0.9;
  margin-bottom: 0;
  font-weight: 400;
}

.version-info {
  font-size: 0.85rem;
  opacity: 0.8;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  display: inline-block;
}

/* Main Content */
.app-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* Search Section */
.search-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.search-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-btn:active {
  transform: translateY(0);
}

.search-hint {
  text-align: center;
}

.hint-text {
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
}

/* Results Section */
.results-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  min-height: 200px;
}

/* Status Messages */
.status-message {
  background: #e3f2fd;
  color: #1976d2;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #1976d2;
  font-weight: 500;
}

.status-message.error {
  background: #ffebee;
  color: #d32f2f;
  border-left-color: #d32f2f;
}

.status-message.success {
  background: #e8f5e8;
  color: #2e7d32;
  border-left-color: #2e7d32;
}

/* Error Messages */
.error {
  background: #ffebee;
  color: #d32f2f;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #d32f2f;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Results Container */
.results-container {
  margin-top: 1rem;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid #e9ecef;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

tr:hover {
  background: #f8f9fa;
}

tr:last-child td {
  border-bottom: none;
}

/* Order Type Badges */
.order-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-type.woocommerce {
  background-color: #7c3aed;
  color: white;
}

/* Links */
a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-header h1 {
    font-size: 2rem;
  }
  
  .app-content {
    padding: 1rem;
  }
  
  .search-section,
  .results-section {
    padding: 1.5rem;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .search-btn {
    width: 100%;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
}

/* Dark Mode Support for Missive */
@media (prefers-color-scheme: dark) {
  body {
    color: #e1e5e9;
    background: transparent;
  }

  .app-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
  }

  .search-section,
  .results-section {
    background: #2d2d2d;
    border-color: #404040;
  }

  .search-input {
    background: #333;
    border-color: #404040;
    color: #e1e5e9;
  }

  .search-input:focus {
    border-color: #667eea;
    background: #333;
  }

  table {
    background: #2d2d2d;
  }

  th {
    background: #333;
    color: #e1e5e9;
    border-bottom-color: #404040;
  }

  td {
    border-bottom-color: #404040;
    color: #e1e5e9;
  }

  tr:hover {
    background: #333;
  }

  .status-message {
    background: #1a3a1a;
    color: #c3e6c3;
    border-left-color: #2d5a2d;
  }

  .error {
    background: #442326;
    color: #f8d7da;
    border-left-color: #721c24;
  }
}