/* ============================================================
   Login prompt popup (shares DM_SV overlay styles)
   ============================================================ */
#dm-login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(41, 62, 97, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999990;
    align-items: center;
    justify-content: center;
}
#dm-login-overlay.dm-sv-open {
    display: flex;
}
#dm-login-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    margin: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(28, 129, 135, 0.25);
    direction: rtl;
    font-family: Roboto, Arial, sans-serif;
    animation: dm-sv-pop .25s cubic-bezier(.34,1.56,.64,1) both;
}
#dm-login-modal .dm-sv-header {
    background: linear-gradient(135deg, #1C8187 0%, #293E61 100%);
    padding: 28px 28px 22px;
    position: relative;
    text-align: center;
}
#dm-login-modal .dm-sv-header h2 {
    color: #fff;
    margin: 8px 0 6px;
    font-size: 20px;
    font-weight: 700;
}
#dm-login-modal .dm-sv-header p {
    color: rgba(255,255,255,.82);
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}
.dm-login-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 4px;
}
#dm-login-close {
    position: absolute;
    top: 12px;
    left: 14px;
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 17px;
    line-height: 30px;
    text-align: center;
    padding: 0;
    transition: background .2s;
}
#dm-login-close:hover { background: rgba(255,255,255,.32); }
#dm-login-modal .dm-sv-body {
    padding: 24px 28px 28px;
}
/* Outline / ghost variant for Cancel button */
.dm-sv-btn-outline {
    background: transparent;
    color: #293E61;
    border: 2px solid #293E61;
    margin-top: 10px;
}
.dm-sv-btn-outline:hover { background: #f0f3f8; }

/* Backdrop */
#dm-sv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(41, 62, 97, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999990;
    align-items: center;
    justify-content: center;
}
#dm-sv-overlay.dm-sv-open {
    display: flex;
}

/* Modal box */
#dm-sv-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    margin: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(28, 129, 135, 0.25);
    direction: rtl;
    font-family: Roboto, Arial, sans-serif;
    animation: dm-sv-pop .25s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes dm-sv-pop {
    from { opacity: 0; transform: scale(.88); }
    to   { opacity: 1; transform: scale(1); }
}

/* Header */
#dm-sv-modal .dm-sv-header {
    background: linear-gradient(135deg, #1C8187 0%, #293E61 100%);
    padding: 28px 28px 22px;
    position: relative;
    text-align: center;
}
#dm-sv-modal .dm-sv-header h2 {
    color: #fff;
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}
#dm-sv-modal .dm-sv-header p {
    color: rgba(255,255,255,.82);
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}
#dm-sv-close {
    position: absolute;
    top: 12px;
    left: 14px;
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 17px;
    line-height: 30px;
    text-align: center;
    padding: 0;
    transition: background .2s;
}
#dm-sv-close:hover { background: rgba(255,255,255,.32); }

/* Body */
#dm-sv-modal .dm-sv-body {
    padding: 28px;
}

/* Steps */
.dm-sv-step { display: none; }
.dm-sv-step.dm-sv-active { display: block; }

/* Labels */
#dm-sv-modal label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #293E61;
    margin-bottom: 8px;
}

/* Inputs */
#dm-sv-modal input[type="email"],
#dm-sv-modal input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
    background: #fafafa;
}
#dm-sv-modal input:focus {
    border-color: #1C8187;
    background: #fff;
}

/* OTP input — large centered */
#dm-sv-otp-input {
    text-align: center;
    letter-spacing: 10px;
    font-size: 28px;
    font-weight: 700;
    color: #1C8187;
}

/* Primary button */
.dm-sv-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background: #1C8187;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-align: center;
}
.dm-sv-btn:hover  { background: #155f63; }
.dm-sv-btn:active { transform: scale(.98); }
.dm-sv-btn:disabled { background: #9bbebf; cursor: not-allowed; }

/* Message area */
.dm-sv-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}
.dm-sv-msg.dm-sv-error   { background: #fff0f0; color: #c0392b; display: block; }
.dm-sv-msg.dm-sv-success { background: #f0faf9; color: #1C8187; display: block; }

/* Resend row */
.dm-sv-resend {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #888;
}
.dm-sv-resend a {
    color: #1C8187;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.dm-sv-resend a:hover { text-decoration: underline; }

/* Email hint in step 2 */
.dm-sv-email-hint {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 0 0 18px;
    line-height: 1.5;
}
.dm-sv-email-hint strong { color: #293E61; }

/* Success step */
.dm-sv-success-wrap {
    text-align: center;
    padding: 10px 0 6px;
}
.dm-sv-success-wrap .dm-sv-check {
    font-size: 54px;
    line-height: 1;
    margin-bottom: 14px;
    display: block;
}
.dm-sv-success-wrap h3 {
    color: #1C8187;
    font-size: 20px;
    margin: 0 0 8px;
}
.dm-sv-success-wrap p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Spinner */
.dm-sv-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dm-sv-spin .7s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}
@keyframes dm-sv-spin { to { transform: rotate(360deg); } }
