/**
 * Event Registration – front-end styles.
 */

/* ── Status badge ── */
.vsvc-registration-status {
  margin: 24px 0;
}
.vsvc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.vsvc-status--open {
  background: transparent;
  color: #374151;
  border: 1px solid #d1d5db;
}
.vsvc-status--closed,
.vsvc-status--full {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Form wrapper ── */
.vsvc-registration-form-wrap {
  margin: 32px 0;
  background: #fff;
  border: 1px solid #e8e0e0;
  border-radius: 12px;
  padding: 32px;
}
.vsvc-registration-form-wrap h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: 700;
}

/* ── Registration hub ── */
.vsvc-registration-hub {
  margin: 0;
}
.vsvc-registration-options {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.vsvc-registration-empty {
  margin-top: 30px;
}
.vsvc-event-modal-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  border: 2px solid #e11612;
  border-radius: 999px;
  background: #fff;
  color: #212121;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.vsvc-event-modal-trigger:hover,
.vsvc-event-modal-trigger:focus-visible {
  background: #fff5f5;
  box-shadow: 0 10px 30px rgba(225, 22, 18, 0.12);
  transform: translateY(-1px);
  outline: none;
}
.vsvc-event-modal-trigger.is-disabled,
.vsvc-event-modal-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.vsvc-event-modal-trigger__label {
  flex: 1 1 auto;
}
.vsvc-event-modal-trigger__meta {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}
.vsvc-event-modal-trigger__meta.is-full {
  color: #b91c1c;
}

/* ── Modal ── */
.vsvc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.vsvc-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
.vsvc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.68);
}
.vsvc-modal-dialog {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
  flex-shrink: 0;
}
.vsvc-modal-content {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
}
.vsvc-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.2s ease;
}
.vsvc-modal-close:hover,
.vsvc-modal-close:focus-visible {
  background: #e11612;
  color: #fff;
  outline: none;
}
.vsvc-registration-modal-panel {
  display: none;
}
.vsvc-registration-modal-panel.is-active {
  display: block;
}
.vsvc-registration-modal-panel--participants-only .vsvc-registration-tabs {
  display: none;
}
.vsvc-registration-modal-heading {
  margin-bottom: 18px;
  padding-right: 52px;
}
.vsvc-registration-modal-heading h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: #111827;
}
.vsvc-registration-modal-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e11612;
  font-weight: 700;
}
.vsvc-modal-open {
  overflow: hidden;
}

/* ── Status + tabs row (modal) ── */
.vsvc-registration-surface--modal .vsvc-registration-status {
  margin-top: 0;
  margin-bottom: 0;
}
.vsvc-registration-surface--modal .vsvc-registration-tabs {
  margin-bottom: 0;
}
.vsvc-registration-status-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Modal tabs ── */
.vsvc-registration-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px;
  border-radius: 999px;
  background: #f3f4f6;
}
.vsvc-registration-tab {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 12px 18px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}
.vsvc-registration-tab:hover,
.vsvc-registration-tab:focus-visible {
  color: #111827;
  outline: none;
}
.vsvc-registration-tab.is-active {
  background: #e11612;
  color: #fff;
  box-shadow: none;
}
.vsvc-registration-tab-panel[hidden] {
  display: none;
}
.vsvc-registration-tab-panel.is-active {
  animation: vsvc-fade-in 0.18s ease;
}

@keyframes vsvc-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Fieldsets ── */
.vsvc-registration-form fieldset {
  border: none;
  padding: 0;
  margin: 0 0 8px;
}
.vsvc-registration-form legend {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  border: none;
  padding-bottom: 0;
  margin-bottom: 16px;
  width: 100%;
}

/* ── Form groups & labels ── */
.vsvc-registration-form .form-group {
  margin-bottom: 20px;
  position: relative;
}
.vsvc-registration-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #374151;
}
.vsvc-registration-form .required {
  color: #dc2626;
  margin-left: 2px;
}

/* ── Inputs ── */
.vsvc-registration-form .form-control {
  display: block;
  width: 100%;
  height: auto;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.5;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -webkit-appearance: none;
}
.vsvc-registration-form .form-control:focus {
  border-color: #e11612;
  box-shadow: 0 0 0 3px rgba(225, 22, 18, 0.1);
  outline: none;
}
.vsvc-registration-form .form-control::placeholder {
  color: #9ca3af;
}
.vsvc-registration-form select.form-control {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.vsvc-registration-form input[type="date"].form-control {
  line-height: 1.5;
}

/* ── Inline field errors ── */
.vsvc-field-error {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #dc2626;
  line-height: 1.4;
}
.form-group.has-error .form-control {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.form-group.has-error label {
  color: #dc2626;
}

/* ── Honeypot ── */
.vsvc-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* ── Checkbox / toggle ── */
.vsvc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}
.vsvc-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #e11612;
}
.vsvc-toggle label {
  display: inline;
  font-weight: 400;
  cursor: pointer;
  margin-bottom: 0;
}
.vsvc-checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 6px;
}
.vsvc-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
  font-size: 14px;
}
.vsvc-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #e11612;
}
.vsvc-acceptance-group {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid #e8e0e0;
}
.vsvc-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vsvc-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: #e11612;
}
.vsvc-checkbox-row label {
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.5;
}
.vsvc-checkbox-row a {
  font-weight: 600;
}
.form-group.has-error .vsvc-checkbox-row label {
  color: #dc2626;
}

/* ── Submit button ── */
.vsvc-submit-wrap {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #e8e0e0;
}
.vsvc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  padding: 12px 32px;
  line-height: 1;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
}
.vsvc-btn-primary {
  background-color: #e11612;
  color: #fff;
  border-radius: 999px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.vsvc-btn-primary:hover {
  background-color: #c41310;
  color: #fff;
}
.vsvc-btn-primary:active {
  transform: scale(0.98);
}
.vsvc-btn-primary:focus-visible {
  outline: 2px solid #e11612;
  outline-offset: 2px;
}
.vsvc-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Spinner ── */
.vsvc-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vsvc-spin 0.6s linear infinite;
}
@keyframes vsvc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Top-level messages ── */
.vsvc-form-messages:empty {
  display: none;
}
.vsvc-form-messages {
  margin-bottom: 20px;
}
.vsvc-msg {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.vsvc-msg--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.vsvc-msg--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Participants table ── */
.vsvc-participants-list {
  margin: 40px 0 30px;
}
.vsvc-registration-tab-panel .vsvc-registration-form-wrap,
.vsvc-registration-tab-panel .vsvc-participants-list {
  margin: 0;
}
.vsvc-participants-empty {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 14px;
}
.vsvc-participants-list h2 {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.vsvc-table,
.entry-content .vsvc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  border: 1px solid #e5e7eb;
  border-color: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.vsvc-table th,
.vsvc-table td,
.entry-content .vsvc-table tr th,
.entry-content .vsvc-table tr td {
  padding: 12px 16px;
  text-align: left;
  border: none;
}
.vsvc-table thead th,
.entry-content .vsvc-table thead tr th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vsvc-table tbody td,
.entry-content .vsvc-table tbody tr td {
  border: none;
  border-bottom: 1px solid #f3f4f6;
}
.vsvc-table tbody tr:last-child td {
  border-bottom: none;
}
.vsvc-table tbody tr:hover {
  background: #f9fafb;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .vsvc-event-modal-trigger {
    padding: 16px 20px;
    border-radius: 28px;
    flex-direction: column;
    align-items: flex-start;
  }
  .vsvc-event-modal-trigger__meta {
    font-size: 12px;
  }
  .vsvc-modal-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    border-radius: 14px;
  }
  .vsvc-modal-content {
    max-height: calc(100vh - 20px);
    padding: 20px 16px;
  }
  .vsvc-registration-modal-heading h2 {
    font-size: 24px;
  }
  .vsvc-registration-tabs {
    width: 100%;
    display: flex;
  }
  .vsvc-registration-tab {
    flex: 1 1 50%;
    justify-content: center;
    text-align: center;
  }
  .vsvc-registration-form-wrap {
    padding: 20px 16px;
    border-radius: 8px;
  }
  .vsvc-participants-empty {
    padding: 16px;
  }
  .vsvc-table th,
  .vsvc-table td,
  .entry-content .vsvc-table tr th,
  .entry-content .vsvc-table tr td {
    padding: 10px 10px;
    font-size: 13px;
  }
  /* Card layout for participants table */
  .vsvc-table,
  .vsvc-table thead,
  .vsvc-table tbody,
  .vsvc-table th,
  .vsvc-table td,
  .vsvc-table tr {
    display: block;
  }
  .vsvc-table,
  .entry-content .vsvc-table,
  .entry-content table.vsvc-table {
    border: none !important;
    border-color: transparent !important;
    border-radius: 0;
    overflow: visible;
  }
  .table-responsive {
    border: none !important;
    overflow: visible;
  }
  .vsvc-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  .vsvc-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
  }
  .vsvc-table tbody tr:hover {
    background: #fff;
  }
  .vsvc-table tbody td,
  .entry-content .vsvc-table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
  }
  .vsvc-table tbody td:last-child,
  .entry-content .vsvc-table tbody tr td:last-child {
    border-bottom: none;
  }
  .vsvc-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    flex: 0 0 auto;
    margin-right: 12px;
  }
  .vsvc-registration-status-tabs-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .vsvc-registration-status-tabs-row .vsvc-registration-status {
    order: -1;
  }
}
