/* =========================================================
   Sahel Membership - Frontend Styles
   RTL / Responsive / Consolidated
   ========================================================= */

.sahel-membership-lock,
.sahel-membership-ui,
.sahel-membership-auth,
.sahel-membership-account {
    direction: rtl;
    font-family: inherit;
    box-sizing: border-box;
}

.sahel-membership-lock *,
.sahel-membership-lock *::before,
.sahel-membership-lock *::after,
.sahel-membership-ui *,
.sahel-membership-ui *::before,
.sahel-membership-ui *::after,
.sahel-membership-auth *,
.sahel-membership-auth *::before,
.sahel-membership-auth *::after,
.sahel-membership-account *,
.sahel-membership-account *::before,
.sahel-membership-account *::after {
    box-sizing: border-box;
}

/* ---------- Locked content ---------- */

.sahel-membership-lock {
    width: 100%;
    margin: 40px auto;
    padding: 20px 15px;
}

.sahel-membership-lock__card {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: 50px 35px 35px;
    overflow: hidden;
    text-align: center;
    background: #fff;
    border: 1px solid #e8e8ee;
    border-radius: 20px;
    box-shadow: 0 12px 45px rgba(20, 20, 50, .06);
}

.sahel-membership-lock__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #7367f0, #9b8cff, #7367f0);
}

.sahel-membership-lock__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 22px;
    color: #7367f0;
    background: #f2f0ff;
    border-radius: 50%;
}

.sahel-membership-lock__badge {
    display: inline-block;
    margin-bottom: 15px;
    padding: 7px 16px;
    color: #7367f0;
    background: #f2f0ff;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}

.sahel-membership-lock__title {
    margin: 0 0 18px;
    color: #252538;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.8;
}

.sahel-membership-lock__description {
    max-width: 520px;
    margin: 0 auto 30px;
    color: #777787;
    font-size: 15px;
    line-height: 2.2;
}

.sahel-membership-lock__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sahel-membership-lock__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.sahel-membership-lock__button--primary {
    color: #fff !important;
    background: #7367f0;
    box-shadow: 0 6px 18px rgba(115, 103, 240, .22);
}

.sahel-membership-lock__button--primary:hover {
    color: #fff !important;
    background: #6255e7;
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(115, 103, 240, .3);
}

.sahel-membership-lock__button--secondary {
    color: #55556b !important;
    background: #f6f6fa;
    border: 1px solid #e7e7ef;
}

.sahel-membership-lock__button--secondary:hover {
    color: #7367f0 !important;
    background: #f0eeff;
    border-color: #d8d3ff;
    transform: translateY(-2px);
}

.sahel-membership-lock__footer {
    margin-top: 30px;
    padding-top: 20px;
    color: #9999a8;
    border-top: 1px solid #f0f0f4;
    font-size: 12px;
    line-height: 1.8;
}

/* ---------- Plans and general frontend ---------- */

.sahel-membership-ui {
    width: 100%;
    max-width: 1200px;
    margin: 35px auto;
    padding: 15px;
    color: #28283b;
}

.sahel-membership-ui a {
    text-decoration: none;
}

.sahel-membership-ui__header {
    margin-bottom: 35px;
    text-align: center;
}

.sahel-membership-ui__header h2 {
    margin: 0 0 12px;
    color: #28283b;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.8;
}

.sahel-membership-ui__header p {
    margin: 0;
    color: #77778a;
    font-size: 15px;
    line-height: 2;
}

.sahel-membership-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
}

.sahel-membership-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px 25px;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(25, 25, 55, .04);
    transition: transform .25s ease, box-shadow .25s ease;
}

.sahel-membership-plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(25, 25, 55, .09);
}

.sahel-membership-plan__name {
    margin: 0 0 12px;
    color: #28283b;
    font-size: 21px;
    font-weight: 800;
}

.sahel-membership-plan__description {
    min-height: 48px;
    margin: 0 0 22px;
    color: #77778a;
    font-size: 14px;
    line-height: 2;
}

.sahel-membership-plan__price {
    margin: 0 0 8px;
    color: #7367f0;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.8;
}

.sahel-membership-plan__price small {
    color: #77778a;
    font-size: 13px;
    font-weight: 500;
}

.sahel-membership-plan__duration {
    margin-bottom: 22px;
    color: #77778a;
    font-size: 13px;
}

.sahel-membership-plan__divider {
    height: 1px;
    margin: 0 0 22px;
    background: #ededf3;
}

.sahel-membership-plan__features {
    flex: 1;
    margin: 0 0 25px;
    padding: 0;
    list-style: none;
}

.sahel-membership-plan__features li {
    position: relative;
    margin-bottom: 12px;
    padding: 0 25px 0 0;
    color: #55556b;
    font-size: 14px;
    line-height: 1.9;
}

.sahel-membership-plan__features li::before {
    content: "✓";
    position: absolute;
    top: 0;
    right: 0;
    color: #28a879;
    font-weight: 800;
}

.sahel-membership-plan__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    color: #fff !important;
    background: #7367f0;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.sahel-membership-plan__button:hover {
    color: #fff !important;
    background: #6255e7;
    transform: translateY(-2px);
}

.sahel-membership-plan__button--outline {
    color: #7367f0 !important;
    background: #f2f0ff;
}

.sahel-membership-plan__button--outline:hover {
    color: #6255e7 !important;
    background: #e8e5ff;
}

/* ---------- Account dashboard ---------- */

.sahel-membership-account {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 18px;
    color: #253047;
    text-align: right;
}

.sahel-membership-account h2,
.sahel-membership-account h3 {
    color: #1d293d;
    font-weight: 700;
    line-height: 1.7;
}

.sahel-membership-account p {
    color: #64748b;
    line-height: 1.9;
}

.sahel-account-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
    padding: 28px;
    background: linear-gradient(135deg, #f0f5ff, #fff);
    border: 1px solid #e3eaf5;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(25, 50, 90, .05);
}

.sahel-account-header img {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    object-fit: cover;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .08);
}

.sahel-account-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.sahel-account-header p {
    margin: 0;
    font-size: 14px;
}

.sahel-account-section {
    margin-bottom: 24px;
    padding: 28px;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 18px;
    box-shadow: 0 5px 22px rgba(20, 40, 70, .035);
}

.sahel-account-section > h3 {
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf1f6;
    font-size: 20px;
}

.sahel-account-section form {
    display: block;
}

.sahel-account-section label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.sahel-account-section input[type="text"],
.sahel-account-section input[type="email"],
.sahel-account-section input[type="url"],
.sahel-account-section input[type="password"],
.sahel-account-section textarea,
.sahel-account-section select {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 15px;
    color: #253047;
    background: #fbfcfe;
    border: 1px solid #dce3ed;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sahel-account-section textarea {
    min-height: 120px;
    resize: vertical;
}

.sahel-account-section input:focus,
.sahel-account-section textarea:focus,
.sahel-account-section select:focus {
    outline: none;
    border-color: #5478d4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(84, 120, 212, .12);
}

.sahel-account-btn,
.sahel-account-section button[type="submit"],
.sahel-account-section input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 24px;
    color: #fff !important;
    background: #315fc4;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.sahel-account-btn:hover,
.sahel-account-section button[type="submit"]:hover,
.sahel-account-section input[type="submit"]:hover {
    color: #fff !important;
    background: #244da7;
    transform: translateY(-1px);
}

/* Membership tables: dashboard style takes precedence over generic table rules */

.sahel-membership-account__table-wrap {
    width: 100%;
    overflow-x: auto;
}

.sahel-membership-account table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e8edf4;
    border-radius: 12px;
    font-size: 14px;
}

.sahel-membership-account table th {
    padding: 15px;
    color: #374151;
    background: #f5f7fb;
    border-bottom: 1px solid #e8edf4;
    font-weight: 700;
    text-align: right;
}

.sahel-membership-account table td {
    padding: 15px;
    color: #4b5563;
    border-bottom: 1px solid #edf1f6;
    text-align: right;
}

.sahel-membership-account table tr:last-child td {
    border-bottom: 0;
}

.sahel-membership-account__status {
    display: inline-block;
    padding: 6px 13px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
}

.sahel-membership-account__status--active {
    color: #16865e;
    background: #e7f8f0;
}

.sahel-membership-account__status--expired {
    color: #c04a4a;
    background: #fff0f0;
}

.sahel-membership-account__empty,
.sahel-account-empty {
    padding: 32px 20px;
    color: #77778a;
    background: #f8faff;
    border: 1px dashed #d5dfef;
    border-radius: 14px;
    line-height: 2;
    text-align: center;
}

.sahel-account-empty h4 {
    margin: 12px 0;
    color: #253047;
    font-size: 17px;
}

.sahel-account-empty p {
    margin: 0 0 20px;
}

.sahel-membership-account__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.sahel-membership-account a {
    transition: color .2s ease;
}

.sahel-membership-account a:not(.sahel-account-btn) {
    color: #315fc4;
    text-decoration: none;
}

.sahel-membership-account a:not(.sahel-account-btn):hover {
    color: #244da7;
}

.sahel-account-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 11px 22px;
    color: #b42323 !important;
    background: #fff7f7;
    border: 1px solid #f0d6d6;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.sahel-account-logout:hover {
    background: #ffeded;
    border-color: #e9bcbc;
}

/* ---------- Login / registration ---------- */

.sahel-membership-auth {
    max-width: 520px;
    margin: 35px auto;
    padding: 15px;
}

.sahel-membership-auth__card {
    padding: 35px;
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(25, 25, 55, .06);
}

.sahel-membership-auth__header {
    margin-bottom: 25px;
    text-align: center;
}

.sahel-membership-auth__header h2 {
    margin: 0 0 10px;
    color: #28283b;
    font-size: 25px;
    font-weight: 800;
}

.sahel-membership-auth__header p {
    margin: 0;
    color: #77778a;
    font-size: 14px;
    line-height: 2;
}

.sahel-membership-auth__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    padding: 5px;
    background: #f5f5fa;
    border-radius: 10px;
}

.sahel-membership-auth__tab {
    flex: 1;
    padding: 12px;
    color: #77778a;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.sahel-membership-auth__tab.is-active {
    color: #fff;
    background: #7367f0;
    box-shadow: 0 4px 12px rgba(115, 103, 240, .2);
}

.sahel-membership-auth__form {
    display: none;
}

.sahel-membership-auth__form.is-active {
    display: block;
}

.sahel-membership-auth__field {
    margin-bottom: 18px;
}

.sahel-membership-auth__field label {
    display: block;
    margin-bottom: 8px;
    color: #44445a;
    font-size: 13px;
    font-weight: 700;
}

.sahel-membership-auth__field input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 15px;
    color: #28283b;
    background: #fafafe;
    border: 1px solid #e4e4ed;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sahel-membership-auth__field input:focus {
    border-color: #7367f0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(115, 103, 240, .1);
}

.sahel-membership-auth__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    padding: 12px;
    color: #fff;
    background: #7367f0;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.sahel-membership-auth__submit:hover {
    background: #6255e7;
}

.sahel-membership-auth__notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 2;
}

.sahel-membership-auth__notice--error {
    color: #b42323;
    background: #fff0f0;
    border: 1px solid #ffdada;
}

.sahel-membership-auth__notice--success {
    color: #16865e;
    background: #e7f8f0;
    border: 1px solid #c9efdd;
}

.sahel-membership-auth__footer {
    margin-top: 22px;
    color: #9999a8;
    font-size: 12px;
    line-height: 2;
    text-align: center;
}

.sahel-membership-auth__footer a {
    color: #7367f0;
    font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .sahel-membership-plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sahel-membership-account {
        margin: 24px auto;
        padding: 0 12px;
    }

    .sahel-account-header {
        gap: 15px;
        padding: 20px;
        border-radius: 16px;
    }

    .sahel-account-header img {
        width: 65px;
        height: 65px;
    }

    .sahel-account-header h2 {
        font-size: 19px;
    }

    .sahel-account-section {
        padding: 20px 16px;
        border-radius: 15px;
    }

    .sahel-account-section > h3 {
        font-size: 18px;
    }

    .sahel-membership-account table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .sahel-account-btn,
    .sahel-account-section button[type="submit"],
    .sahel-account-section input[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .sahel-membership-lock {
        margin: 20px auto;
        padding: 10px;
    }

    .sahel-membership-lock__card {
        padding: 35px 20px 25px;
        border-radius: 15px;
    }

    .sahel-membership-lock__icon {
        width: 75px;
        height: 75px;
    }

    .sahel-membership-lock__title {
        font-size: 20px;
    }

    .sahel-membership-lock__description {
        font-size: 14px;
    }

    .sahel-membership-lock__actions {
        flex-direction: column;
        width: 100%;
    }

    .sahel-membership-lock__button {
        width: 100%;
    }

    .sahel-membership-lock__footer {
        margin-top: 22px;
    }

    .sahel-membership-ui {
        margin: 20px auto;
        padding: 10px;
    }

    .sahel-membership-ui__header h2 {
        font-size: 22px;
    }

    .sahel-membership-plans {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .sahel-membership-plan {
        padding: 25px 20px;
    }

    .sahel-membership-auth {
        margin: 20px auto;
        padding: 10px;
    }

    .sahel-membership-auth__card {
        padding: 25px 18px;
    }

    .sahel-membership-auth__header h2 {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .sahel-account-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sahel-account-header img {
        width: 72px;
        height: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sahel-membership-lock__button,
    .sahel-membership-plan,
    .sahel-membership-plan__button,
    .sahel-account-btn,
    .sahel-account-section button[type="submit"],
    .sahel-account-section input[type="submit"] {
        transition: none;
    }
}
