/* TPsolution Registration Form — Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=DM+Serif+Display:ital@0;1&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #F0F5F4;
  --surface:     #FFFFFF;
  --ink:         #0F2421;
  --ink-2:       #4A6560;
  --ink-3:       #8AADA8;
  --accent:      #027d67;
  --accent-dark: #015c4d;
  --accent-light:#E6F5F2;
  --danger:      #D04A3A;
  --success:     #027d67;
  --border:      rgba(2,125,103,0.12);
  --border-hover:rgba(2,125,103,0.3);
  --radius:      12px;
  --radius-sm:   8px;
  --shadow-lg:   0 12px 48px rgba(2,125,103,0.10), 0 4px 16px rgba(2,125,103,0.06);
}

body.tpsreg-page {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
}

.tpsreg-outer {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

.tpsreg-outer::before,
.tpsreg-outer::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: tpsregBlobFloat 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.tpsreg-outer::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #b3e8e0 0%, transparent 70%);
  top: -100px; right: -100px;
}
.tpsreg-outer::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #cff0ea 0%, transparent 70%);
  bottom: -80px; left: -80px;
  animation-delay: -6s;
}
@keyframes tpsregBlobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(30px,-20px) scale(1.05); }
  66%      { transform: translate(-20px,15px) scale(0.95); }
}

.tpsreg-wrapper {
  width: 100%;
  max-width: 580px;
  position: relative;
  z-index: 1;
}

/* Brand */
.tpsreg-brand {
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(-16px);
  animation: tpsregFadeDown 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s forwards;
}
.tpsreg-logo-img a,
.tpsreg-logo-img img {
  display: block;
  max-height: 60px;
  width: auto;
  margin: 0 auto;
}
.tpsreg-logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.3px;
}

/* Card */
.tpsreg-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  animation: tpsregFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.25s forwards;
}

.tpsreg-card-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.tpsreg-card-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #04c4a2 50%, var(--accent) 100%);
  background-size: 200% 100%;
  animation: tpsregShimmer 3s linear infinite;
}
@keyframes tpsregShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.tpsreg-card-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 26px; font-weight: 400;
  color: var(--ink); letter-spacing: -0.4px; margin-bottom: 4px;
}
.tpsreg-card-header h1 em { color: var(--accent); font-style: italic; }
.tpsreg-card-header p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }

.tpsreg-card-body { padding: 1.75rem 2rem 2rem; }

/* Progress */
.tpsreg-progress-bar {
  height: 2px; background: var(--border);
  border-radius: 99px; margin-bottom: 1.5rem; overflow: hidden;
}
.tpsreg-progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.22,1,0.36,1);
}

/* Steps */
.tpsreg-steps { display: flex; gap: 6px; margin-bottom: 1.75rem; align-items: center; }
.tpsreg-step-dot {
  height: 3px; border-radius: 99px; background: var(--border);
  transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}
.tpsreg-step-dot.active { background: var(--accent); flex: 2; }
.tpsreg-step-dot:not(.active) { flex: 1; }

/* Sections */
.tpsreg-section { display: none; flex-direction: column; gap: 14px; }
.tpsreg-section.active {
  display: flex;
  animation: tpsregSectionIn 0.5s cubic-bezier(0.22,1,0.36,1);
}
.tpsreg-section.exit {
  animation: tpsregSectionOut 0.28s cubic-bezier(0.4,0,1,1) forwards;
}
@keyframes tpsregSectionIn  { from { opacity:0; transform: translateX(30px); } to { opacity:1; transform: translateX(0); } }
@keyframes tpsregSectionOut { from { opacity:1; transform: translateX(0); } to { opacity:0; transform: translateX(-30px); } }

/* Stagger fields */
.tpsreg-section.active > * {
  opacity: 0;
  animation: tpsregFieldIn 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}
.tpsreg-section.active > *:nth-child(1) { animation-delay: 0.05s; }
.tpsreg-section.active > *:nth-child(2) { animation-delay: 0.1s; }
.tpsreg-section.active > *:nth-child(3) { animation-delay: 0.15s; }
.tpsreg-section.active > *:nth-child(4) { animation-delay: 0.2s; }
.tpsreg-section.active > *:nth-child(5) { animation-delay: 0.25s; }
.tpsreg-section.active > *:nth-child(6) { animation-delay: 0.3s; }
@keyframes tpsregFieldIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

.tpsreg-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpsreg-field { display: flex; flex-direction: column; gap: 5px; }

.tpsreg-label {
  font-size: 12px; font-weight: 500;
  color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase;
}
.tpsreg-label .req, .tpsreg-req { color: var(--accent); }

.tpsreg-field input[type="text"],
.tpsreg-field input[type="email"],
.tpsreg-field input[type="tel"],
.tpsreg-field input[type="url"] {
  width: 100%; height: 44px; padding: 0 14px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--ink);
  background: var(--accent-light);
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.tpsreg-field input::placeholder { color: var(--ink-3); }
.tpsreg-field input:hover { background: #d4eeea; }
.tpsreg-field input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2,125,103,0.15);
  transform: translateY(-1px);
}
.tpsreg-field input.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(208,74,58,0.1); }

.tpsreg-error {
  font-size: 12px; color: var(--danger); display: none;
  animation: tpsregShake 0.3s ease;
}
.tpsreg-error.show { display: block; }
@keyframes tpsregShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
}

/* Section label */
.tpsreg-section-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}
.tpsreg-section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Radio */
.tpsreg-radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpsreg-radio-option { position: relative; }
.tpsreg-radio-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tpsreg-radio-label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; background: var(--accent-light);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink-2);
  cursor: pointer; transition: all 0.2s cubic-bezier(0.22,1,0.36,1); user-select: none;
}
.tpsreg-radio-label .dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border-hover);
  transition: all 0.2s; position: relative; flex-shrink: 0;
}
.tpsreg-radio-option input:checked + .tpsreg-radio-label {
  background: var(--accent-light); border-color: var(--accent); color: var(--ink);
}
.tpsreg-radio-option input:checked + .tpsreg-radio-label .dot {
  border-color: var(--accent); background: var(--accent);
}
.tpsreg-radio-option input:checked + .tpsreg-radio-label .dot::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 6px; height: 6px; border-radius: 50%; background: white;
}
.tpsreg-radio-label:hover { border-color: var(--border-hover); transform: translateY(-1px); }

/* Consent */
.tpsreg-consent-list { display: flex; flex-direction: column; gap: 10px; }
.tpsreg-consent-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.tpsreg-consent-item:hover { border-color: var(--border-hover); background: var(--accent-light); }
.tpsreg-consent-item:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.tpsreg-consent-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.tpsreg-checkbox-box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--border-hover); background: white;
  flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s cubic-bezier(0.22,1,0.36,1);
  position: relative; z-index: 1; pointer-events: none;
}
.tpsreg-consent-item input[type="checkbox"]:checked ~ .tpsreg-checkbox-box {
  background: var(--accent); border-color: var(--accent); transform: scale(1.1);
}
.tpsreg-checkbox-check {
  width: 10px; height: 7px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px,-1px);
  opacity: 0; transition: opacity 0.15s 0.05s;
  pointer-events: none;
}
.tpsreg-consent-item input[type="checkbox"]:checked ~ .tpsreg-checkbox-box .tpsreg-checkbox-check { opacity: 1; }
.tpsreg-consent-text { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.tpsreg-consent-text strong { color: var(--ink); font-weight: 500; }

/* Buttons */
.tpsreg-btn-row { display: flex; gap: 10px; margin-top: 8px; }
.tpsreg-btn {
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22,1,0.36,1);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tpsreg-btn:active { transform: scale(0.97); }
.tpsreg-btn-primary {
  background: var(--accent); color: white; padding: 13px 28px; flex: 1;
}
.tpsreg-btn-primary:hover {
  background: var(--accent-dark); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(2,125,103,0.3);
}
.tpsreg-btn-ghost {
  background: transparent; color: var(--ink-2); padding: 13px 20px;
  border: 1.5px solid var(--border);
}
.tpsreg-btn-ghost:hover { border-color: var(--border-hover); background: var(--accent-light); }
.tpsreg-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Success */
.tpsreg-success {
  display: none; flex-direction: column; align-items: center;
  padding: 3rem 2rem; text-align: center; gap: 16px;
}
.tpsreg-success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  animation: tpsregPopIn 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes tpsregPopIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tpsreg-success h2 {
  font-family: 'DM Serif Display', serif; font-size: 22px;
  color: var(--ink); font-weight: 400;
}
.tpsreg-success p { font-size: 14px; color: var(--ink-2); line-height: 1.6; max-width: 320px; }

/* Footer */
.tpsreg-card-footer {
  padding: 1rem 2rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light);
}
.tpsreg-footer-brand { font-size: 12px; color: var(--ink-3); }
.tpsreg-footer-brand strong { color: var(--ink-2); font-weight: 500; }
.tpsreg-secure {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-3);
}

@keyframes tpsregFadeDown { from { opacity:0; transform: translateY(-16px); } to { opacity:1; transform: translateY(0); } }
@keyframes tpsregFadeUp   { from { opacity:0; transform: translateY(24px);  } to { opacity:1; transform: translateY(0); } }
@keyframes tpsregSpin     { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .tpsreg-row-2 { grid-template-columns: 1fr; }
  .tpsreg-card-body { padding: 1.5rem; }
  .tpsreg-card-header { padding: 1.5rem; }
  .tpsreg-card-footer { flex-direction: column; gap: 6px; text-align: center; }
}
