/* =========================================================
   GROWTHSPELL CONNECT POPUP MODAL STYLING
   Glassmorphism, vibrant green accents, modern inputs,
   smooth entrance/exit, and fully mobile responsive.
========================================================= */

.gs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 19, 14, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.gs-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gs-modal-container {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border: 1px solid rgba(25, 216, 117, 0.35);
  border-radius: 20px;
  padding: 36px 36px 32px;
  box-shadow:
    0 25px 60px -15px rgba(2, 26, 19, 0.45),
    0 0 0 1px rgba(25, 216, 117, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Inter", sans-serif;
  color: #04271d;
  box-sizing: border-box;
}

.gs-modal-backdrop.is-open .gs-modal-container {
  transform: scale(1) translateY(0);
}

/* Custom scrollbar for modal */
.gs-modal-container::-webkit-scrollbar {
  width: 6px;
}
.gs-modal-container::-webkit-scrollbar-track {
  background: transparent;
}
.gs-modal-container::-webkit-scrollbar-thumb {
  background: rgba(4, 39, 29, 0.15);
  border-radius: 6px;
}

/* Close Button */
.gs-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f6f3;
  border: 1px solid rgba(4, 39, 29, 0.08);
  color: #40534c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.gs-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.gs-modal-close:hover {
  background: #04271d;
  color: #19d875;
  transform: rotate(90deg);
}

/* Header */
.gs-modal-header {
  margin-bottom: 22px;
  text-align: left;
}

.gs-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: rgba(25, 216, 117, 0.12);
  border: 1px solid rgba(25, 216, 117, 0.3);
  border-radius: 100px;
  color: #0c9c4f;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.gs-modal-badge span:first-child {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #19d875;
  box-shadow: 0 0 8px #19d875;
}

.gs-modal-title {
  margin: 0 0 6px;
  font-size: clamp(23px, 3.2vw, 27px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #04271d;
}

.gs-modal-title span {
  color: #0daf5b;
}

.gs-modal-subtitle {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #63756e;
}

/* Form */
.gs-modal-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.gs-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gs-form-label {
  font-size: 12.5px;
  font-weight: 650;
  color: #16362c;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gs-req {
  color: #0daf5b;
  font-weight: 700;
}

.gs-opt {
  color: #8c9b94;
  font-size: 11px;
  font-weight: 400;
}

.gs-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gs-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #72857e;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 0.2s ease;
}

.gs-form-input,
.gs-form-select,
.gs-form-textarea {
  width: 100%;
  background: #f7faf8;
  border: 1.5px solid #dce5e0;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14px;
  color: #04271d;
  padding: 12px 14px 12px 42px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.gs-form-input::placeholder,
.gs-form-textarea::placeholder {
  color: #98a7a0;
  font-size: 13.5px;
}

.gs-form-input:focus,
.gs-form-select:focus,
.gs-form-textarea:focus {
  background: #ffffff;
  border-color: #0daf5b;
  box-shadow: 0 0 0 3.5px rgba(25, 216, 117, 0.18);
}

.gs-input-wrap:focus-within .gs-input-icon {
  stroke: #0daf5b;
}

.gs-select-wrap {
  position: relative;
}

.gs-form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
}

.gs-select-arrow {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #72857e;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.gs-select-wrap:focus-within .gs-select-arrow {
  stroke: #0daf5b;
}

.gs-textarea-wrap {
  align-items: flex-start;
}

.gs-form-textarea {
  padding: 12px 14px;
  resize: vertical;
  min-height: 72px;
  max-height: 150px;
}

.gs-field-error {
  font-size: 11.5px;
  color: #dc2626;
  font-weight: 500;
  display: none;
  margin-top: 2px;
}

.gs-field-error.is-active {
  display: block;
}

/* Status message */
.gs-form-status {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 550;
  text-align: center;
}

.gs-form-status.is-success {
  display: block !important;
  background: #e7f9f0;
  border: 1px solid #94e8bd;
  color: #09753c;
}

.gs-form-status.is-error {
  display: block !important;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

/* Submit Button */
.gs-modal-submit {
  width: 100%;
  min-height: 50px;
  background: linear-gradient(135deg, #09bc64 0%, #069c51 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 160, 80, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow:
    0 10px 22px rgba(9, 188, 100, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  margin-top: 4px;
}

.gs-modal-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #07b05d 0%, #058f4a 100%);
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(9, 188, 100, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.gs-modal-submit:active:not(:disabled) {
  transform: translateY(0);
}

.gs-modal-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.gs-submit-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.gs-modal-submit:hover:not(:disabled) .gs-submit-icon {
  transform: translateX(3px);
}

/* Spinner */
.gs-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: gsSpin 0.7s linear infinite;
}

.gs-modal-submit.is-loading .gs-submit-text,
.gs-modal-submit.is-loading .gs-submit-icon {
  display: none;
}

.gs-modal-submit.is-loading .gs-spinner {
  display: inline-block;
}

@keyframes gsSpin {
  to { transform: rotate(360deg); }
}

.gs-modal-privacy {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11.5px;
  color: #798d84;
  text-align: center;
}

.gs-modal-privacy svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .gs-modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .gs-modal-container {
    max-height: 94vh;
    border-radius: 20px 20px 14px 14px;
    padding: 26px 20px 22px;
  }

  .gs-modal-title {
    font-size: 21px;
  }

  .gs-modal-subtitle {
    font-size: 12.5px;
  }

  .gs-form-input,
  .gs-form-select,
  .gs-form-textarea {
    font-size: 14px;
    padding: 11px 12px 11px 38px;
  }

  .gs-input-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .gs-modal-submit {
    min-height: 48px;
    font-size: 14.5px;
  }
}

/* =========================================================
   DEDICATED SUCCESS MODAL VIEW & ANIMATIONS
========================================================= */
.gs-modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 6px 4px;
  animation: gsSuccessFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes gsSuccessFadeIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Success Checkmark Animation */
.gs-success-icon-wrap {
  position: relative;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 16px;
}

.gs-success-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 216, 117, 0.28) 0%, rgba(25, 216, 117, 0) 70%);
  animation: gsPulseRing 2.4s ease-in-out infinite;
}

.gs-success-ring-outer {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(25, 216, 117, 0.35);
  animation: gsRotateSlow 16s linear infinite;
}

@keyframes gsPulseRing {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.22);
    opacity: 1;
  }
}

@keyframes gsRotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gs-success-check {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: block;
  stroke-width: 3.2;
  stroke: #0daf5b;
  stroke-miterlimit: 10;
  box-shadow: 0 10px 24px rgba(13, 175, 91, 0.28);
}

.gs-success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke: #10b981;
  fill: #e7f9f0;
  animation: gsStrokeCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.gs-success-check-path {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #058f4a;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: gsStrokeCheck 0.45s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes gsStrokeCircle {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes gsStrokeCheck {
  100% {
    stroke-dashoffset: 0;
  }
}

.gs-badge-success {
  background: rgba(25, 216, 117, 0.16) !important;
  border-color: rgba(25, 216, 117, 0.45) !important;
  color: #088c47 !important;
  margin-bottom: 12px !important;
}

.gs-success-title {
  margin: 0 0 8px;
  font-size: clamp(23px, 3.2vw, 27px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: #04271d;
}

.gs-success-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: #556961;
  max-width: 440px;
}

.gs-success-summary {
  width: 100%;
  background: #f5f9f6;
  border: 1px solid #dcece2;
  border-radius: 13px;
  padding: 12px 18px;
  margin-bottom: 22px;
  box-sizing: border-box;
}

.gs-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
}

.gs-summary-item:not(:last-child) {
  border-bottom: 1px solid rgba(4, 39, 29, 0.08);
}

.gs-summary-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6d8179;
}

.gs-summary-val {
  font-size: 13.5px;
  font-weight: 650;
  color: #04271d;
  text-align: right;
  word-break: break-word;
}

.gs-success-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gs-success-btn-done {
  width: 100%;
  min-height: 50px;
  background: linear-gradient(135deg, #09bc64 0%, #069c51 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 160, 80, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow:
    0 10px 22px rgba(9, 188, 100, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gs-success-btn-done:hover {
  background: linear-gradient(135deg, #07b05d 0%, #058f4a 100%);
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(9, 188, 100, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.gs-success-btn-done svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gs-success-btn-reset {
  background: transparent;
  border: none;
  color: #0daf5b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.gs-success-btn-reset:hover {
  color: #078c48;
}

.gs-success-footer-note {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11.5px;
  color: #798d84;
}

.gs-success-footer-note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

/* =========================================================
   FLOATING POPUP SUCCESS TOAST
========================================================= */
.gs-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.gs-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #04271d;
  color: #ffffff;
  border: 1px solid rgba(25, 216, 117, 0.45);
  border-radius: 14px;
  box-shadow:
    0 16px 36px rgba(2, 26, 19, 0.4),
    0 0 0 1px rgba(25, 216, 117, 0.2);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  line-height: 1.4;
  transform: translateY(-20px) scale(0.95);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  max-width: 380px;
}

.gs-toast.is-show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.gs-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(25, 216, 117, 0.18);
  border: 1px solid rgba(25, 216, 117, 0.4);
  color: #19d875;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gs-toast-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gs-toast-content {
  flex: 1;
}

.gs-toast-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 13.5px;
}

.gs-toast-message {
  color: #a2bbb2;
  font-size: 12px;
  margin-top: 2px;
}

.gs-toast-close {
  background: transparent;
  border: none;
  color: #7d968d;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.gs-toast-close:hover {
  color: #ffffff;
}

.gs-toast-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

@media (max-width: 600px) {
  .gs-toast-container {
    top: 16px;
    left: 16px;
    right: 16px;
    align-items: center;
  }
  .gs-toast {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}

