/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Prismm Branding - Global Styles */
body {
  background-color: #fafafa;
  color: #252b37;
  font-family: 'Inter', 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Status Page Styles - Prismm Branding */
.status-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Inter', 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #fafafa;
  min-height: 100vh;
}

.status-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e9eaeb;
}

.status-header h1 {
  margin: 0 0 1rem 0;
  font-size: 2.5rem;
  font-weight: 600;
  color: #252b37;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
}

.status-indicator.status-up {
  background-color: #ecfdf3;
  color: #067647;
  border: 1px solid #dcfae6;
}

.status-indicator.status-down {
  background-color: #fef3f2;
  color: #b42318;
  border: 1px solid #fee4e2;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e9eaeb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.stat-card h2 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #535862;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: #252b37;
  margin-bottom: 0.5rem;
}

.stat-detail {
  font-size: 0.9rem;
  color: #535862;
}

.recent-checks,
.failures {
  margin-bottom: 3rem;
}

.recent-checks h2,
.failures h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #252b37;
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e9eaeb;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.checks-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.checks-table thead {
  background: #fafafa;
}

.checks-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #535862;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e9eaeb;
}

.checks-table td {
  padding: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.checks-table tbody tr:hover {
  background: #fafafa;
}

.checks-table tbody tr:last-child td {
  border-bottom: none;
}

.check-success {
  background: #f6fef9;
}

.check-failure {
  background: #fffbfa;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: #dcfae6;
  color: #067647;
}

.badge-failure {
  background-color: #fee4e2;
  color: #b42318;
}

.error-cell {
  max-width: 400px;
}

.error-message {
  color: #b42318;
  font-size: 0.9rem;
  word-break: break-word;
}

.error-messages {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.error-messages .error-message {
  display: block;
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: #535862;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .status-page {
    padding: 1rem;
  }

  .status-header h1 {
    font-size: 2rem;
  }

  .status-stats {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .checks-table {
    font-size: 0.9rem;
  }

  .checks-table th,
  .checks-table td {
    padding: 0.75rem 0.5rem;
  }
}
