/* Register Modal Styles */
.r-register-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.r-register-modal {
  background: white;
  border-radius: 8px;
  width: 100%;
  max-width: fit-content;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.25);
}

.r-register-modal-close-top {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--grey--600);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 1000;
  line-height: 1;
}

.r-register-modal-close-top:hover {
  background-color: var(--grey--100);
  color: var(--grey--900);
}

.r-register-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.r-register-modal-initial {
  max-width: 871px;
}

/* Success state layout */
.r-register-modal-success {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  height: 100%;
  overflow-y: auto;
  max-height: 90vh;
}

.r-register-success-body {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.r-success-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.r-success-section-media {
  flex-direction: row;
  justify-content: flex-start;
  gap: 16px;
}

.r-success-section h3 {
  font-size: 22px;
  line-height: 26px;
  font-family: Amsi Pro Narrow, Arial, sans-serif;
  font-weight: bold;
  color: var(--green--500);
  margin: 0;
}

.r-success-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--grey--900);
}

.r-success-section p {
  font-size: 16px;
  line-height: 24px;
  margin: 0;
  color: var(--grey--900);
}

.r-success-link {
  color: var(--grey--900);
  text-decoration: underline;
  font-weight: 600;
}

.r-success-media {
  min-width: 110px;
  min-height: 124px;
  border-radius: 6px;
  overflow: hidden;
}

.r-success-media-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.r-success-image {
  width: 100px;
  height: 124px;
  display: block;
}

.r-register-success-footer {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.r-success-complete-btn {
  align-self: flex-start;
}

.r-success-close-btn {
  width: 100%;
  box-shadow: none;
}

.r-register-modal-header-mobile {
  display: none;
  padding: 20px;
  border-bottom: 1px solid #e2e8ef;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
  align-items: center;
  justify-content: space-between;
}

.r-register-modal-header-mobile h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--grey--900);
}

.r-register-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--grey--600);
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.r-register-modal-close:hover {
  background-color: var(--grey--100);
  color: var(--grey--900);
}

.r-register-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.r-register-modal-info {
  max-width: 310px;
  flex: 1;
  background: var(--grey--50);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 600px;
  overflow-y: auto;
  max-height: 90vh;
}

.r-register-modal-banner {
  width: 100%;
  height: fit-content;
  min-height: 123px;
  background: var(--green--500);
  display: flex;
  flex-direction: row;
  text-align: center;
  position: relative;
  padding: 24px;
  padding-right: 0;
  overflow: hidden;
}

/* Success banner clones */
.r-register-modal-success-banner {
  width: 100%;
  height: fit-content;
  min-height: 123px;
  background: var(--green--500);
  display: flex;
  flex-direction: row;
  text-align: center;
  position: relative;
  padding: 24px;
  padding-right: 0;
  overflow: hidden;
}

.r-register-modal-banner-title {
  color: var(--yellow--500);
  font-size: 25px;
  line-height: 26px;
  font-weight: bold;
  font-family: Amsi Pro Narrow, Arial, sans-serif;
  text-align: left;
  margin: 0;
  z-index: 1;
  width: 194px;
}

.r-register-modal-success-banner-title {
  color: var(--yellow--500);
  font-size: 25px;
  line-height: 26px;
  font-weight: bold;
  font-family: Amsi Pro Narrow, Arial, sans-serif;
  text-align: left;
  margin: 0;
  z-index: 1;
  width: 424px;
}

.r-register-modal-banner-title span {
  color: #fff;
}

.r-register-modal-success-banner-title span {
  color: #fff;
}

.r-register-modal-banner-logo {
  height: 86px;
  width: auto;
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
}

.r-register-modal-success-banner-logo {
  height: 78px;
  width: 88px;
  width: auto;
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
}

.r-register-modal-info-body {
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
}
.r-register-modal-info-body h3 {
  color: var(--grey--900);
  font-size: 18px;
  line-height: 20px;
  font-weight: bold;
  margin-bottom: 24px;
}

.r-register-modal-steps {
  color: var(--grey--900);
  list-style: none;
  padding: 0;
  margin: 0;
}

.r-register-modal-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 8px;
}

.r-step-number {
  color: var(--yellow--500);
  padding: 0;
  width: 16px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-weight: bold;
  font-family: Amsi Pro Narrow, Arial, sans-serif;
  font-size: 20px;
  line-height: 20px;
  flex-shrink: 0;
}

.r-step-content h4 {
  font-size: 18px;
  line-height: 20px;
  font-weight: bold;
  text-transform: uppercase;
  font-family: Amsi Pro Narrow, Arial, sans-serif;
  margin: 0;
}

.r-step-content p {
  font-size: 13px;
  font-weight: 400;
  line-height: 17px;
  margin: 0;
}

.r-register-modal-info-divider {
  border: none;
  border-top: 1px solid var(--grey--300);
  margin: 0;
  padding: 0;
}

.r-register-modal-stat {
  color: var(--grey--900);
  text-align: left;
  padding: 24px;
  padding-top: 0;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.r-register-modal-stat h2 {
  font-size: 36px;
  line-height: 34px;
  font-weight: 900;
  margin: 0;
  color: var(--green--500);
  font-family: Amsi Pro Narrow, Arial, sans-serif;
}

.r-register-modal-stat p {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  margin: 0;
  font-family: Roboto, Arial, sans-serif;
}

.r-register-modal-stat small {
  font-size: 12px;
  line-height: 14px;
  font-weight: 400;
  font-style: italic;
  opacity: 0.6;
  margin: 0;
  font-family: Roboto, Arial, sans-serif;
}

.r-register-modal-form {
  flex: 1;
  overflow-y: auto;
  background: white;
  max-height: calc(90vh - 64px);
  min-height: 0;
  padding: 32px 16px 32px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.r-register-modal-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex-grow: 1;
}

.r-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.r-form-section h3 {
  font-size: 20px;
  line-height: 24px;
  font-family: Amsi Pro Narrow, Arial, sans-serif;
  font-weight: bold;
  color: var(--grey--900);
  margin: 0;
  text-transform: none;
}

.r-form-row-two {
  display: flex;
  gap: 12px;
}

.r-form-field {
  flex: 1;
}

.r-form-row label {
  display: block;
  font-weight: semibold;
  margin-bottom: 6px;
  font-size: 15px;
  color: #1a1a1a;
}

.r-form-row input,
.r-form-row select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--grey--200);
  border-radius: 100px;
  font-size: 15px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  height: 48px;
  box-shadow: none !important;
}

.r-form-row input:hover,
.r-form-row select:hover,
.r-form-row input:focus,
.r-form-row select:focus,
.r-form-row input:active,
.r-form-row select:active {
  outline: none;
  border-color: var(--grey--900);
}

.r-button-group {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.r-toggle-btn {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--grey--200);
  background: white;
  color: var(--grey--900);
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 48px;
  text-align: left;
}

.r-toggle-btn.active {
  background: var(--yellow--500);
  border-color: var(--grey--800);
}

.r-toggle-btn:hover:not(.active) {
  border-color: var(--grey--500);
  color: var(--grey--500);
}

/* Error state for toggle buttons */
.r-button-group.error .r-toggle-btn {
  border-color: #990000 !important;
}

.r-privacy-notice {
  font-size: 16px;
  font-weight: 400;
  color: var(--grey--900);
  line-height: 1.5;
  margin: 0;
}

.r-privacy-notice a {
  color: var(--grey--900);
  text-decoration: underline;
}

/* Alert Card Styles */
.r-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  border: 1px solid;
}

.r-alert-card-yellow {
  background-color: #FFA10033;
  border-color: var(--yellow--500);
  color: var(--grey--900);
  font-family: Roboto, Arial, sans-serif;
}

.r-alert-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.r-alert-content h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.r-alert-content p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.r-alert-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--grey--900);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.r-alert-link:hover {
  color: #78350f;
}

/* Form sections that can be hidden */
.r-form-section.hidden {
  display: none;
}

/* Error message styles */
.r-field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #990000;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.r-field-error-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.r-field-error-text {
  flex: 1;
}

/* Error state for form fields */
.r-form-row input.error,
.r-form-row select.error {
  border-color: #990000 !important;
  box-shadow: none;
}

/* Custom Dropdown Styles */
.r-custom-dropdown {
  position: relative;
  width: 100%;
}

.r-custom-dropdown-toggle {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--grey--200);
  border-radius: 100px;
  font-size: 15px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  height: 48px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.r-custom-dropdown-toggle:hover,
.r-custom-dropdown-toggle:focus,
.r-custom-dropdown-toggle:active {
  outline: none;
  border-color: var(--grey--900);
}

.r-custom-dropdown-toggle.error {
  border-color: #990000 !important;
}

.r-custom-dropdown-toggle .r-dropdown-text {
  flex: 1;
  color: var(--grey--900);
}

.r-custom-dropdown-toggle .r-dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
  color: var(--grey--600);
}

.r-custom-dropdown.open .r-dropdown-arrow {
  transform: rotate(180deg);
}

.r-custom-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
  display: none;
}

.r-custom-dropdown.open .r-custom-dropdown-menu {
  display: block;
}

.r-custom-dropdown-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: var(--grey--900);
  font-size: 15px;
  border-bottom: 1px solid var(--grey--100);
}

.r-custom-dropdown-option:last-child {
  border-bottom: none;
}

.r-custom-dropdown-option:hover {
  background-color: #007D571A;
}

.r-custom-dropdown-option.selected {
  background-color: #007D571A;
  color: var(--grey--900);
}

.r-custom-dropdown-option.placeholder {
  color: var(--grey--500);
}

.r-register-modal-footer.hidden {
  display: none;
}

.r-register-modal-footer {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.r-register-modal-footer-mobile {
  display: none;
  padding: 20px 16px;
  background: white;
  position: sticky;
  bottom: 0;
  z-index: 10;
  gap: 15px;
}

.w-submit {
  flex-grow: 1;
}

.w-cancel {
  box-shadow: none;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
  .r-register-modal-overlay {
    padding: 0;
  }
  
  .r-register-modal {
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }
  
  .r-register-modal-content {
    height: 100vh;
  }

  /* Success view: keep single column and full-width primary button */
  .r-register-modal-success .r-success-complete-btn {
    width: 100%;
  }
  
  /* Mobile close button positioning */
  .r-register-modal-close-top.mobile-close {
    display: flex;
    position: absolute;
    top: 130px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    z-index: 1001;
  }
  
  .r-register-modal-header-mobile {
    display: flex;
  }
  
  .r-register-modal-body {
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
  }
  
  .r-register-modal-info {
    padding: 0 ;
    width: 100%;
    min-height: auto;
    max-width: none;
    height: fit-content;
    flex: none;
  }
  
  .r-register-modal-info-body {
    display: none;
  }
  
  .r-register-modal-info-footer {
    display: none;
  }
  
  .r-register-modal-banner h1 {
    font-size: 24px;
  }
  
  .r-register-modal-banner-logo {
    width: 88px;
    position: absolute;
    bottom: 24px;
    right: 24px;
  }

  .r-register-modal-banner-title {
    max-width: 219px;
    font-size: 26px;
    line-height: 26px;
  }
  
  .r-register-modal-info-body h3 {
    font-size: 20px;
  }
  
  .r-register-modal-step {
    margin-bottom: 25px;
  }
  
  .r-step-number {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .r-step-content h4 {
    font-size: 16px;
  }
  
  .r-step-content p {
    font-size: 14px;
  }
  
  .r-register-modal-stat h2 {
    font-size: 36px;
  }
  
  .r-register-modal-stat p {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    font-family: Roboto, Arial, sans-serif;
  }
  
  .r-register-modal-form {
    padding: 20px 16px;
    overflow-y: auto;
  }
  
  .r-form-row-two {
    flex-direction: column;
    gap: 16px;
  }
  
  .r-register-modal-button-group {
    display: flex !important;
    flex-direction: row !important;
  }
  
  .r-register-modal-button-group .r-toggle-btn {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .r-register-modal-footer {
    display: none;
  }
  
  .r-register-modal-footer-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding-right: 24px;
    width: 100%;
    display: flex;
  }

  .r-register-modal-success {
    max-height: 100vh;
  }
  
  .r-register-success-body {
    padding: 20px 16px;
    gap: 24px;
  }

  .r-privacy-notice {
    padding-bottom: 80px;
  }

  .r-register-modal-success-banner-title {
    width: 245px;
    font-size: 18px;
    line-height: 22px;
  }

  .r-register-modal-success-banner-logo {
    right: 16px;
  }

  .r-alert-card {
    margin: 0;
  }
}

@media screen and (max-width: 480px) {
  .r-register-modal-info {
    padding: 0;
    height: fit-content;
    flex: none;
    width: 100%;
  }
  
  .r-register-modal-banner h1 {
    font-size: 20px;
  }
  
  .r-register-modal-info-body h3 {
    font-size: 18px;
  }
  
  .r-form-section h3 {
    font-size: 18px;
  }
}
