/* ============================================================
   ICA Community Consultation Webinar — Styles
   DSS branding: teal #005568 background
   Zero CDN dependencies. CSP-safe.
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dss-teal:    #005568;
  --dss-dark:    #003d4d;
  --dss-accent:  #007a8c;
  --focus-ring:  #ffffff;
}

body {
  background-color: var(--dss-teal);
  font-family: system-ui, -apple-system, sans-serif;
  color: #ffffff;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: var(--dss-teal);
  padding: 12px 24px;
  z-index: 9999;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* ── DSS Header / Footer ── */
.dss-banner img, .dss-footer img {
  width: 100%;
  display: block;
}

.dss-footer {
  margin-top: auto;
}

/* ── Main area ── */
.main-area {
  flex: 1;
  padding: 2rem 1rem;
}

/* ── Title ── */
.title-section {
  text-align: center;
  margin-bottom: 1.5rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

@media (min-width: 768px) {
  .page-title { font-size: 2rem; }
}

@media (min-width: 1024px) {
  .page-title { font-size: 2.5rem; }
  .main-area { padding: 2rem 2rem; }
}

@media (min-width: 1280px) {
  .main-area { padding: 2rem 3rem; }
}

/* ── Webinar container ── */
#webinar-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Desktop: 8/4 grid */
.webinar-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  height: 70vh;
  min-height: 500px;
}

/* Mobile: stacked */
@media (max-width: 767px) {
  .webinar-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: auto;
    min-height: auto;
  }
}

/* Slots */
.video-slot {
  background: #000000;
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}

.slido-slot {
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
}

@media (max-width: 767px) {
  .video-slot {
    aspect-ratio: 16 / 9;
  }
  .slido-slot {
    height: 24rem;
  }
}

/* Responsive iframe */
.responsive-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Support button area ── */
.support-area {
  text-align: center;
  margin-top: 2rem;
  padding: 0 1rem;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid rgba(255,255,255,0.5);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  transition: all 0.2s ease;
}

.support-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: #ffffff;
}

.support-btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.icon-sm { width: 1.25rem; height: 1.25rem; }

/* ── Slido placeholder ── */
.slido-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f9fafb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: #374151;
}

.slido-placeholder p { margin-bottom: 0.5rem; }

.slido-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  stroke: var(--dss-accent);
  opacity: 0.6;
}

.slido-heading { font-size: 1.25rem; font-weight: 700; color: #1f2937; }
.slido-desc { color: #6b7280; margin-bottom: 1.25rem; }

.btn-activate {
  background: var(--dss-teal);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-activate:hover, .btn-activate:focus { opacity: 0.9; }
.btn-activate:focus-visible { outline: 3px solid var(--dss-teal); outline-offset: 2px; }

/* Slido blocked */
.slido-blocked-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  stroke: #6b7280;
}

.btn-reactivate {
  background: var(--dss-teal);
  color: #ffffff;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-reactivate:hover, .btn-reactivate:focus { opacity: 0.9; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hidden-initial { display: none; }
.modal-visible { display: flex !important; }

.modal-dialog {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  max-width: 38rem;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.modal-accent {
  height: 0.375rem;
  background: var(--dss-teal);
  border-radius: 0.75rem 0.75rem 0 0;
}

.modal-body { padding: 1.5rem 2rem; }

@media (max-width: 767px) {
  .modal-body { padding: 1.25rem; }
}

.modal-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}

.modal-content-stack > * + * { margin-top: 1rem; }

.modal-text {
  font-size: 1rem;
  color: #374151;
  line-height: 1.625;
}

.privacy-callout {
  background: #e0f2f1;
  border-left: 4px solid var(--dss-teal);
  padding: 1rem 1.25rem;
  border-radius: 0.25rem;
}

.privacy-link {
  color: var(--dss-teal);
  font-weight: 600;
  text-decoration: underline;
}

.consent-fieldset {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: none;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.consent-checkbox {
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-top: 0.25rem;
  accent-color: var(--dss-teal);
  cursor: pointer;
}

.consent-label {
  font-size: 1rem;
  color: #374151;
  cursor: pointer;
  line-height: 1.625;
  user-select: none;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .modal-actions { flex-direction: row; }
}

.btn-accept, .btn-decline {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-accept {
  background: var(--dss-teal);
  color: #ffffff;
}

.btn-accept:hover, .btn-accept:focus { opacity: 0.9; }

.btn-disabled {
  background: #9ca3af !important;
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-decline {
  background: #f3f4f6;
  color: #1f2937;
}

.btn-decline:hover, .btn-decline:focus { background: #e5e7eb; }

/* ── Screen reader only ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Focus styles ── */
button:focus-visible,
input:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.modal-dialog button:focus-visible,
.modal-dialog input:focus-visible,
.modal-dialog a:focus-visible {
  outline-color: var(--dss-teal);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── High contrast ── */
@media (forced-colors: active) {
  .video-slot, .slido-slot { border: 2px solid ButtonText; }
  .modal-dialog { border: 2px solid ButtonText; }
  .modal-accent { background: Highlight; }
}
