/* ============================================================
   SmartCore — SMS OTP Login + Registration Phone Field
   Dépend de : intl-tel-input (CDN)
   ============================================================ */

/* --- intl-tel-input override dans les formulaires LP --- */
.sc-phone-field .iti,
.sc-otp-field-group .iti {
    width: 100%;
    display: block;
}

.sc-phone-field input[type="tel"],
.sc-otp-field-group input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   Wrapper OTP
   ============================================================ */
.sc-sms-otp-wrapper {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
}

/* ============================================================
   Description
   ============================================================ */
.sc-otp-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 18px;
    margin-bottom: 25px !important;
}

/* ============================================================
   Champs
   ============================================================ */

.sc-otp-field-group input[type="tel"],
.sc-otp-field-group input[type="text"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    min-height: auto;
}

.sc-otp-field-group input:focus {
    outline: none;
    border-color: var(--lp-primary-color, #098458);
    background: #fff;
}

/* Code OTP — chiffres larges centrés */
#sc-otp-code {
    text-align: center;
    letter-spacing: 10px;
    font-size: 24px;
    font-weight: 700;
    padding: 13px 24px;
}

/* ============================================================
   Bouton principal
   ============================================================ */
.sc-otp-btn {
    display: block;
    width: 100%;
    padding: 0px 16px;
    background: var(--lp-primary-color, #098458);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    margin-top: 4px;
}

.sc-otp-btn:hover {
    opacity: 0.9;
}

.sc-otp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ============================================================
   Messages succès / erreur
   ============================================================ */
.sc-otp-response {
    min-height: 16px;
    margin-bottom: 10px;
}

.sc-otp-msg {
    display: block;
    padding: 9px 13px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.5;
}

.sc-otp-msg--error {
    background: #fff1f0;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

.sc-otp-msg--success {
    background: #f0fff5;
    color: #167a46;
    border: 1px solid #b2dfc3;
}

/* ============================================================
   Renvoi & retour
   ============================================================ */
.sc-otp-resend-wrap {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #888;
}

#sc-otp-timer {
    display: inline;
}

#sc-otp-resend-btn, .sc-otp-back-btn {
    background: none;
    border: none;
    color: var(--lp-primary-color, #098458);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    padding: 0;
}

/* ============================================================
   Loading overlay + spinner
   ============================================================ */
.sc-otp-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 20;
}

.sc-otp-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--lp-primary-color, #098458);
    border-radius: 50%;
    animation: sc-spin 0.75s linear infinite;
}

@keyframes sc-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Profil — Mise à jour du numéro
   ============================================================ */
.sc-phone-update-wrapper {
    padding: 20px 0;
}

.sc-phone-current-wrap {
    margin-bottom: 25px;
    font-size: 14px;
}

.sc-phone-current {
    font-size: 16px;
    color: var(--lp-primary-color, #098458);
    margin-left: 5px;
}

.sc-phone-none {
    color: #999;
    font-style: italic;
}

.sc-phone-update-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.sc-phone-update-wrapper .lp-button {
    margin-top: 10px;
}
