/* RiSEE Summit Registration Form */
:root {
  --risee-bg: #000000;
  --risee-surface: #221f28;
  --risee-accent: #FFAD66;
  --risee-text: #ffffff;
  --risee-muted: rgba(255, 255, 255, 0.5);
  --risee-border: rgba(255, 255, 255, 0.21);
  --risee-radius: 10px;
  --risee-font: 'Outfit', 'Inter', sans-serif;
}

/* Open Button — hidden, modal infrastructure only */
#risee-form-root .risee-open-btn {
  display: none;
}

/* Inline registration button — matches site's ticket button style */
a.risee-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 20px;
  background-color: #221f28;
  color: #f5f5f5 !important;
  font-family: 'Inter', var(--risee-font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  box-sizing: border-box;
}
a.risee-btn:hover {
  background-color: #196be6;
  color: #ffffff !important;
}

/* Modal Overlay */
.risee-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.risee-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.risee-modal {
  font-family: var(--risee-font);
  background: var(--risee-bg);
  color: var(--risee-text);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s;
}
.risee-overlay.open .risee-modal {
  transform: translateY(0);
}

/* Modal Header */
.risee-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--risee-border);
  flex-shrink: 0;
}
.risee-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.risee-modal-header .accent {
  color: var(--risee-accent);
}
.risee-close {
  background: none;
  border: none;
  color: var(--risee-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.risee-close:hover {
  color: var(--risee-text);
}

/* Modal Body */
.risee-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
}

/* Notice */
.risee-notice {
  background: var(--risee-surface);
  border-left: 3px solid var(--risee-accent);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--risee-text);
  border-radius: 0 var(--risee-radius) var(--risee-radius) 0;
  line-height: 1.5;
}

/* Type Selection */
.risee-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.risee-type-card {
  background: var(--risee-surface);
  border: 2px solid var(--risee-border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.risee-type-card:hover {
  border-color: var(--risee-accent);
  transform: translateY(-2px);
}
.risee-type-card .icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}
.risee-type-card .label {
  font-size: 14px;
  font-weight: 600;
}
.risee-type-card .desc {
  font-size: 11px;
  color: var(--risee-muted);
  margin-top: 4px;
}

/* Form Fields */
.risee-field {
  margin-bottom: 18px;
}
.risee-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--risee-muted);
  margin-bottom: 6px;
}
.risee-field label .req {
  color: var(--risee-accent);
}
.risee-field input[type="text"],
.risee-field input[type="email"],
.risee-field input[type="tel"],
.risee-field input[type="url"],
.risee-field input[type="number"],
.risee-field select,
.risee-field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--risee-surface);
  border: 1px solid var(--risee-border);
  border-radius: var(--risee-radius);
  color: var(--risee-text);
  font-family: var(--risee-font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.risee-field input:focus,
.risee-field select:focus,
.risee-field textarea:focus {
  border-color: var(--risee-accent);
}
.risee-field textarea {
  resize: vertical;
  min-height: 60px;
}
.risee-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.risee-field select option {
  background: var(--risee-surface);
  color: var(--risee-text);
}
.risee-field .error-msg {
  color: #f87171;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.risee-field.has-error input,
.risee-field.has-error select,
.risee-field.has-error textarea {
  border-color: #f87171;
}
.risee-field.has-error .error-msg {
  display: block;
}

/* Chip Multi-Select */
.risee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.risee-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--risee-surface);
  border: 1px solid var(--risee-border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}
.risee-chip:hover {
  border-color: var(--risee-accent);
}
.risee-chip.selected {
  background: var(--risee-accent);
  color: #000;
  border-color: var(--risee-accent);
  font-weight: 600;
}
.risee-chip input[type="checkbox"] {
  display: none;
}

/* Other text input inline with chips */
.risee-other-input {
  display: none;
  margin-top: 8px;
}
.risee-other-input.show {
  display: block;
}
.risee-other-input input {
  width: 100%;
  padding: 10px 14px;
  background: var(--risee-surface);
  border: 1px solid var(--risee-border);
  border-radius: var(--risee-radius);
  color: var(--risee-text);
  font-family: var(--risee-font);
  font-size: 13px;
  outline: none;
}
.risee-other-input input:focus {
  border-color: var(--risee-accent);
}

/* Radio Group */
.risee-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.risee-radio {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--risee-surface);
  border: 1px solid var(--risee-border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.risee-radio:hover {
  border-color: var(--risee-accent);
}
.risee-radio.selected {
  background: var(--risee-accent);
  color: #000;
  border-color: var(--risee-accent);
  font-weight: 600;
}
.risee-radio input[type="radio"] {
  display: none;
}

/* Boolean Toggle */
.risee-toggle-group {
  display: flex;
  gap: 8px;
}
.risee-toggle {
  padding: 8px 20px;
  background: var(--risee-surface);
  border: 1px solid var(--risee-border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--risee-font);
  color: var(--risee-text);
  transition: all 0.2s;
}
.risee-toggle.selected {
  background: var(--risee-accent);
  color: #000;
  border-color: var(--risee-accent);
  font-weight: 600;
}

/* Section Divider */
.risee-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--risee-border);
  color: var(--risee-accent);
}

/* Footer / Submit */
.risee-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--risee-border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.risee-btn-back {
  padding: 12px 20px;
  background: var(--risee-surface);
  color: var(--risee-text);
  border: 1px solid var(--risee-border);
  border-radius: var(--risee-radius);
  font-family: var(--risee-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.risee-btn-submit {
  flex: 1;
  padding: 12px 20px;
  background: var(--risee-accent);
  color: #000;
  border: none;
  border-radius: var(--risee-radius);
  font-family: var(--risee-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.risee-btn-submit:hover {
  opacity: 0.85;
}
.risee-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Success State */
.risee-success {
  text-align: center;
  padding: 40px 20px;
}
.risee-success .checkmark {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}
.risee-success h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.risee-success .code {
  font-size: 20px;
  font-weight: 700;
  color: var(--risee-accent);
  letter-spacing: 3px;
  margin: 16px 0;
}
.risee-success p {
  color: var(--risee-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Error Banner */
.risee-error-banner {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid #f87171;
  border-radius: var(--risee-radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #f87171;
  display: none;
}
.risee-error-banner.show {
  display: block;
}

/* Loading spinner */
.risee-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #000;
  border-top-color: transparent;
  border-radius: 50%;
  animation: risee-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes risee-spin {
  to { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 640px) {
  .risee-modal {
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .risee-type-grid {
    grid-template-columns: 1fr;
  }
  .risee-modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--risee-bg);
  }
  .risee-chips {
    gap: 6px;
  }
  .risee-chip {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Logger UI (for WP admin or debug) */
.risee-log-panel {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 9999999;
}
.risee-log-toggle {
  background: var(--risee-surface);
  color: var(--risee-accent);
  border: 1px solid var(--risee-border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--risee-font);
}
.risee-log-drawer {
  display: none;
  background: var(--risee-bg);
  border: 1px solid var(--risee-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 6px;
  max-height: 300px;
  overflow-y: auto;
  width: 340px;
  font-size: 11px;
  color: var(--risee-muted);
}
.risee-log-drawer.open {
  display: block;
}
.risee-log-entry {
  padding: 6px 0;
  border-bottom: 1px solid var(--risee-border);
}
.risee-log-entry .status-sent { color: #4ade80; }
.risee-log-entry .status-pending { color: #fbbf24; }
.risee-log-entry .status-failed { color: #f87171; }
