.rifey-assist-dialog {
  width: min(1400px, calc(100vw - 64px));
  max-width: none;
  max-height: min(650px, calc(100dvh - 48px));
  height: min(650px, calc(100dvh - 48px));
  padding: 0; margin: auto; border: 0; background: transparent;
  color: #fff; overflow: visible; isolation: isolate;
  box-shadow: none;
}
.rifey-assist-dialog::backdrop { background: rgba(24, 32, 48, .56); backdrop-filter: blur(5px); }
.rifey-assist-card {
  display: grid; grid-template-columns: 1fr 1fr;
  height: 100%; width: 100%; overflow: visible; position: relative;
  border-radius: 52px;

  background: url('../assets/images/assist-office.png') center center / 100% 100% no-repeat;
  box-shadow: 0 22px 70px rgba(11,25,55,.23);
}
.rifey-assist-form-panel {
  position: relative; z-index: 2; display: flex; align-items: center; flex-direction: column;
  background: linear-gradient(155deg, #628fe5 1%, #4673c5 52%, #2c4d8d 100%);
  border-radius: 52px; padding: 44px 35px 36px;
}
.rifey-assist-title {
  font-family: 'Martian Grotesk', Arial, sans-serif;
  font-weight: 700; font-size: 24px; line-height: 1.5; letter-spacing: 0;
  text-align: center; max-width: 547px; margin: 0 auto 43px; color: #fff;
}
.rifey-assist-form { width: min(440px, 100%); display: grid; gap: 14px; }
.rifey-assist-field {
  display: flex; align-items: center; gap: 15px;
  width: 100%; height: 80px; border-radius: 26px; background: #fff;
  padding: 0 22px; border: none; box-shadow: none; cursor: text;
}
.rifey-assist-field svg { width: 27px; height: 27px; flex: none; color: #dedfe3; }
.rifey-assist-field input {
  display: block; width: 100%; min-width: 0; flex: 1; border: 0 !important;
  outline: none !important; box-shadow: none !important; background: transparent !important;
  color: #202530; font: 400 18px/1.5 'Martian Grotesk',Arial,sans-serif;
  padding: 0 !important; margin: 0 !important; height: auto !important;
}
.rifey-assist-field:focus-within, .rifey-assist-field input:focus,
.rifey-assist-field input:focus-visible { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
.rifey-assist-field input::placeholder { color: #c9cbd1; opacity: 1; }
.rifey-assist-consent {
  display: grid; grid-template-columns: 17px 1fr; align-items: start; gap: 10px;
  color: rgba(255,255,255,.7); font: 400 10px/1.35 'Martian Grotesk',Arial,sans-serif;
  margin-top: 11px; cursor: pointer;
}
.rifey-assist-consent input { appearance: none; -webkit-appearance:none; margin:1px 0 0;
  width: 17px; height: 17px; border: 3px solid #fff; border-radius: 50%;
  background: transparent; cursor: pointer; box-shadow: 0 1px 5px #15346a55;
}
.rifey-assist-consent input:checked { background: #FF4B00; }
.rifey-assist-consent input:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.rifey-assist-submit {
  border:0; border-radius: 24px; height: 80px; width:100%;
  background:#ff4406; color:#fff; cursor: pointer;
  font: 700 18px/1.4 'Martian Grotesk',Arial,sans-serif;
  transition: transform .24s ease, background .24s ease, box-shadow .24s ease;
  margin-top: 16px;
}
.rifey-assist-submit:hover { background: #f43d00; transform: translateY(-3px); box-shadow: 0 10px 25px #1839693b; }
.rifey-assist-submit:active { transform:translateY(0) scale(.985); }
.rifey-assist-status { min-height: 18px; margin: 0; font-size: 11px; line-height:1.3; text-align:center; color:white; }
.rifey-assist-trap { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

.rifey-assist-art {
  position: relative;
  overflow: visible;
  border-radius: 0 52px 52px 0;
  background: transparent;
}

.rifey-assist-person {
  position: absolute;
  z-index: 3;
  display: block;
  width: auto;
  height: 740px;
  max-width: none;
  top: -75px;
  bottom: auto;
  left: -95px;
  object-fit: contain;
  object-position: top;
  clip-path: inset(0 0 15px 0);
  pointer-events: none;
}
.rifey-assist-close { position:absolute; z-index:5; top:25px; right:26px;
  width:45px; height:45px; border:0; background:transparent; color:#353b48;
  display:grid; place-items:center; cursor:pointer; border-radius:50%;
  transition:background .2s ease,transform .2s ease; }
.rifey-assist-close svg { width:20px; height:20px; }
.rifey-assist-close:hover { background:rgba(255,255,255,.8); transform:scale(1.07); }
.rifey-assist-close:focus-visible { outline:2px solid #3260b4; outline-offset:2px; }
@media (max-width: 1100px) {
  .rifey-assist-dialog { width:min(900px, calc(100vw - 32px)); height:auto; max-height:calc(100dvh - 28px); }
  .rifey-assist-card { min-height: 500px; border-radius:35px; }
  .rifey-assist-form-panel { padding:36px 25px 30px; border-radius:35px; }
  .rifey-assist-title { font-size:clamp(16px,1.9vw,21px); margin-bottom:25px; line-height:1.4; }
  .rifey-assist-form { gap:12px; }
  .rifey-assist-field { height:64px; border-radius:20px; }
  .rifey-assist-submit { height:64px; font-size:15px; margin-top:8px; }
  .rifey-assist-person { height:calc(100% + 75px); left:-14%; top:-62px; bottom:auto; clip-path:inset(0 0 13px 0); }
}
@media (max-width: 650px) {
  .rifey-assist-dialog { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); height:auto; overflow:visible; }
  .rifey-assist-card { position:relative; display:flex; flex-direction:column-reverse;
    border-radius:25px; max-height:calc(100dvh - 24px); overflow:auto; background:#f0f3f8; }
  .rifey-assist-art { height:clamp(135px,28dvh,210px); flex-shrink:0; border-radius:25px 25px 0 0; background:url('../assets/images/assist-office.png') right center / 200% 100% no-repeat; overflow:hidden; }
  .rifey-assist-person { height:390px; width:auto; left:auto; right:-20px; top:auto; bottom:-145px; clip-path:none; }
  .rifey-assist-form-panel { flex:none; border-radius:25px 25px 0 0; padding:28px 24px 22px; }
  .rifey-assist-title { font-size:clamp(16px,4.5vw,20px); max-width:360px; margin-bottom:22px; }
  .rifey-assist-form { width:100%; gap:10px; }
  .rifey-assist-field { height:58px; padding:0 19px; border-radius:17px; }
  .rifey-assist-field input { font-size:15px; }
  .rifey-assist-submit { height:58px; border-radius:17px; font-size:15px; margin-top:5px; }
  .rifey-assist-consent { margin-top:6px; font-size:9px; }
  .rifey-assist-close { top:9px; right:11px; background:#ffffffd9; width:37px; height:37px; }
  .rifey-assist-close svg { width:18px; height:18px; }
}
@media (max-height: 740px) and (min-width: 1101px) {
  .rifey-assist-form-panel { padding-top:32px; padding-bottom:24px; }
  .rifey-assist-title { margin-bottom:28px; }
  .rifey-assist-form { gap:9px; }
  .rifey-assist-field { height:68px; }
  .rifey-assist-submit { height:70px; margin-top:10px; }
}
@media (prefers-reduced-motion: reduce) {
  .rifey-assist-submit, .rifey-assist-close { transition:none; }
}

@media (prefers-reduced-motion: no-preference) {
  .rifey-assist-dialog[open]:not(.is-closing) .rifey-assist-card {
    animation: rifeyAssistLuxEnter 560ms cubic-bezier(.22, 1, .36, 1) both;
    transform-origin: center center;
  }
  .rifey-assist-dialog[open]:not(.is-closing)::backdrop {
    animation: rifeyAssistBackdropEnter 420ms ease-out both;
  }
  @keyframes rifeyAssistLuxEnter {
    from { opacity: 0; transform: translate3d(0, 19px, 0) scale(.985); }
    to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes rifeyAssistBackdropEnter {
    from { background-color: rgba(24, 32, 48, 0); backdrop-filter: blur(0px); }
    to   { background-color: rgba(24, 32, 48, .56); backdrop-filter: blur(5px); }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rifey-assist-dialog[open].is-closing .rifey-assist-card {
    animation: rifeyAssistLuxExit 240ms cubic-bezier(.4, 0, 1, 1) both;
    pointer-events: none;
  }
  .rifey-assist-dialog[open].is-closing::backdrop {
    animation: rifeyAssistBackdropExit 220ms ease-in both;
  }
  @keyframes rifeyAssistLuxExit {
    from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
    to   { opacity: 0; transform: translate3d(0, 11px, 0) scale(.99); }
  }
  @keyframes rifeyAssistBackdropExit {
    from { background-color: rgba(24, 32, 48, .56); backdrop-filter: blur(5px); }
    to   { background-color: rgba(24, 32, 48, 0); backdrop-filter: blur(0px); }
  }
}

@media (max-width: 650px) {
  .rifey-assist-dialog {
    box-sizing: border-box;
    width: min(420px, calc(100vw - 24px));
    max-width: none;
    height: auto;
    max-height: calc(100dvh - 20px);
    padding: 0;

    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .rifey-assist-dialog .rifey-assist-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 26px;
    background: #f2f5fa;
  }

  .rifey-assist-dialog .rifey-assist-art {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
    height: clamp(132px, 21dvh, 178px);
    min-height: 0;
    overflow: hidden;
    border-radius: 26px 26px 0 0;
    background: #e9edf4 url('../assets/images/assist-office.png') right center / 200% 100% no-repeat;
  }
  .rifey-assist-dialog .rifey-assist-person {
    position: absolute;
    z-index: 1;
    display: block;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    height: clamp(220px, 32dvh, 280px);
    top: auto;
    bottom: -73px;
    left: auto;
    right: 5%;
    object-fit: contain;
    object-position: center bottom;
    clip-path: none;
    pointer-events: none;
  }
  .rifey-assist-dialog .rifey-assist-form-panel {
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    padding: 22px 22px 22px;
    border-radius: 24px 24px 0 0;
    margin-top: -2px;
    background: linear-gradient(155deg, #628fe5 1%, #4673c5 52%, #2c4d8d 100%);
  }
  .rifey-assist-dialog .rifey-assist-title {
    box-sizing: border-box;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 16px;
    font-size: clamp(17px, 4.6vw, 19px);
    line-height: 1.28;
    letter-spacing: -.015em;
    text-wrap: balance;
  }
  .rifey-assist-dialog .rifey-assist-title br { display: none; }
  .rifey-assist-dialog .rifey-assist-form { width: 100%; gap: 9px; }
  .rifey-assist-dialog .rifey-assist-field {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    padding: 0 17px;
    gap: 12px;
    border-radius: 15px;
  }
  .rifey-assist-dialog .rifey-assist-field svg { width: 21px; height: 21px; }
  .rifey-assist-dialog .rifey-assist-field input { font-size: 16px; }
  .rifey-assist-dialog .rifey-assist-consent {
    margin-top: 3px;
    gap: 9px;
    grid-template-columns: 17px minmax(0, 1fr);
    font-size: 10px;
    line-height: 1.35;
    color: rgba(255,255,255,.88);
  }
  .rifey-assist-dialog .rifey-assist-submit {
    box-sizing: border-box;
    width: 100%;
    height: 54px;
    margin-top: 4px;
    border-radius: 16px;
    background: #ff4b00;
    font-size: 16px;
  }
  .rifey-assist-dialog .rifey-assist-submit:hover { background: #f24600; }
  .rifey-assist-dialog .rifey-assist-status { min-height: 0; margin: 0; }
  .rifey-assist-dialog .rifey-assist-status:empty { display: none; }
  .rifey-assist-dialog .rifey-assist-close {
    position: absolute;
    z-index: 10;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    box-shadow: 0 3px 13px rgba(30,43,70,.09);
    color: #30394b;
  }
}

@media (max-width: 650px) and (max-height: 620px) {
  .rifey-assist-dialog .rifey-assist-art { height: 105px; }
  .rifey-assist-dialog .rifey-assist-person { height: 215px; bottom: -77px; }
  .rifey-assist-dialog .rifey-assist-form-panel { padding: 17px 19px 18px; }
  .rifey-assist-dialog .rifey-assist-title { font-size: 16px; margin-bottom: 12px; }
  .rifey-assist-dialog .rifey-assist-field { height: 47px; }
  .rifey-assist-dialog .rifey-assist-submit { height: 49px; }
}

@media (max-width: 650px) and (prefers-reduced-motion: no-preference) {
  .rifey-assist-dialog[open]:not(.is-closing) .rifey-assist-card {
    animation: rifeyAssistMobileFadeIn 560ms ease-out both;
    transform: none;
  }
  .rifey-assist-dialog[open].is-closing .rifey-assist-card {
    animation: rifeyAssistMobileFadeOut 240ms ease-in both;
    transform: none;
  }
  @keyframes rifeyAssistMobileFadeIn {
    from { opacity: 0; transform: none; }
    to   { opacity: 1; transform: none; }
  }
  @keyframes rifeyAssistMobileFadeOut {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: none; }
  }
}
