/* SmartStubs Status Page - Modern Dark Mode CSS */

/* ===== COLOR VARIABLES ===== */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* ===== BASE STYLES ===== */
body {
  background: linear-gradient(135deg, var(--bg-primary) 0%, #1a2332 100%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Force text readability */
p, span, div, label {
  color: var(--text-secondary);
}

strong, b {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== CONTAINER & LAYOUT ===== */
.container,
.layout-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ===== HEADER ===== */
.page-header,
header {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2rem 2rem 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  box-shadow: none;
}

/* Logo area */
.page-header img,
header img,
.logo-container,
.logo {
  max-width: 200px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.page-header h1,
header h1 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.page-description,
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* ===== STATUS INDICATOR ===== */
.status-indicator,
.page-status {
  background: transparent;
  border-radius: 0;
  padding: 1rem 2rem;
  margin-bottom: 1.5rem;
  border: none;
  box-shadow: none;
  text-align: center;
  transition: none;
}

.status-indicator:hover {
  transform: none;
  box-shadow: none;
}

/* Large status text - the hero message */
.status-indicator .status,
.page-status .status,
.unresolved-incidents,
.font-largest {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  margin: 0.5rem 0 !important;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* Status description/subtitle */
.status-indicator .description,
.page-status .description {
  color: var(--text-muted) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  margin-top: 0.5rem;
}

.operational .status,
.status-indicator.operational .status {
  color: var(--success) !important;
}

.degraded-performance .status,
.status-indicator.degraded .status {
  color: var(--warning) !important;
}

.major-outage .status,
.status-indicator.outage .status {
  color: var(--error) !important;
}

/* Status icon styling */
.operational .status-icon,
.status-indicator.operational::before {
  color: var(--success);
  font-size: 4rem;
  display: block;
  margin: 0 auto 1rem;
}

.degraded-performance .status-icon,
.status-indicator.degraded::before {
  color: var(--warning);
  font-size: 4rem;
  display: block;
  margin: 0 auto 1rem;
}

.major-outage .status-icon,
.status-indicator.outage::before {
  color: var(--error);
  font-size: 4rem;
  display: block;
  margin: 0 auto 1rem;
}

/* ===== SECTION TITLES ===== */
.components-section-title,
.component-group-name,
.incidents-list-title,
h2, h3, h4 {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  font-size: 1.4rem !important;
  margin-bottom: 1rem !important;
  margin-top: 1rem !important;
  text-transform: none !important;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.6rem !important;
}

/* ===== COMPONENTS ===== */
.component,
.component-inner-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.component:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
  box-shadow: 0 2px 8px var(--shadow);
}

.component-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

.component-status {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Components container */
.components-container,
.components-section {
  margin-top: 0.5rem;
}

/* ===== INCIDENTS & MAINTENANCE ===== */
.incident,
.maintenance,
.incident-container {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px var(--shadow);
}

.incident.impact-major,
.incident.impact-critical {
  border-left-color: var(--error);
}

.incident.impact-minor {
  border-left-color: var(--warning);
}

.incident-title,
.maintenance-title {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.incident-body,
.maintenance-body,
.update-body {
  color: var(--text-secondary);
  line-height: 1.7;
}

.incident-update,
.update {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
  border-left: 2px solid var(--accent);
}

.update-title {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ===== TIMESTAMPS ===== */
.timestamp,
.time,
.date {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
}

/* ===== LINKS ===== */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ===== BUTTONS ===== */
button,
.btn,
.button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover,
.btn:hover,
.button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--shadow);
}

/* ===== FOOTER ===== */
.page-footer,
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-operational {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.status-degraded {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.status-outage {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container,
  .layout-content {
    padding: 1rem;
  }
  
  .page-header,
  header {
    padding: 1.5rem 1rem 0.75rem;
    margin-bottom: 1rem;
  }
  
  .page-header h1,
  header h1 {
    font-size: 1.25rem;
  }
  
  .status-indicator,
  .page-status {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
  }
  
  /* Adjust large status text for mobile */
  .status-indicator .status,
  .page-status .status,
  .unresolved-incidents,
  .font-largest {
    font-size: 1.75rem !important;
  }
  
  .incident-title,
  .maintenance-title {
    font-size: 1.1rem;
  }
}

/* ===== SMOOTH SCROLLING ===== */
html {
  scroll-behavior: smooth;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--accent);
  color: white;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== FOCUS STATES ===== */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== SUBSCRIBE FORMS ===== */
input[type="email"],
input[type="text"],
input[type="tel"],
textarea {
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  padding: 0.75rem !important;
  width: 100%;
  transition: all 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted) !important;
}

/* ===== SUBSCRIBE MODAL - AGGRESSIVE OVERRIDES ===== */
/* Target all possible modal containers */
.modal,
.subscribe-modal,
[role="dialog"],
div[class*="modal"],
div[id*="subscribe"] {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

/* Modal content and body */
.modal-content,
.modal-dialog,
.modal-body,
.modal-header,
.subscribe-modal-content,
div[class*="modal-content"],
div[class*="modal-body"],
div[class*="modal-header"] {
  background: var(--bg-secondary) !important;
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* All headings in modals */
.modal h1,
.modal h2,
.modal h3,
.modal h4,
.modal h5,
.modal h6,
[role="dialog"] h1,
[role="dialog"] h2,
[role="dialog"] h3,
[role="dialog"] h4,
div[class*="modal"] h3,
div[id*="subscribe"] h3 {
  color: var(--text-primary) !important;
  background: transparent !important;
}

/* All paragraphs and text in modals */
.modal p,
.modal span,
.modal label,
.modal div,
[role="dialog"] p,
[role="dialog"] span,
[role="dialog"] label,
div[class*="modal"] p,
div[class*="modal"] span {
  color: var(--text-secondary) !important;
}

/* Modal borders */
.modal-header,
.modal-footer,
div[class*="modal-header"],
div[class*="modal-footer"] {
  border-color: var(--border) !important;
}

/* All inputs in modals */
.modal input,
.modal textarea,
.modal select,
[role="dialog"] input,
[role="dialog"] textarea,
div[class*="modal"] input {
  background: var(--bg-tertiary) !important;
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: 6px !important;
}

/* Input placeholders in modals */
.modal input::placeholder,
.modal textarea::placeholder,
[role="dialog"] input::placeholder {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

/* Buttons in modals */
.modal button,
.modal .btn,
[role="dialog"] button,
div[class*="modal"] button {
  background: var(--accent) !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
}

.modal button:hover,
.modal .btn:hover,
[role="dialog"] button:hover {
  background: var(--accent-hover) !important;
}

/* Close button */
.modal .close,
.modal-close,
button.close,
[aria-label="Close"] {
  color: var(--text-secondary) !important;
  opacity: 0.8 !important;
  text-shadow: none !important;
}

.modal .close:hover {
  color: var(--text-primary) !important;
  opacity: 1 !important;
}

/* Modal backdrop */
.modal-backdrop,
div[class*="backdrop"] {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Small text like reCAPTCHA notices */
.modal small,
[role="dialog"] small {
  color: var(--text-muted) !important;
}

.modal a,
[role="dialog"] a {
  color: var(--accent) !important;
}

/* Force white borders on everything that should be dark */
* {
  scrollbar-color: var(--border) var(--bg-primary);
}

/* Override any white backgrounds in the modal area */
#subscribe-modal,
#subscribe-modal *,
.subscribe-modal,
.subscribe-modal * {
  background-color: transparent !important;
}

#subscribe-modal .modal-content,
.subscribe-modal .modal-content {
  background: var(--bg-secondary) !important;
  background-color: var(--bg-secondary) !important;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px var(--shadow);
}

/* ===== UPTIME STATS ===== */
.uptime-graph,
.uptime-stats {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.uptime-day {
  background: var(--success);
  border-radius: 3px;
  transition: all 0.2s ease;
}

.uptime-day:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px var(--shadow);
}

.uptime-day.no-outage {
  background: var(--success);
}

.uptime-day.minor-outage {
  background: var(--warning);
}

.uptime-day.major-outage {
  background: var(--error);
}

/* ===== NICE ADDITIONS ===== */
/* Smooth animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.component,
.incident,
.maintenance {
  animation: fadeIn 0.4s ease-out;
}