/* Haruby Klingelton – Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --hkr-primary:       #7c3aed;
  --hkr-primary-light: #a78bfa;
  --hkr-primary-dark:  #5b21b6;
  --hkr-accent:        #f59e0b;
  --hkr-success:       #10b981;
  --hkr-error:         #ef4444;
  --hkr-bg:            #0f0a1e;
  --hkr-card:          #1a1033;
  --hkr-border:        rgba(124, 58, 237, 0.25);
  --hkr-text:          #e2d9f3;
  --hkr-muted:         #9c87c4;
  --hkr-radius:        16px;
  --hkr-radius-sm:     10px;
  --hkr-shadow:        0 20px 60px rgba(124, 58, 237, 0.2);
  --hkr-transition:    0.2s ease;
  --hkr-pad-x:         40px;
  --hkr-pad-y:         48px;
  --hkr-gap:           20px;
  --hkr-title:         28px;
  --hkr-sub:           15px;
  --hkr-inp:           15px;
  --hkr-btn:           17px;
}

/* ============================================================
   WRAPPER
   ============================================================ */
.hkr-form-wrap {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--hkr-bg) 0%, #1a0a2e 50%, #0a1628 100%);
  border: 1px solid var(--hkr-border);
  border-radius: var(--hkr-radius);
  padding: var(--hkr-pad-y) var(--hkr-pad-x);
  max-width: 720px;
  width: 100%;
  margin: 0 auto 40px;
  box-sizing: border-box;
  box-shadow: var(--hkr-shadow);
  position: relative;
  overflow: hidden;
  color: var(--hkr-text);
}

.hkr-form-wrap::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================================
   HEADER
   ============================================================ */
.hkr-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.hkr-form-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
  animation: hkr-pulse 2s ease-in-out infinite;
}

@keyframes hkr-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.hkr-form-title {
  font-family: 'Syne', sans-serif;
  font-size: var(--hkr-title);
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 0%, var(--hkr-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hkr-form-subtitle {
  font-size: var(--hkr-sub);
  color: var(--hkr-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   FELDER
   ============================================================ */
.hkr-field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--hkr-gap);
}

.hkr-field { margin-bottom: 22px; }

.hkr-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--hkr-primary-light);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hkr-label-icon { font-style: normal; }
.hkr-optional   { text-transform: none; font-weight: 400; color: var(--hkr-muted); font-size: 11px; }
.hkr-required   { color: var(--hkr-accent); }

/* ============================================================
   INPUTS & TEXTAREA
   ============================================================ */
.hkr-input,
.hkr-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid var(--hkr-border);
  border-radius: var(--hkr-radius-sm);
  color: #ffffff !important;
  font-family: 'Inter', sans-serif;
  font-size: var(--hkr-inp);
  padding: 13px 16px;
  transition: border-color var(--hkr-transition), background var(--hkr-transition), box-shadow var(--hkr-transition);
  box-sizing: border-box;
  -webkit-appearance: none;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  min-height: 48px;
}

.hkr-input::placeholder,
.hkr-textarea::placeholder { color: var(--hkr-muted); opacity: 1; }

.hkr-input:-webkit-autofill,
.hkr-input:-webkit-autofill:hover,
.hkr-input:-webkit-autofill:focus,
.hkr-textarea:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #1a1033 inset !important;
  caret-color: #ffffff;
}

.hkr-input:focus,
.hkr-textarea:focus {
  outline: none;
  border-color: var(--hkr-primary);
  background: rgba(124,58,237,0.08) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}

.hkr-input.hkr-invalid,
.hkr-textarea.hkr-invalid {
  border-color: var(--hkr-error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.2);
}

.hkr-textarea { resize: vertical; min-height: 110px; }

.hkr-field-error {
  display: block;
  font-size: 12px;
  color: var(--hkr-error);
  margin-top: 5px;
  min-height: 16px;
}

/* ============================================================
   FORMAT-GRID
   ============================================================ */
.hkr-format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hkr-format-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.hkr-format-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  border: 1px solid var(--hkr-border);
  border-radius: var(--hkr-radius-sm);
  cursor: pointer;
  transition: all var(--hkr-transition);
  background: rgba(255,255,255,0.03);
  text-align: center;
  gap: 3px;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}

.hkr-format-card strong {
  color: #fff;
  font-size: 14px;
  font-family: 'Syne', sans-serif;
}

.hkr-format-card small {
  color: var(--hkr-muted);
  font-size: 10px;
  line-height: 1.3;
}

.hkr-format-option input[type="radio"]:checked + .hkr-format-card {
  border-color: var(--hkr-primary);
  background: rgba(124,58,237,0.15);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.3);
}

.hkr-format-card:hover {
  border-color: var(--hkr-primary-light);
  background: rgba(124,58,237,0.08);
}

/* ============================================================
   UPLOAD-BEREICH
   ============================================================ */
.hkr-upload-area {
  position: relative;
  border: 2px dashed var(--hkr-border);
  border-radius: var(--hkr-radius-sm);
  background: rgba(255,255,255,0.03);
  transition: all var(--hkr-transition);
  overflow: hidden;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hkr-upload-area.hkr-drag-over {
  border-color: var(--hkr-primary);
  background: rgba(124,58,237,0.1);
}

.hkr-file-input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.hkr-upload-placeholder {
  text-align: center;
  padding: 20px 16px;
  pointer-events: none;
}

.hkr-upload-icon { font-size: 30px; margin-bottom: 8px; }

.hkr-upload-placeholder p {
  color: var(--hkr-text);
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.5;
}

.hkr-upload-placeholder p strong { color: var(--hkr-primary-light); }
.hkr-upload-placeholder small    { color: var(--hkr-muted); font-size: 12px; }

.hkr-upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  width: 100%;
  pointer-events: none;
}

.hkr-upload-icon-sm { font-size: 20px; flex-shrink: 0; }

#hkr-upload-filename {
  flex: 1;
  color: var(--hkr-primary-light);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hkr-remove-file {
  pointer-events: all;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--hkr-error);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--hkr-transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.hkr-remove-file:hover { background: rgba(239,68,68,0.3); }

/* ============================================================
   DSGVO-BOX
   ============================================================ */
.hkr-dsgvo-box {
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--hkr-radius-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.hkr-dsgvo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--hkr-transition);
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.hkr-dsgvo-header:hover { background: rgba(124,58,237,0.1); }

.hkr-dsgvo-icon { font-size: 16px; flex-shrink: 0; }

.hkr-dsgvo-header strong {
  flex: 1;
  font-size: 13px;
  color: var(--hkr-primary-light);
  line-height: 1.4;
}

.hkr-dsgvo-arrow {
  font-size: 10px;
  color: var(--hkr-muted);
  transition: transform var(--hkr-transition);
  flex-shrink: 0;
}

.hkr-arrow-open { transform: rotate(180deg); }

.hkr-dsgvo-content {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(124,58,237,0.15);
}

.hkr-dsgvo-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hkr-dsgvo-list li {
  font-size: 13px;
  color: var(--hkr-muted);
  line-height: 1.55;
  padding-left: 10px;
  border-left: 2px solid rgba(124,58,237,0.3);
  word-break: break-word;
}

.hkr-dsgvo-list li strong { color: var(--hkr-text); }
.hkr-dsgvo-list li a      { color: var(--hkr-primary-light); text-decoration: underline; }

/* ============================================================
   CONSENT-CHECKBOX
   ============================================================ */
.hkr-consent-field { margin-bottom: 30px; }

.hkr-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hkr-consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.hkr-consent-box {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 2px solid var(--hkr-border);
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  transition: all var(--hkr-transition);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

.hkr-consent-label input[type="checkbox"]:checked + .hkr-consent-box {
  background: var(--hkr-primary);
  border-color: var(--hkr-primary);
}

.hkr-consent-label input[type="checkbox"]:checked + .hkr-consent-box::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.hkr-consent-text {
  font-size: 13px;
  color: var(--hkr-muted);
  line-height: 1.65;
}

.hkr-consent-text a {
  color: var(--hkr-primary-light);
  text-decoration: underline;
}

/* ============================================================
   SUBMIT-BUTTON
   ============================================================ */
.hkr-form-footer { margin-top: 4px; }

.hkr-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--hkr-primary) 0%, #5b21b6 100%);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none;
  border-radius: var(--hkr-radius-sm);
  font-family: 'Syne', sans-serif;
  font-size: var(--hkr-btn);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--hkr-transition);
  box-shadow: 0 8px 24px rgba(124,58,237,0.35);
  position: relative;
  overflow: hidden;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hkr-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--hkr-transition);
}

.hkr-submit-btn:hover:not(:disabled)::before { opacity: 1; }
.hkr-submit-btn:hover:not(:disabled)  { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,58,237,0.45); }
.hkr-submit-btn:active:not(:disabled) { transform: translateY(0); }
.hkr-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.hkr-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hkr-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes hkr-spin { to { transform: rotate(360deg); } }

/* ============================================================
   FORMULAR-MELDUNG
   ============================================================ */
.hkr-form-message {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--hkr-radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.hkr-form-message.hkr-msg-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

.hkr-form-message.hkr-msg-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6ee7b7;
}

/* ============================================================
   SUCCESS-SCREEN
   ============================================================ */
.hkr-success-screen {
  text-align: center;
  padding: 20px 0;
  animation: hkr-fadeIn 0.5s ease;
}

@keyframes hkr-fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hkr-success-icon {
  font-size: 60px;
  margin-bottom: 16px;
  animation: hkr-bounce 0.6s ease;
}

@keyframes hkr-bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.hkr-success-screen h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}

.hkr-success-screen p {
  color: var(--hkr-muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 460px;
  margin: 0 auto 28px;
}

.hkr-success-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hkr-step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,0.15);
  border: 1px solid var(--hkr-border);
  border-radius: 40px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--hkr-text);
}

.hkr-step-num {
  background: var(--hkr-primary);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  flex-shrink: 0;
}

.hkr-step-arrow { color: var(--hkr-muted); font-size: 16px; }

/* ============================================================
   RESPONSIVE – TABLET  (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --hkr-pad-x: 28px;
    --hkr-pad-y: 36px;
    --hkr-gap:   16px;
    --hkr-title: 24px;
    --hkr-sub:   14px;
  }

  .hkr-form-wrap    { border-radius: 12px; margin-bottom: 24px; }
  .hkr-form-header  { margin-bottom: 32px; }
  .hkr-form-icon    { font-size: 40px; }
}

/* ============================================================
   RESPONSIVE – MOBIL  (max-width: 600px)
   ============================================================ */
@media (max-width: 600px) {
  :root {
    --hkr-pad-x: 18px;
    --hkr-pad-y: 28px;
    --hkr-gap:   0;
    --hkr-title: 21px;
    --hkr-sub:   13px;
    --hkr-inp:   16px;
    --hkr-btn:   16px;
  }

  /* Formular randlos – wirkt wie nativer App-Screen */
  .hkr-form-wrap {
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
    margin-left: 0;
    margin-right: 0;
  }

  /* Name + E-Mail untereinander */
  .hkr-field-group { grid-template-columns: 1fr; }

  .hkr-form-header { margin-bottom: 24px; }
  .hkr-form-icon   { font-size: 36px; margin-bottom: 8px; }

  /* Format-Kacheln: 2 Spalten */
  .hkr-format-grid   { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hkr-format-card   { padding: 10px 6px; min-height: 56px; }
  .hkr-format-card strong { font-size: 13px; }
  .hkr-format-card small  { font-size: 9px; }

  .hkr-upload-placeholder p { font-size: 13px; }

  .hkr-dsgvo-header strong { font-size: 12px; }
  .hkr-dsgvo-list li       { font-size: 12px; }
  .hkr-consent-text        { font-size: 12px; }

  /* Success-Steps untereinander */
  .hkr-success-steps   { flex-direction: column; align-items: stretch; gap: 8px; }
  .hkr-step-arrow      { display: none; }
  .hkr-step            { border-radius: 10px; justify-content: center; }
  .hkr-success-screen h3 { font-size: 19px; }
  .hkr-success-screen p  { font-size: 13px; }
}

/* ============================================================
   RESPONSIVE – SEHR KLEIN  (max-width: 380px, z.B. iPhone SE)
   ============================================================ */
@media (max-width: 380px) {
  :root {
    --hkr-pad-x: 14px;
    --hkr-pad-y: 22px;
  }

  .hkr-form-title       { font-size: 18px; }
  .hkr-format-grid      { gap: 6px; }
  .hkr-format-card      { padding: 8px 4px; min-height: 50px; }
  .hkr-format-card small { display: none; }
  .hkr-submit-btn       { font-size: 15px; padding: 14px 16px; }
}
