/* =========== Support page =========== */

/* Decorative academic elements */
.support-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.support-deco .deco {
  position: absolute;
  color: var(--primary);
  opacity: 0.07;
  width: 80px;
  height: 80px;
}
[data-theme="dark"] .support-deco .deco { opacity: 0.12; }
.deco-cap {
  top: 12%;
  right: 6%;
  animation: floatY 12s ease-in-out infinite;
}
.deco-book {
  bottom: 14%;
  left: 4%;
  width: 70px;
  height: 70px;
  animation: floatY 14s ease-in-out -3s infinite;
}
.deco-doc {
  top: 48%;
  right: 3%;
  width: 60px;
  height: 60px;
  opacity: 0.05;
  animation: floatY 10s ease-in-out -5s infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(-2deg); }
}
.support-deco .dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.2;
}
.dot-1 { top: 24%; left: 14%; animation: pulseDot 4s ease-in-out infinite; }
.dot-2 { top: 60%; left: 8%; width: 4px; height: 4px; animation: pulseDot 5s ease-in-out -1s infinite; }
.dot-3 { top: 36%; right: 18%; width: 5px; height: 5px; animation: pulseDot 6s ease-in-out -2s infinite; }
.dot-4 { bottom: 30%; right: 12%; animation: pulseDot 5s ease-in-out -3s infinite; }
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* Hero */
.support-hero {
  padding: 160px 0 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.support-hero .eyebrow { margin-bottom: 24px; }
.support-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.support-hero .lead {
  font-size: 18px;
  color: var(--fg-2);
  max-width: 560px;
  margin: 0 auto;
  text-wrap: pretty;
}

/* Main */
.support-main {
  padding: 50px 0 120px;
  position: relative;
  z-index: 1;
}
.support-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar info */
.support-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.info-card > p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-2);
  margin-top: 4px;
  text-wrap: pretty;
}
.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:first-child { padding-top: 0; }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary-50);
  color: var(--primary);
  display: grid;
  place-items: center;
}
.info-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-row-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-3);
}
.info-row-value {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
  word-break: break-word;
  text-decoration: none;
}
a.info-row-value:hover { color: var(--primary); }
.copy-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--fg-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s var(--ease-out);
  align-self: center;
}
.copy-btn:hover { color: var(--primary); border-color: var(--primary-200); }
.copy-btn.copied {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.info-faq h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.info-faq ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-faq ul li {
  font-size: 14px;
  color: var(--fg-2);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}
.info-faq ul li::before {
  content: '?';
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Form */
.support-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.form-head { margin-bottom: 28px; }
.form-head h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.form-head p {
  font-size: 13.5px;
  color: var(--fg-3);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.field-full { grid-column: 1 / -1; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s var(--ease-out);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--fg-3);
  opacity: 0.8;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 12%, transparent);
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

/* Custom university select */
.uni-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.uni-select-trigger {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  min-height: 48px;
  font-family: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, border-radius 0.2s;
}
.uni-select-trigger:hover {
  border-color: var(--primary);
  background: var(--surface);
}
.uni-select.open .uni-select-trigger {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 12%, transparent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: color-mix(in oklab, var(--primary) 30%, transparent);
}

.uni-trigger-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.uni-trigger-placeholder {
  color: var(--fg-3);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uni-trigger-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}
.uni-trigger-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uni-select-arrow {
  flex-shrink: 0;
  color: var(--fg-3);
  transition: transform 0.22s var(--ease-out), color 0.2s;
}
.uni-select.open .uni-select-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Dropdown menu */
.uni-select-menu {
  list-style: none;
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.13);
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.25s var(--ease-out), opacity 0.18s;
}
.uni-select.open .uni-select-menu {
  max-height: 320px;
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
}

.uni-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.uni-opt:hover { background: var(--bg-alt); }
.uni-opt.selected { background: var(--primary-50); }

.uni-opt-badge {
  flex-shrink: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 70%, #000));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px color-mix(in oklab, var(--primary) 35%, transparent);
}
.uni-opt-name {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
}
.uni-opt.selected .uni-opt-name { color: var(--primary); font-weight: 600; }

.uni-opt-check {
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.2s var(--ease-out);
}
.uni-opt.selected .uni-opt-check { opacity: 1; transform: scale(1); }

/* Error state */
.field.has-error .uni-select-trigger { border-color: #d92d20; }
.field.has-error .uni-select.open .uni-select-trigger {
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12);
}

/* Error states */
.field-error {
  font-size: 12px;
  color: #d92d20;
  font-weight: 500;
  min-height: 0;
  display: none;
}
.field.has-error .field-error { display: block; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #d92d20;
}
.field.has-error input:focus,
.field.has-error textarea:focus,
.field.has-error select:focus {
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12);
}

/* Platform radios */
.platform-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.platform-opt {
  cursor: pointer;
}
.platform-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  color: var(--fg-2);
  transition: all 0.2s var(--ease-out);
  font-size: 13.5px;
  font-weight: 600;
}
.platform-card svg {
  color: var(--fg-3);
  transition: color 0.2s;
}
.platform-opt:hover .platform-card {
  border-color: var(--primary-200);
  background: var(--surface);
}
.platform-opt input:checked + .platform-card {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary);
}
.platform-opt input:checked + .platform-card svg { color: var(--primary); }
.platform-opt input:focus-visible + .platform-card {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent);
}

/* Consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}
.consent:hover { border-color: var(--primary-200); }
.consent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.consent-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: white;
  transition: all 0.2s var(--ease-out);
  margin-top: 1px;
}
.consent-box svg {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.2s var(--ease-out);
}
.consent input:checked ~ .consent-box {
  background: var(--primary);
  border-color: var(--primary);
}
.consent input:checked ~ .consent-box svg {
  opacity: 1;
  transform: scale(1);
}
.consent input:focus-visible ~ .consent-box {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent);
}
.consent-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-2);
  text-wrap: pretty;
}

/* Submit */
.form-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}
.submit-btn {
  padding: 14px 28px;
  font-size: 15px;
  position: relative;
}
.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}
.submit-btn:disabled:hover {
  transform: none !important;
  box-shadow: 0 8px 24px rgba(107, 44, 245, 0.35);
}
.submit-btn .btn-loader {
  display: none;
  animation: spin 0.9s linear infinite;
}
.submit-btn.loading .btn-text,
.submit-btn.loading .btn-arrow { opacity: 0; }
.submit-btn.loading .btn-loader { display: inline-flex; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status messages */
.status-message {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  animation: slideUp 0.4s var(--ease-out);
}
.status-message[hidden] { display: none; }
.status-error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}
.status-success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}
[data-theme="dark"] .status-error {
  background: rgba(180, 35, 24, 0.15);
  color: #f97066;
  border-color: rgba(180, 35, 24, 0.4);
}
[data-theme="dark"] .status-success {
  background: rgba(2, 122, 72, 0.15);
  color: #6ce9a6;
  border-color: rgba(2, 122, 72, 0.4);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* =========== Responsive =========== */
@media (max-width: 1024px) {
  .support-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .support-info {
    position: relative;
    top: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .info-card:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .support-deco .deco { display: none; }
  .support-hero { padding: 120px 0 20px; }
  .support-hero h1 { font-size: 32px; }
  .support-hero .lead { font-size: 15px; }
  .support-main { padding: 30px 0 70px; }
  .support-info {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .support-form { padding: 22px; border-radius: 22px; }
  .form-head h2 { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .platform-group { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .platform-card { padding: 14px 6px; font-size: 12.5px; }
  .platform-card svg { width: 18px; height: 18px; }
  .form-actions { justify-content: stretch; }
  .submit-btn { width: 100%; justify-content: center; }
  .consent { padding: 14px; }
  .consent-text { font-size: 13px; }
}
