/* Shared card styles */
.alh-mp-card {
    background: #0b1120;
    border: 1px solid #7c3aed;
    border-radius: 18px;
    padding: 24px 22px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
    max-width: 480px;
    margin: 20px auto;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.8);
}

/* Make register/login forms full-width as requested */
.alh-mp-card.alh-mp-form-register {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
}

.alh-mp-form {
    display: block;
}

.alh-mp-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: #a78bfa;
    text-align: left;
}

.alh-mp-field {
    margin-bottom: 14px;
}

.alh-mp-field label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #e5e7eb;
    text-align: left;
}

.alh-mp-field input[type="text"],
.alh-mp-field input[type="email"],
.alh-mp-field input[type="password"],
.alh-mp-field input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #f9fafb;
    font-size: 14px;
}

.alh-mp-field input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 1px rgba(124,58,237,0.5);
}

.alh-mp-required {
    color: #f97373;
    margin-left: 4px;
}

.alh-mp-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 10px;
}

.alh-mp-logout {
    display: block;
    width: auto;
    min-width: 180px;
    max-width: 260px;
    margin: 10px auto 0;
    text-align: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.alh-mp-btn:hover,
.alh-mp-logout:hover {
    filter: brightness(1.1);
}

/* Alerts */
.alh-mp-alert,
.alh-mp-message {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #7c3aed;
    background: rgba(124, 58, 237, 0.14);
    color: #ffffff;
}

.alh-mp-alert-error {
    background: rgba(185, 28, 28, 0.18);
    border: 1px solid #fecaca;
    color: #fff;
}

.alh-mp-alert-success {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #fff;
}

/* Popup styles */
.alh-mp-popup {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alh-mp-popup-inner {
    background: #020617;
    border-radius: 18px;
    border: 1px solid #7c3aed;
    padding: 22px 20px;
    max-width: 520px;
    width: 90%;
    position: relative;
    color: #f9fafb;
}

.alh-mp-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 22px;
    cursor: pointer;
}

.alh-mp-popup-title {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 600;
    color: #a78bfa;
    text-align: left;
}

.alh-mp-popup-body {
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

.alh-mp-popup-body a {
    color: #38bdf8;
    text-decoration: underline;
}

.alh-mp-card.alh-mp-form {
    direction: rtl;
    text-align: right; direction: rtl; text-align: right; }


/* Arabic version: error & alert messages aligned to right */
.alh-mp-card.alh-mp-form .alh-mp-alert,
.alh-mp-card.alh-mp-form .alh-mp-message,
.alh-mp-card.alh-mp-form .error {
    direction: rtl;
    text-align: right;
}


/* AR version: force RTL & right alignment inside profile forms */
.alh-mp-card.alh-mp-form,
.alh-mp-card.alh-mp-form * {
    direction: rtl !important;
    text-align: right !important;
}

/* keep button text centered */
.alh-mp-card.alh-mp-form .alh-mp-btn,
.alh-mp-card.alh-mp-form .alh-mp-btn * {
    text-align: center !important;
}



/* تذييل بسيط أسفل النماذج (روابط مثل لدي حساب بالفعل / نسيت كلمة المرور) */
.alh-mp-form-footer {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}

.alh-mp-form-footer a {
    color: #a855f7;
    text-decoration: none;
}

.alh-mp-form-footer a:hover {
    text-decoration: underline;
}

/* محاذاة عنوان البطاقة في المنتصف في النماذج العربية */
.alh-mp-card.alh-mp-form .alh-mp-title {
    text-align: center !important;
}


/* حقل كلمة المرور مع زر إظهار/إخفاء */
.alh-mp-field-password .alh-mp-pass-input-wrap {
    position: relative;
}

.alh-mp-field-password .alh-mp-pass-input-wrap input {
    padding-left: 70px;
}

.alh-mp-toggle-pass {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
}

.alh-mp-toggle-pass:focus {
    outline: none;
}


.alh-mp-toggle-pass .alh-mp-toggle-icon {
    font-size: 16px;
    line-height: 1;
}



/* Fix eye icon stability + center alert text */
.alh-mp-toggle-pass {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alh-mp-toggle-pass:hover,
.alh-mp-toggle-pass:focus {
    transform: translateY(-50%);
}

.alh-mp-toggle-pass .alh-mp-toggle-icon {
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.alh-mp-alert,
.alh-mp-message {
    text-align: center !important;
}


/* Register form: full width + grid layout */
.alh-mp-form-register.alh-mp-card{
    width: 100% !important;
    max-width: 100% !important;
}

.alh-mp-register-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 14px;
}

.alh-mp-register-grid .alh-mp-field{
    margin-bottom: 0;
}

.alh-mp-captcha{
    max-width: 420px;
    margin: 18px auto 0 auto;
}

/* Flash message wrapper */
.alh-mp-flash-wrap{
    width: 100%;
    padding: 0 14px;
    box-sizing: border-box;
}

.alh-mp-flash{
    margin: 18px auto;
}

.alh-mp-form[style*="direction:rtl"] .alh-mp-field label{ text-align:right; }
