/* CommercisShip — front-end styles */

.cs-wrap {
  max-width: 460px;
  margin: 2rem auto;
  padding: 3rem 0rem;
  box-sizing: border-box;
}

.cs-wrap:has(.cs-onboarding) {
  max-width: 65%;
}

.cs-form-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.cs-form .cs-field {
  margin: 0 0 1rem;
}

.cs-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cs-form input[type="text"],
.cs-form input[type="email"],
.cs-form input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

.cs-form input:focus {
  outline: none;
  border-color: linear-gradient(135deg, #8b0a8f 0%, #a014b5 100%);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cs-hint {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.cs-checkbox label,
.cs-checkbox {
  font-weight: 400;
  display: block;
  margin-bottom: 0.35rem;
}

.cs-button {
  display: inline-block;
  background: linear-gradient(135deg, #8b0a8f 0%, #a014b5 100%);
  color: #fff;
  border: none;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.cs-button:hover {
  opacity: 0.8;
  color: #fff;
}

.cs-button-secondary {
  background: #e2e8f0;
  color: #1f2933;
}

.cs-button-secondary:hover {
  background: #cbd5e1;
  color: #1f2933;
}

.cs-alt-link {
  font-size: 0.9rem;
  margin-top: 1rem;
}

.cs-notice {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.cs-notice-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.cs-notice-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.cs-notice-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* ── Legacy single-fieldset interests (kept for back-compat) ── */
.cs-interests legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cs-interests {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

/* ── Onboarding — Markdown-driven card layout ── */
.cs-onboarding { 
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.cs-onboarding-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.cs-onboarding-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.cs-onboarding-intro {
  font-size: 1.05rem;
  color: #475569;
  margin: 0 0 0.4rem;
}

.cs-onboarding-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.cs-interests-form {
  margin-top: 0;
}

.cs-interest-categories {
  display: flex;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-direction: column;
}

@media (min-width: 600px) {
  .cs-interest-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cs-interest-categories {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cs-interest-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 1.1rem 1.25rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.cs-interest-card:has(.cs-interest-chip input:checked) {
  border-color: linear-gradient(135deg, #8b0a8f 0%, #a014b5 100%);
  box-shadow:
    0 0 0 2px rgba(37, 99, 235, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.05);
}

.cs-interest-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #f1f5f9;
}

.cs-interest-card-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
}

.cs-interest-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  transition: background 0.1s ease;
}

.cs-interest-chip:hover {
  background: #f8fafc;
}

.cs-interest-chip input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: linear-gradient(135deg, #8b0a8f 0%, #a014b5 100%);
  cursor: pointer;
}

.cs-interest-chip span {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.4;
  font-weight: 400;
}

.cs-interest-chip:has(input:checked) span {
  color: #1e40af;
  font-weight: 500;
}

.cs-interests-footer {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.cs-button-lg {
  padding: 0.8rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: 0.01em;
}

/* Confirmation summary */
.cs-interest-summary {
  list-style: disc;
  padding-left: 1.4rem;
}

.cs-resend {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.cs-resend summary {
  cursor: pointer;
  color: linear-gradient(135deg, #8b0a8f 0%, #a014b5 100%);
}

/* Restricted content */
.cs-restricted-notice {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.cs-restricted-actions {
  margin-top: 0.75rem;
}

.cs-restricted-excerpt {
  margin-bottom: 1rem;
}

/* ── Profile page ── */
.cs-wrap:has(.cs-profile) {
  max-width: 100%;
  padding: 0;
}

.cs-profile {
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.cs-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 1.5rem;
  gap: 1rem;
}

.cs-profile-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #0f172a;
}

.cs-profile-email {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
}

.cs-logout-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.cs-profile-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #1e293b;
}

.cs-profile-form .cs-interests-footer {
  margin-top: 1.5rem;
}
