/* ===========================
   Signup Page — Custom CSS
   No Bootstrap, No MDB
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: #ddd;
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1d3c59;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- Navbar --- */
.kst-navbar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #212529;
}
.kst-navbar img {
  height: 40px;
}

/* --- Signup Container (Card) --- */
.kst-signup-container {
  max-width: 640px;
  margin: 40px auto;
  padding: 40px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* --- Progress Steps --- */
.kst-progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}
.kst-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.kst-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ccc;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.3s, transform 0.3s;
}
.kst-step.active .kst-step-circle,
.kst-step.completed .kst-step-circle {
  background-color: #1d3c59;
  transform: scale(1.1);
}
.kst-step.completed .kst-step-circle {
  background-color: #5cb85c;
}
.kst-step-label {
  margin-top: 6px;
  font-size: 12px;
  color: #999;
  font-weight: 500;
  transition: color 0.3s;
}
.kst-step.active .kst-step-label,
.kst-step.completed .kst-step-label {
  color: #1d3c59;
}
.kst-step-line {
  flex: 1;
  height: 3px;
  background-color: #ccc;
  margin: 0 8px;
  margin-bottom: 20px;
  transition: background-color 0.3s;
}
.kst-step-line.completed {
  background-color: #5cb85c;
}

/* --- Section Heading --- */
.kst-section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 500;
  color: #1d3c59;
  margin-bottom: 6px;
}
.kst-section-subtitle {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}
.kst-section-subtitle a {
  color: #1d3c59;
  font-weight: 500;
}

/* --- Form Layout --- */
.kst-form {
  max-width: 420px;
  margin: 0 auto;
}

/* --- Floating-label Input Group --- */
.kst-input-group {
  position: relative;
  margin-bottom: 24px;
}
.kst-input-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: border-color 0.25s;
  appearance: none;
}
.kst-input-group input:focus {
  border-color: #1d3c59;
}
.kst-input-group input.has-error {
  border-color: #d9534f;
}
.kst-input-group label {
  position: absolute;
  left: 14px;
  top: 23px;
  transform: translateY(-50%);
  font-size: 15px;
  color: #999;
  pointer-events: none;
  transition: all 0.2s ease;
  background: #fff;
  padding: 0 4px;
}
.kst-input-group input:focus + label,
.kst-input-group input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: #1d3c59;
}
.kst-input-group input.has-error:focus + label,
.kst-input-group input.has-error:not(:placeholder-shown) + label {
  color: #d9534f;
}
/* --- Password Toggle --- */
.kst-input-group--password input {
  padding-right: 44px;
}
.kst-password-toggle {
  position: absolute;
  right: 10px;
  top: 23px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kst-password-toggle:hover {
  color: #1d3c59;
}
.kst-password-toggle svg {
  width: 20px;
  height: 20px;
}

.kst-field-error {
  font-size: 12px;
  color: #d9534f;
  margin-top: 4px;
  padding-left: 4px;
}
.kst-field-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
  padding-left: 4px;
}

/* --- Checkbox --- */
.kst-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  text-align: left;
}
.kst-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #1d3c59;
  flex-shrink: 0;
  cursor: pointer;
}
.kst-checkbox a {
  color: #1d3c59;
  text-decoration: underline;
}

/* --- Searchable Select --- */
.kst-select-wrapper {
  position: relative;
  margin-bottom: 24px;
}
.kst-select-label {
  font-size: 12px;
  color: #1d3c59;
  margin-bottom: 4px;
  display: block;
  font-weight: 500;
}
.kst-select-trigger {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.25s;
  color: #333;
  text-align: left;
}
.kst-select-trigger:focus {
  border-color: #1d3c59;
  outline: none;
}
.kst-select-trigger.has-error {
  border-color: #d9534f;
}
.kst-select-trigger .kst-select-arrow {
  border: solid #999;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}
.kst-select-trigger .kst-select-arrow.open {
  transform: rotate(-135deg);
}
.kst-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #ccc;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.kst-select-search {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: none;
  border-bottom: 1px solid #eee;
  outline: none;
  font-family: inherit;
}
.kst-select-option {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.kst-select-option:hover,
.kst-select-option.highlighted {
  background-color: #f0f4f8;
}
.kst-select-option.selected {
  background-color: #e8eef4;
  font-weight: 500;
}
.kst-select-no-results {
  padding: 10px 14px;
  font-size: 14px;
  color: #999;
}
.kst-select-placeholder {
  color: #999;
}

/* --- Buttons --- */
.kst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s, transform 0.1s;
  text-transform: none;
  letter-spacing: 0.3px;
}
.kst-btn:active {
  transform: scale(0.98);
}
.kst-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.kst-btn-primary {
  background-color: #1d3c59;
  color: #fff;
}
.kst-btn-primary:hover:not(:disabled) {
  background-color: #162e45;
}
.kst-btn-secondary {
  background-color: #fff;
  color: #1d3c59;
  border: 1.5px solid #1d3c59;
}
.kst-btn-secondary:hover:not(:disabled) {
  background-color: #f0f4f8;
}
.kst-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.kst-btn-row .kst-btn {
  flex: 1;
}

/* --- Loading Spinner --- */
.kst-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: kst-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes kst-spin {
  to { transform: rotate(360deg); }
}

/* --- Stripe Card Container --- */
.kst-stripe-card {
  padding: 14px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: border-color 0.25s;
}
.kst-stripe-card:focus-within {
  border-color: #1d3c59;
}
.kst-stripe-card.has-error {
  border-color: #d9534f;
}
.kst-card-errors {
  font-size: 12px;
  color: #d9534f;
  min-height: 18px;
  margin-bottom: 16px;
  padding-left: 4px;
}

/* --- Pricing Text --- */
.kst-pricing {
  font-size: 14px;
  color: #555;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.6;
}
.kst-pricing a {
  color: #1d3c59;
  font-weight: 500;
  text-decoration: underline;
}

/* --- Footnote --- */
.kst-footnote {
  font-size: 12px;
  color: #777;
  margin-top: 20px;
  text-align: center;
  line-height: 1.5;
}

/* --- Footer --- */
.kst-footer {
  text-align: center;
  font-size: 14px;
  padding: 16px;
  color: #555;
}
.kst-footer a {
  color: #555;
  text-decoration: none;
}
.kst-footer a:hover {
  text-decoration: underline;
}

/* --- Step Transitions --- */
.slide-left-enter-active,
.slide-left-leave-active,
.slide-right-enter-active,
.slide-right-leave-active {
  transition: all 0.35s ease;
}
.slide-left-enter {
  opacity: 0;
  transform: translateX(40px);
}
.slide-left-leave-to {
  opacity: 0;
  transform: translateX(-40px);
}
.slide-right-enter {
  opacity: 0;
  transform: translateX(-40px);
}
.slide-right-leave-to {
  opacity: 0;
  transform: translateX(40px);
}

/* --- Toast Notifications --- */
.kst-toast-container {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.kst-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 40px 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  line-height: 1.4;
  border-left: 5px solid;
}
.kst-toast-error {
  background-color: #1e4163;
  border-left-color: #ff674c;
}
.kst-toast-success {
  background-color: #1e4163;
  border-left-color: #00df00;
}
.kst-toast-warning {
  background-color: #1e4163;
  border-left-color: #ff9600;
}
.kst-toast-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.kst-toast-close:hover {
  color: #fff;
}

/* Toast transitions */
.toast-enter-active {
  animation: toast-in 0.35s ease;
}
.toast-leave-active {
  animation: toast-out 0.3s ease;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(60px);
  }
}

/* --- Success Modal --- */
.kst-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: kst-fade-in 0.3s ease;
}
.kst-modal {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: kst-scale-in 0.3s ease;
}
.kst-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #5cb85c;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.kst-modal-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kst-modal h3 {
  color: #1d3c59;
  margin-bottom: 8px;
  font-size: 20px;
}
.kst-modal p {
  color: #666;
  font-size: 14px;
}
@keyframes kst-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes kst-scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Responsive --- */
@media (max-width: 680px) {
  .kst-signup-container {
    margin: 16px;
    padding: 24px 20px;
  }
  .kst-step-label {
    font-size: 10px;
  }
  .kst-step-circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .kst-btn-row {
    flex-direction: column;
  }
  .kst-section-title {
    font-size: 18px;
  }
}

@media (max-width: 400px) {
  .kst-signup-container {
    margin: 8px;
    padding: 20px 16px;
  }
  .kst-step-label {
    display: none;
  }
}
