/* ============================================================
   assets/wrg-style.css  —  نموذج التسجيل + OTP
   ============================================================ */

/* ── الحاوية ─────────────────────────────────────────────── */
.wrg-form-container {
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    padding: 30px 35px;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0,0,0,.10);
    font-family: Arial, sans-serif;
    direction: rtl;
}

/* ── مؤشر الخطوات ────────────────────────────────────────── */
.wrg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.wrg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
}

.wrg-step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .35s, color .35s, box-shadow .35s;
}

.wrg-step span {
    font-size: 12px;
    color: #aaa;
    font-weight: bold;
    transition: color .35s;
}

.wrg-step.active .wrg-step-circle {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    box-shadow: 0 3px 10px rgba(40,167,69,.35);
}
.wrg-step.active span { color: #28a745; }

.wrg-step.done .wrg-step-circle {
    background: #28a745;
    color: #fff;
}
.wrg-step.done span { color: #28a745; }

.wrg-step-line {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 22px;
    transition: background .35s;
    min-width: 40px;
}
.wrg-step-line.done { background: #28a745; }

/* ── العنوان ─────────────────────────────────────────────── */
.wrg-form-header {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 24px;
}

/* ── النموذج ─────────────────────────────────────────────── */
#wrg-registration-form {
    display: grid;
    gap: 14px;
}

.wrg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── مجموعة الحقل ────────────────────────────────────────── */
.wrg-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wrg-form-group label {
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

.wrg-req { color: #e53935; }

/* ── حقول الإدخال ────────────────────────────────────────── */
.wrg-form-group input[type="text"],
.wrg-form-group input[type="email"],
.wrg-form-group input[type="password"],
.wrg-form-group input[type="tel"] {
    height: 52px;
    border-radius: 10px;
    border: 1.8px solid #4caf50;
    padding: 0 14px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    color: #222;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.wrg-form-group input:focus {
    border-color: #1b8c20;
    box-shadow: 0 0 0 3px rgba(76,175,80,.18);
}

/* ── intl-tel-input ──────────────────────────────────────── */
.wrg-form-group .iti {
    width: 100%;
    border-radius: 10px;
    border: 1.8px solid #4caf50;
    overflow: visible !important;
    box-sizing: border-box;
}
.wrg-form-group .iti input[type="tel"] {
    border: none !important;
    box-shadow: none !important;
    height: 50px !important;
    padding-right: 90px;
    width: 100%;
    border-radius: 10px;
}
.wrg-form-group .iti:focus-within {
    border-color: #1b8c20;
    box-shadow: 0 0 0 3px rgba(76,175,80,.18);
}
.iti__country-list { z-index: 9999 !important; font-size: 15px; }

/* ── TomSelect ───────────────────────────────────────────── */
.wrg-form-group .ts-wrapper { width: 100%; }
.wrg-form-group .ts-control {
    height: 52px !important;
    border-radius: 10px !important;
    border: 1.8px solid #4caf50 !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: none !important;
    background: #fff !important;
}
.wrg-form-group .ts-wrapper.focus .ts-control {
    border-color: #1b8c20 !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,.18) !important;
}
.wrg-form-group .ts-dropdown {
    font-size: 15px !important;
    border-radius: 10px !important;
    border: 1.8px solid #4caf50 !important;
    z-index: 9999 !important;
}
.wrg-form-group .ts-dropdown .option:hover,
.wrg-form-group .ts-dropdown .option.active {
    background: #e8f5e9 !important;
    color: #1b8c20 !important;
}

/* ── كلمة المرور ─────────────────────────────────────────── */
.wrg-pass-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.wrg-pass-wrap input { padding-left: 48px !important; width: 100%; box-sizing: border-box; }
.wrg-eye {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.wrg-eye:hover { color: #4caf50; }
.wrg-eye svg   { pointer-events: none; }

/* ── أزرار ───────────────────────────────────────────────── */
#wrg-submit-1,
#wrg-submit-2 {
    height: 54px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#wrg-submit-1:hover,
#wrg-submit-2:hover    { opacity: .92; transform: translateY(-1px); }
#wrg-submit-1:disabled,
#wrg-submit-2:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── رسائل الحالة ────────────────────────────────────────── */
.wrg-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}
.wrg-msg.success { background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.wrg-msg.error   { background:#ffebee; color:#c62828; border:1px solid #ef9a9a; }
.wrg-msg.info    { background:#e3f2fd; color:#1565c0; border:1px solid #90caf9; }

/* ── انتقال اللوحات ──────────────────────────────────────── */
#wrg-panel-1,
#wrg-panel-2,
#wrg-panel-3 {
    animation: wrgFadeIn .3s ease;
}
@keyframes wrgFadeIn {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0);   }
}

/* ══════════════════════════════════════════════════════════
   خطوة OTP
══════════════════════════════════════════════════════════ */

/* ── تلميح البريد ────────────────────────────────────────── */
.wrg-otp-hint {
    text-align: center;
    margin-bottom: 28px;
    color: #555;
}
.wrg-otp-hint svg { display: block; margin: 0 auto 12px; }
.wrg-otp-hint p   { margin: 0 0 4px; font-size: 15px; }
.wrg-otp-hint strong { font-size: 16px; color: #222; direction: ltr; display: inline-block; }

/* ── مربعات OTP ──────────────────────────────────────────── */
.wrg-otp-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    direction: ltr;
}

.wrg-otp-box {
    width: 54px;
    height: 62px;
    border-radius: 12px;
    border: 2px solid #ccc;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    color: #222;
    outline: none;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    background: #fafafa;
    box-sizing: border-box;
    caret-color: #4caf50;
}
.wrg-otp-box:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76,175,80,.2);
    background: #fff;
    transform: scale(1.06);
}
.wrg-otp-box.filled {
    border-color: #28a745;
    background: #f0faf2;
    color: #28a745;
}
.wrg-otp-box.error-box {
    border-color: #e53935;
    background: #fff5f5;
    color: #e53935;
    animation: wrgShake .3s ease;
}
@keyframes wrgShake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

/* ── العداد التنازلي ─────────────────────────────────────── */
.wrg-otp-timer {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-bottom: 16px;
}
.wrg-timer-num {
    font-weight: bold;
    color: #4caf50;
    font-size: 15px;
    transition: color .3s;
}
.wrg-timer-num.urgent { color: #e53935; }

/* ── تذييل OTP ───────────────────────────────────────────── */
.wrg-otp-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.wrg-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    color: #4caf50;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    transition: color .2s;
}
.wrg-link-btn:hover   { color: #1b8c20; }
.wrg-link-btn:disabled { color: #bbb; cursor: not-allowed; text-decoration: none; }
.wrg-otp-sep { color: #ccc; }

/* ══════════════════════════════════════════════════════════
   خطوة النجاح
══════════════════════════════════════════════════════════ */
.wrg-success-box {
    text-align: center;
    padding: 20px 0;
}
.wrg-success-icon {
    margin-bottom: 20px;
}
.wrg-success-title {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0 0 12px;
}
.wrg-success-msg {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 28px;
}
.wrg-success-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}
.wrg-success-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    color: #fff;
}

/* ── جوال ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wrg-form-container { padding: 22px 18px; margin: 15px; }
    .wrg-form-row       { grid-template-columns: 1fr; }
    .wrg-form-header    { font-size: 21px; }
    .wrg-otp-box        { width: 44px; height: 54px; font-size: 22px; gap: 6px; }
    .wrg-otp-boxes      { gap: 7px; }
    .wrg-steps          { gap: 0; }
}
