.hi-social-connect-hide {
    display: none;
}
.hi-social-connect-loader {
    width: 100%;
    height: 100%;
    background: url("../img/ajax-loader.gif") no-repeat center center rgba(255, 255, 255, 0.8);
    z-index: 99991;
    position: absolute;
    top: 0px;
    left: 0px;
    background-size: 80px;
}

.hi-social-connect-overflow {
    overflow: hidden;
}

/* Toast messages */
.hi-social-connect-message {
    position: fixed !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 99992 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 420px !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #fff !important;
    background: #1e293b !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    margin: 0 !important;
    animation: hiScSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards !important;
}

.hi-social-connect-message-success {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

.hi-social-connect-message-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

.hi-sc-msg-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    color: #fff !important;
    opacity: 0.9 !important;
}

.hi-sc-msg-text {
    flex: 1 !important;
    color: #fff !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
}

@keyframes hiScSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Buttons */
.hi-social-connect-buttons-block {
    width: 100%;
    max-width: 320px;
    margin: 15px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 8px;
}
.hi-social-connect-button {
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    height: 36px;
    border-radius: 6px;
    color: rgb(29, 27, 22);
    fill: rgb(29, 27, 22);
    background: none;
    font-size: 14px;
    line-height: 1;
    padding-left: 12px;
    padding-right: 12px;
    font-weight: 500;
    border: 1px solid rgb(227, 226, 224);
    width: 100%;
    box-shadow: none;
}
.hi-social-connect-button:hover {
    background: rgba(55, 53, 47, 0.06);
}
.hi-social-connect-button:active {
    background: rgba(55, 53, 47, 0.16);
}
.hi-social-connect-button:focus {
    outline: 0;
}
.hi-social-connect-button-inner {
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
}
.hi-social-connect-item-icon {
    width: 16px;
    height: auto;
    display: block;
    fill: inherit;
    flex-shrink: 0;
    position: absolute;
    left: 10px;
    top: 9px;
}
.hi-social-connect-button-otp .hi-social-connect-item-icon,
.hi-social-connect-button-amazon .hi-social-connect-item-icon {
    width: 20px;
}

.hi-social-connect-form-group-multiple {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.hi-social-connect-form-group {
    width: 100%;
}
.hi-social-connect-animation-input-block {
    position: relative;
    margin-bottom: 9px;
}
.hi-social-connect-animation-input-block label {
    font-size: 10px;
    font-weight: normal;
    position: absolute;
    top: 0;
    width: 100%;
    margin-top: 2px;
    padding: 0 10px;
    transform: translateY(3px);
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    color: #3a3a3a;
    z-index: 9;
    opacity: 0;
    transition: all 0.2s ease-out;
    text-align: left;
}
.hi-social-connect-animation-input-block input::placeholder {
    color: #3a3a3a;
    opacity: 1;
}
.hi-social-connect-form-group input {
    padding: 7px 2px 7px 9px;
    border-style: solid;
    border-width: 1px;
    width: 100%;
    resize: none;
    font-size: 12px;
    box-sizing: border-box;
    height: 40px;
    border-radius: 3px;

    background-color: #fff;
    color: #272727;
    border-color: #cbcbcc;
}
.hi-social-connect-animation-input-block.hi-social-connect-show-floating-label label {
    -webkit-transform: none;
    transform: none;
    opacity: 1;
}
.hi-social-connect-animation-input-block.hi-social-connect-show-floating-label input {
    padding-top: 1.5em;
}
/* Legacy modal headers (connection-modal) */
.hi-social-connect-connection-modal-header h2 {
    font-size: 15px;
    text-align: center;
    text-transform: none;
    padding: 10px;
}
.hi-social-connect-action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.hi-social-connect-action-buttons .hi-social-connect-submit-user {
    margin-left: auto;
    text-transform: none;
}

/* ================================================================
   OTP & Magic Link Modals — Modern Design
   ================================================================ */

/* Modal container */
.hi-sc-modal {
    text-align: center !important;
    padding: 8px 0 0 !important;
}

/* Step containers with transitions */
.hi-sc-step {
    animation: hiScFadeIn 0.3s ease-out;
}

@keyframes hiScFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Icon circle at top */
.hi-sc-modal-icon {
    width: 56px !important;
    height: 56px !important;
    margin: 0 auto 16px !important;
    background: #f0f0ff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.hi-sc-modal-icon img {
    width: 26px !important;
    height: 26px !important;
    display: block !important;
}
.hi-sc-modal-icon svg {
    width: 24px !important;
    height: 24px !important;
    color: #4f46e5 !important;
}
.hi-sc-modal-icon-success {
    background: #ecfdf5 !important;
}
.hi-sc-modal-icon-success svg {
    color: #10b981 !important;
}

/* Header: title + subtitle */
.hi-sc-modal-header {
    margin-bottom: 20px !important;
}
.hi-sc-modal-header h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    text-align: center !important;
    text-transform: none !important;
    line-height: 1.3 !important;
}
.hi-sc-modal-subtitle {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}
.hi-sc-modal-subtitle strong {
    color: #1a1a1a !important;
    font-weight: 600 !important;
    word-break: break-all !important;
}

/* Modal body */
.hi-sc-modal-body {
    text-align: left !important;
}

/* Inputs — larger, refined */
.hi-sc-modal .hi-social-connect-form-group input {
    height: 48px !important;
    font-size: 14px !important;
    padding: 12px 14px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    color: #1a1a1a !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.hi-sc-modal .hi-social-connect-form-group input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}
.hi-sc-modal .hi-social-connect-form-group input::placeholder {
    color: #9ca3af !important;
}
.hi-sc-modal .hi-social-connect-animation-input-block.hi-social-connect-show-floating-label input {
    padding-top: 22px !important;
    padding-bottom: 6px !important;
}
.hi-sc-modal .hi-social-connect-animation-input-block label {
    font-size: 10px !important;
    color: #6b7280 !important;
    padding: 0 14px !important;
    margin-top: 4px !important;
}

/* OTP split-digit inputs */
.hi-sc-otp-digits {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 auto !important;
    width: 100% !important;
}
.hi-sc-otp-digit {
    width: 40px !important;
    min-width: 0 !important;
    flex: 1 1 40px !important;
    max-width: 44px !important;
    height: 48px !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    background-color: #fff !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 10px !important;
    outline: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    caret-color: #4f46e5 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}
.hi-sc-otp-digit::-webkit-outer-spin-button,
.hi-sc-otp-digit::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.hi-sc-otp-digit:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}
.hi-sc-otp-digit.hi-sc-otp-digit-filled {
    border-color: #4f46e5 !important;
    background-color: #f5f3ff !important;
}
.hi-sc-otp-digit.hi-sc-otp-digit-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}
.hi-sc-otp-separator {
    width: 10px !important;
    height: 2px !important;
    background: #d1d5db !important;
    border-radius: 1px !important;
    flex-shrink: 1 !important;
    min-width: 4px !important;
}
@media (max-width: 420px) {
    .hi-sc-otp-digits {
        gap: 4px !important;
    }
    .hi-sc-otp-digit {
        width: auto !important;
        flex: 1 1 0 !important;
        height: 42px !important;
        font-size: 17px !important;
        border-radius: 8px !important;
    }
    .hi-sc-otp-separator {
        width: 6px !important;
        min-width: 3px !important;
    }
    .mfp-white-popup.hi-sc-popup {
        padding: 24px 16px !important;
    }
    .mfp-white-popup .hi-sc-modal {
        max-width: 100% !important;
    }
}
@keyframes hiScShake {
    0%, 100% { transform: translateX(0); }
    20%  { transform: translateX(-4px); }
    40%  { transform: translateX(4px); }
    60%  { transform: translateX(-3px); }
    80%  { transform: translateX(3px); }
}
.hi-sc-otp-digit-error {
    animation: hiScShake 0.4s ease !important;
}

/* Inline message banners */
.hi-sc-inline-message {
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    margin-bottom: 16px !important;
    border: none !important;
}
.hi-sc-inline-message-error {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-left: 3px solid #ef4444 !important;
}
.hi-sc-inline-message-success {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border-left: 3px solid #10b981 !important;
}
.hi-sc-inline-message-info {
    background: #eff6ff !important;
    color: #1e40af !important;
    border-left: 3px solid #3b82f6 !important;
}
.hi-sc-inline-message-info a,
.hi-sc-inline-message-info button.hi-sc-link-btn {
    color: #1e40af !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Countdown timer hint */
.hi-sc-countdown {
    font-size: 12px !important;
    color: #6b7280 !important;
    text-align: center !important;
    margin-top: 8px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}
.hi-sc-countdown span {
    font-weight: 700 !important;
    color: #4f46e5 !important;
}

/* Modal footer */
.hi-sc-modal-footer {
    margin-top: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Primary button — full-width, pill */
.hi-sc-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    cursor: pointer !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}
.hi-sc-btn-primary {
    width: 100% !important;
    height: 48px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #4f46e5 !important;
    border-radius: 10px !important;
    padding: 0 24px !important;
    letter-spacing: 0.01em !important;
}
.hi-sc-btn-primary:hover {
    background: #4338ca !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}
.hi-sc-btn-primary:active {
    background: #3730a3 !important;
    transform: scale(0.98) !important;
}
.hi-sc-btn-primary:disabled,
.hi-sc-btn-primary[disabled] {
    background: #a5b4fc !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Text link button (e.g. "Resend code") */
.hi-sc-btn-link {
    background: none !important;
    border: none !important;
    color: #4f46e5 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 4px 0 !important;
    text-decoration: none !important;
}
.hi-sc-btn-link:hover {
    color: #4338ca !important;
    text-decoration: underline !important;
}
.hi-sc-btn-link:disabled,
.hi-sc-btn-link[disabled] {
    color: #9ca3af !important;
    cursor: not-allowed !important;
    text-decoration: none !important;
}

/* Success hint text */
.hi-sc-success-hint {
    font-size: 13px !important;
    color: #6b7280 !important;
    text-align: center !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Magnific Popup overrides for OTP & Magic Link modals */
.mfp-white-popup.hi-sc-popup {
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    padding: 32px 28px !important;
    max-width: 420px !important;
    overflow: hidden !important;
}
.mfp-white-popup.hi-sc-popup .mfp-close {
    top: 6px !important;
    right: 6px !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 22px !important;
    color: #9ca3af !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}
.mfp-white-popup.hi-sc-popup .mfp-close:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
}
.mfp-white-popup .hi-sc-modal {
    max-width: 380px !important;
    margin: 0 auto !important;
}

.hi-social-connect-small-buttons.hi-social-connect-buttons-block {
    flex-direction: row;
    max-width: 100%;
    gap: 8px;
    justify-content: center;
}
.hi-social-connect-small-buttons .hi-social-connect-button-text {
    display: none !important;
}
.hi-social-connect-small-buttons .hi-social-connect-item-icon {
    position: static;
}
.hi-social-connect-small-buttons .hi-social-connect-button {
    width: 65px;
}
.hi-social-connect-custom-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}
.hi-social-connect-button-block-displayNav2,
.hi-social-connect-button-block-displayNav1 {
    margin: 0;
}
.hi-social-connect-small-buttons.hi-social-connect-button-block-displayNav1 .hi-social-connect-button,
.hi-social-connect-small-buttons.hi-social-connect-button-block-displayNav2 .hi-social-connect-button {
    width: 50px;
}

/* Toast Notifications */
.hi-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    pointer-events: none;
}

.hi-toast {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.hi-toast.hi-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.hi-toast.hi-toast-hide {
    transform: translateX(400px);
    opacity: 0;
}

.hi-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.hi-toast-success .hi-toast-icon {
    background: #10b981;
    color: #fff;
}

.hi-toast-error .hi-toast-icon {
    background: #ef4444;
    color: #fff;
}

.hi-toast-info .hi-toast-icon {
    background: #3b82f6;
    color: #fff;
}

.hi-toast-warning .hi-toast-icon {
    background: #f59e0b;
    color: #fff;
}

.hi-toast-content {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.hi-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.hi-toast-close:hover {
    color: #333;
}

/* Passkey Setup Modal */
.hi-passkey-setup-modal {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.hi-passkey-setup-modal .hi-passkey-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.hi-passkey-setup-modal h3 {
    margin: 0 0 15px;
    font-size: 24px;
    color: #333;
}

.hi-passkey-setup-modal p {
    margin: 0 0 30px;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.hi-passkey-setup-modal .hi-passkey-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.hi-passkey-setup-modal .hi-passkey-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.hi-passkey-setup-modal .hi-passkey-button-primary {
    background: #4f46e5;
    color: #fff;
}

.hi-passkey-setup-modal .hi-passkey-button-primary:hover {
    background: #4338ca;
}

.hi-passkey-setup-modal .hi-passkey-button-secondary {
    background: #f3f4f6;
    color: #333;
}

.hi-passkey-setup-modal .hi-passkey-button-secondary:hover {
    background: #e5e7eb;
}