/* ==========================================================================
   Argi Medical — Registration experience v2
   Additive styles for the website registration modal.
   ========================================================================== */

.reg-card.reg-card-v2 {
  width: 100%;
  max-width: 1080px;
  padding: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--auth-line) 75%, transparent);
  background: var(--card);
  box-shadow: 0 34px 120px rgba(3, 29, 38, .34);
  max-height: calc(100dvh - 48px);
  transform: translateY(26px) scale(.98);
}

.reg-overlay.active .reg-card.reg-card-v2 {
  transform: translateY(0) scale(1);
}

.reg-card-v2 .reg-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--auth-teal) transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 127, 120, .055), transparent 34%),
    var(--card);
}

.reg-card-v2 .reg-main::-webkit-scrollbar { width: 7px; }
.reg-card-v2 .reg-main::-webkit-scrollbar-track { background: transparent; }
.reg-card-v2 .reg-main::-webkit-scrollbar-thumb {
  background: var(--auth-teal);
  border: 2px solid var(--card);
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Brand aside
   -------------------------------------------------------------------------- */
.reg-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 35px 30px 30px;
  overflow: hidden;
  isolation: isolate;
  color: #eafffb;
  background:
    radial-gradient(circle at 78% 12%, rgba(79, 232, 203, .2), transparent 32%),
    radial-gradient(circle at 15% 92%, rgba(48, 109, 255, .22), transparent 40%),
    linear-gradient(155deg, #064d50 0%, #075d60 42%, #102d49 100%);
}

.reg-aside::before {
  content: '';
  position: absolute;
  inset: -22%;
  z-index: -1;
  background:
    linear-gradient(118deg, transparent 28%, rgba(255, 255, 255, .045) 28.2%, transparent 28.5%, transparent 62%, rgba(255, 255, 255, .04) 62.2%, transparent 62.5%),
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, .15) 0 1px, transparent 1.7px);
  background-size: auto, 23px 23px;
  transform: rotate(-7deg);
  opacity: .7;
  animation: regAsideDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.reg-aside::after {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  left: -190px;
  bottom: -195px;
  z-index: -1;
  border-radius: 50%;
  border: 1px solid rgba(148, 255, 235, .18);
  background: radial-gradient(circle, rgba(70, 229, 205, .09), transparent 66%);
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .022), 0 0 0 76px rgba(255, 255, 255, .014);
  animation: regAsideOrbit 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.reg-aside-glow {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(69, 225, 197, .14);
  filter: blur(56px);
  z-index: -1;
  pointer-events: none;
}

.reg-aside-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 29px;
}

.reg-aside-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 15px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 10px 24px rgba(0, 18, 32, .2);
  backdrop-filter: blur(12px);
}

.reg-aside-logo img {
  width: 33px;
  height: 33px;
  object-fit: contain;
}

.reg-aside-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  letter-spacing: .12em;
}

.reg-aside-brand-text strong {
  font-size: .9rem;
  font-weight: 900;
  color: #fff;
}

.reg-aside-brand-text span {
  margin-top: 4px;
  font-size: .67rem;
  font-weight: 800;
  color: #7af0db;
}

.reg-aside-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #a5f4e7;
}

.reg-aside-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7bf1d8;
  box-shadow: 0 0 0 5px rgba(123, 241, 216, .12);
}

.reg-aside h3 {
  margin: 0 0 13px;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.035em;
  color: #fff;
}

.reg-aside > p {
  margin: 0 0 25px;
  font-size: .78rem;
  line-height: 1.9;
  color: rgba(233, 255, 251, .72);
}

.reg-aside-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 24px;
}

.reg-aside-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(211, 255, 247, .08);
}

.reg-aside-step > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 8px;
  background: rgba(111, 241, 218, .13);
  color: #7cf3dc;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.reg-aside-step strong {
  display: block;
  font-size: .76rem;
  font-weight: 800;
  color: #fff;
}

.reg-aside-step small {
  display: block;
  margin-top: 2px;
  font-size: .65rem;
  line-height: 1.55;
  color: rgba(233, 255, 251, .62);
}

.reg-aside-branches {
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(211, 255, 247, .11);
}

.reg-aside-branches-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: .72rem;
  font-weight: 800;
  color: #b8f7ec;
}

.reg-aside-branches-title svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.reg-aside-branch-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reg-aside-branch-list li {
  position: relative;
  padding: 7px 9px 7px 19px;
  border-radius: 8px;
  background: rgba(0, 20, 35, .18);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.5;
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-aside-branch-list li::before {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #6cebd5;
  box-shadow: 0 0 0 3px rgba(108, 235, 213, .12);
}

.reg-aside-trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  font-size: .65rem;
  line-height: 1.7;
  color: rgba(233, 255, 251, .58);
}

.reg-aside-trust svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  stroke: #84efdc;
  fill: none;
  stroke-width: 2;
}

/* --------------------------------------------------------------------------
   Main form column
   -------------------------------------------------------------------------- */
.reg-card-v2 .reg-close {
  top: 19px;
  left: 20px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  z-index: 20;
}

.reg-main-head {
  position: relative;
  padding: 31px 38px 20px;
  border-bottom: 1px solid var(--auth-line);
  background:
    radial-gradient(circle at 4% 0%, rgba(0, 168, 150, .11), transparent 40%),
    linear-gradient(122deg, color-mix(in srgb, var(--card) 93%, #dff8f3), var(--card));
}

.reg-main-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--auth-teal);
}

.reg-main-eyebrow span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--auth-teal), var(--auth-blue));
}

.reg-main-head h3 {
  margin: 0;
  max-width: 580px;
  color: var(--auth-ink);
  font-size: clamp(1.2rem, 2.2vw, 1.48rem);
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -.035em;
}

.reg-main-head > p {
  margin: 6px 0 0;
  max-width: 590px;
  color: var(--auth-muted);
  font-size: .77rem;
  line-height: 1.8;
}

.reg-card-v2 .reg-head-steps {
  justify-content: flex-start;
  margin: 19px 0 0;
  direction: rtl;
}

.reg-card-v2 .reg-step span {
  width: 29px;
  height: 29px;
  font-size: .7rem;
  border-width: 1px;
}

.reg-card-v2 .reg-step small {
  font-size: .62rem;
}

.reg-card-v2 .reg-step.active span {
  background: linear-gradient(135deg, #00877e, #126b9e);
  box-shadow: 0 4px 12px rgba(0, 127, 120, .22);
}

.reg-card-v2 .reg-step.done span {
  background: rgba(0, 127, 120, .1);
  border-color: var(--auth-teal);
  color: var(--auth-teal);
}

.reg-card-v2 .reg-step.done small { color: var(--auth-teal); }

.reg-card-v2 .reg-step-line {
  width: 42px;
  margin-bottom: 17px;
  background: var(--auth-line);
}

.reg-card-v2 .reg-error { margin: 15px 38px 0; }

#regForm {
  padding: 20px 38px 30px;
}

.reg-section {
  position: relative;
  margin-bottom: 15px;
  padding: 18px;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 96%, var(--auth-paper));
}

.reg-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
}

.reg-section-num {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  margin-top: 1px;
  border-radius: 9px;
  background: rgba(0, 127, 120, .09);
  border: 1px solid rgba(0, 127, 120, .14);
  color: var(--auth-teal);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .03em;
}

.reg-section-title {
  flex: 1;
  min-width: 0;
}

.reg-section-title h4 {
  margin: 0;
  color: var(--auth-ink);
  font-size: .84rem;
  font-weight: 800;
}

.reg-section-title p {
  margin: 2px 0 0;
  color: var(--auth-muted);
  font-size: .67rem;
  line-height: 1.6;
}

.reg-section-required {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 127, 120, .065);
  border: 1px solid rgba(0, 127, 120, .13);
  color: var(--auth-teal);
  font-size: .57rem;
  font-weight: 800;
  white-space: nowrap;
}

.reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 13px;
  row-gap: 0;
}

.reg-grid .input-group { margin-bottom: 13px; }

.reg-card-v2 .reg-type-group {
  margin-bottom: 0;
  gap: 10px;
}

.reg-card-v2 .reg-type-btn {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  text-align: right;
}

.reg-card-v2 .reg-type-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
}

.reg-card-v2 .reg-type-icon svg {
  width: 18px;
  height: 18px;
}

.reg-type-copy {
  flex: 1;
  min-width: 0;
}

.reg-card-v2 .reg-type-label {
  font-size: .8rem;
  line-height: 1.4;
}

.reg-card-v2 .reg-type-desc {
  margin-top: 1px;
  font-size: .62rem;
}

.reg-type-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--auth-line);
  color: transparent;
  transition: all .25s ease;
}

.reg-type-check svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
}

.reg-card-v2 .reg-type-btn.active .reg-type-check {
  border-color: var(--auth-teal);
  background: var(--auth-teal);
  color: #fff;
}

.reg-card-v2 .reg-phone-field { align-self: start; }

.wa-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.wa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(37, 211, 102, .38);
  background: rgba(37, 211, 102, .095);
  color: #128c66;
  font-family: inherit;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: all .25s ease;
}

.wa-chip:hover {
  background: rgba(37, 211, 102, .16);
  border-color: rgba(37, 211, 102, .65);
  transform: translateY(-1px);
}

.wa-chip.is-alt {
  border-color: rgba(233, 154, 35, .45);
  background: rgba(233, 154, 35, .1);
  color: #9b6409;
}

.dark .wa-chip { color: #69e6b1; }
.dark .wa-chip.is-alt { color: #ffc873; }

.wa-chip-icon {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: none;
  border-radius: 50%;
  background: rgba(37, 211, 102, .16);
}

.wa-chip-icon svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.wa-chip-state {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
}

.wa-chip-state svg {
  grid-area: 1 / 1;
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.7;
  transition: opacity .2s ease, transform .2s ease;
}

.wa-chip .wa-alt-icon { opacity: 0; transform: rotate(-45deg); }
.wa-chip.is-alt .wa-check-icon { opacity: 0; transform: rotate(45deg); }
.wa-chip.is-alt .wa-alt-icon { opacity: 1; transform: rotate(0); }

.wa-chip-hint {
  color: var(--auth-muted);
  font-size: .59rem;
  line-height: 1.5;
}

.wa-alt {
  display: none;
  margin-top: 9px;
  padding: 10px;
  border: 1px dashed rgba(233, 154, 35, .45);
  border-radius: 12px;
  background: rgba(233, 154, 35, .045);
}

.wa-alt.show {
  display: block;
  animation: regDropIn .28s var(--ease);
}

.wa-alt-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: #9b6409;
  font-size: .64rem;
  font-weight: 800;
}

.dark .wa-alt-head { color: #ffc873; }

.wa-alt-head svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.wa-alt-head b {
  color: #b45309;
  font-weight: 900;
}

.wa-alt .phone-group .country-code-btn { border-color: rgba(233, 154, 35, .38); }
.wa-alt .input-group { margin-bottom: 0; }

/* Branch selector */
.reg-branch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px;
}

.reg-branch-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  border: 1px dashed var(--auth-line);
  border-radius: 12px;
  color: var(--auth-muted);
  font-size: .68rem;
}

.reg-inline-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 127, 120, .2);
  border-top-color: var(--auth-teal);
  border-radius: 50%;
  animation: regSpin .7s linear infinite;
}

.reg-branch-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 10px 11px;
  border: 1.5px solid var(--auth-line);
  border-radius: 13px;
  background: var(--card);
  cursor: pointer;
  transition: border-color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.reg-branch-card:hover {
  border-color: var(--auth-teal);
  background: rgba(0, 127, 120, .035);
  transform: translateY(-1px);
}

.reg-branch-card.is-selected {
  border-color: var(--auth-teal);
  background: linear-gradient(135deg, rgba(0, 127, 120, .1), rgba(36, 99, 235, .03));
  box-shadow: 0 4px 14px rgba(0, 127, 120, .1);
}

.reg-branch-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reg-branch-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 9px;
  background: rgba(0, 127, 120, .08);
  color: var(--auth-teal);
  transition: all .22s ease;
}

.reg-branch-card.is-selected .reg-branch-icon {
  background: linear-gradient(145deg, #00877e, #1768a6);
  color: #fff;
}

.reg-branch-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.reg-branch-copy {
  flex: 1;
  min-width: 0;
}

.reg-branch-copy strong {
  display: block;
  color: var(--auth-ink);
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-branch-copy small {
  display: block;
  margin-top: 1px;
  color: var(--auth-muted);
  font-size: .57rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-branch-check {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--auth-line);
  color: transparent;
  transition: all .22s ease;
}

.reg-branch-check svg {
  width: 9px;
  height: 9px;
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
}

.reg-branch-card.is-selected .reg-branch-check {
  border-color: var(--auth-teal);
  background: var(--auth-teal);
  color: #fff;
}

.reg-dealing-group { margin-bottom: 0; }

/* License */
.reg-card-v2 .license-section {
  margin-bottom: 15px;
  padding: 18px;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 96%, var(--auth-paper));
  animation: none;
}

.reg-card-v2 .license-section.invalid {
  border-color: rgba(217, 76, 92, .5);
  box-shadow: 0 0 0 3px rgba(217, 76, 92, .08);
}

.reg-card-v2 .license-section .reg-section-head { margin-bottom: 10px; }

.reg-card-v2 .license-copy {
  margin: 0 0 11px;
  font-size: .66rem;
  line-height: 1.7;
}

.reg-card-v2 .license-dropzone {
  min-height: 82px;
  padding: 12px;
  border-radius: 12px;
}

.reg-card-v2 .license-dropzone:hover,
.reg-card-v2 .license-dropzone.dragging {
  background: rgba(0, 127, 120, .055);
}

.reg-card-v2 .license-upload-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.reg-card-v2 .license-upload-icon svg {
  width: 19px;
  height: 19px;
}

.reg-card-v2 .license-upload-copy strong { font-size: .73rem; }
.reg-card-v2 .license-upload-copy span { font-size: .62rem; }

.reg-card-v2 .license-browse {
  padding: 7px 10px;
  font-size: .62rem;
}

.reg-card-v2 .license-file { margin-top: 9px; }

/* Submit */
.reg-submit-wrap {
  margin-top: 3px;
}

.reg-card-v2 .reg-submit {
  background: linear-gradient(110deg, #007f78, #087b83 55%, #1768a6);
  border-radius: 14px;
  min-height: 52px;
  font-size: .9rem;
}

.reg-submit-hint {
  margin: 9px 2px 0;
  color: var(--auth-muted);
  font-size: .61rem;
  line-height: 1.7;
  text-align: center;
}

.reg-card-v2 .reg-footer-note {
  margin-top: 12px;
  padding: 10px;
  border-radius: 11px;
  font-size: .65rem;
}

/* Animations */
@keyframes regAsideDrift {
  from { transform: rotate(-7deg) translate3d(-1%, 0, 0); }
  to { transform: rotate(-3deg) translate3d(2%, 1%, 0); }
}

@keyframes regAsideOrbit {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, -13px, 0) scale(1.07); }
}

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

@keyframes regDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .reg-card.reg-card-v2 { max-width: 760px; grid-template-columns: 1fr; }
  .reg-aside { display: none; }
  .reg-card-v2 .reg-main { max-height: calc(100dvh - 48px); }
}

@media (max-width: 680px) {
  .reg-overlay { padding: 0; }
  .reg-card.reg-card-v2 {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .reg-card-v2 .reg-main { max-height: 100dvh; }
  .reg-main-head { padding: 25px 20px 17px; }
  .reg-main-head h3 { font-size: 1.18rem; }
  .reg-main-head > p { font-size: .72rem; }
  .reg-card-v2 .reg-close { top: 15px; left: 15px; width: 32px; height: 32px; }
  .reg-card-v2 .reg-error { margin: 13px 20px 0; }
  #regForm { padding: 16px 20px 26px; }
  .reg-section { padding: 15px; border-radius: 16px; }
  .reg-grid { grid-template-columns: 1fr; }
  .reg-section-required { display: none; }
  .reg-branch-grid { grid-template-columns: 1fr 1fr; }
  .reg-card-v2 .reg-step-line { width: 26px; }
}

@media (max-width: 390px) {
  .reg-main-head { padding-left: 16px; padding-right: 16px; }
  #regForm { padding-left: 16px; padding-right: 16px; }
  .reg-card-v2 .reg-error { margin-left: 16px; margin-right: 16px; }
  .reg-branch-grid { grid-template-columns: 1fr; }
  .phone-group { flex-direction: column; }
  .country-code-btn { min-width: 100%; }
  .country-dropdown { width: 100%; }
}
