/* تصميم وتطوير شركة دروب أيديا للتجارة الرقمية والالكترونية */
/* https://dropidea.com */

/**
 * Rgheeb My Account Page Styles
 * Controls: my-account.php, navigation.php, dashboard.php, orders.php,
 *           view-order.php, form-login.php, form-edit-account.php
 *
 * Change :root variables below to customize all colors at once
 */

:root {
    /* === الألوان الرئيسية === */
    --rgheeb-primary: #667eea;
    --rgheeb-primary-dark: #5a6fd6;
    --rgheeb-primary-light: #8b9df0;
    --rgheeb-secondary: #764ba2;
    --rgheeb-gradient: linear-gradient(135deg, var(--rgheeb-primary) 0%, var(--rgheeb-secondary) 100%);

    /* === ألوان النصوص === */
    --rgheeb-text-dark: #2d3748;
    --rgheeb-text-medium: #4a5568;
    --rgheeb-text-light: #718096;
    --rgheeb-text-muted: #a0aec0;

    /* === ألوان الخلفية === */
    --rgheeb-bg-page: #f7f8fc;
    --rgheeb-bg-card: #ffffff;
    --rgheeb-bg-input: #f7f8fc;

    /* === الحدود والظلال === */
    --rgheeb-border: #e2e8f0;
    --rgheeb-border-radius: 12px;
    --rgheeb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --rgheeb-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --rgheeb-shadow-hover: 0 6px 20px rgba(102, 126, 234, 0.2);

    /* === حالات الطلبات === */
    --rgheeb-status-success: #48bb78;
    --rgheeb-status-warning: #ed8936;
    --rgheeb-status-danger: #f56565;
    --rgheeb-status-info: #4299e1;
}


/* ===========================
   1. هيكل الحساب الرئيسي + القائمة الجانبية
   متوافق مع ثيم XTRA / Codevz Plus
   =========================== */

/* === إخفاء قسم الصورة الشخصية (Codevz avatar) === */
.codevz-account-avatar,
.woocommerce-MyAccount-navigation .codevz-account-avatar {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    visibility: hidden !important;
}

/* === القائمة الجانبية — ثابتة عند التمرير === */
.woocommerce-MyAccount-navigation {
    position: sticky !important;
    top: 100px !important;
    align-self: flex-start !important;
    z-index: 10;
    border-radius: var(--rgheeb-border-radius);
    padding: 8px !important;
    margin-top: 0 !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
}

/* === تنسيق عناصر القائمة === */
.woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 11px 16px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    transition: all 0.25s ease !important;
    border: none !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    margin: 0 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    opacity: 0.85;
}

/* === أيقونات Codevz — إصلاح الموضع والمحاذاة === */
.woocommerce-MyAccount-navigation ul li a::before {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    vertical-align: middle !important;
}

/* خط فاصل قبل تسجيل الخروج */
.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 6px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.woocommerce-MyAccount-content {
    background: var(--rgheeb-bg-card);
    border-radius: var(--rgheeb-border-radius);
    padding: 30px;
    box-shadow: var(--rgheeb-shadow-sm);
    border: 1px solid var(--rgheeb-border);
}


/* ===========================
   3. لوحة التحكم
   dashboard.php
   =========================== */

.woocommerce-MyAccount-content > p:first-child {
    background: var(--rgheeb-bg-input);
    padding: 20px;
    border-radius: var(--rgheeb-border-radius);
    border: 1px solid var(--rgheeb-border);
    color: var(--rgheeb-text-medium);
    font-size: 15px;
    line-height: 1.8;
}

.woocommerce-MyAccount-content > p:first-child a {
    color: var(--rgheeb-primary);
    font-weight: 600;
    text-decoration: none;
}

.woocommerce-MyAccount-content > p:first-child a:hover {
    text-decoration: underline;
}


/* ===========================
   4. قائمة الطلبات
   orders.php
   =========================== */

.woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--rgheeb-border);
    border-radius: var(--rgheeb-border-radius);
    overflow: hidden;
}

.woocommerce-orders-table thead th {
    background: var(--rgheeb-bg-input);
    color: var(--rgheeb-primary);
    font-weight: 600;
    font-size: 13px;
    padding: 14px 16px;
    text-align: right;
    border-bottom: 2px solid var(--rgheeb-primary-light);
}

.woocommerce-orders-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--rgheeb-text-medium);
    border-bottom: 1px solid var(--rgheeb-border);
    vertical-align: middle;
}

.woocommerce-orders-table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce-orders-table tbody tr:hover {
    background: var(--rgheeb-bg-input);
}

.woocommerce-orders-table .woocommerce-button {
    display: inline-block;
    padding: 8px 18px;
    background: var(--rgheeb-gradient);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocommerce-orders-table .woocommerce-button:hover {
    box-shadow: var(--rgheeb-shadow-hover);
    transform: translateY(-1px);
}


/* ===========================
   5. تفاصيل طلب واحد
   view-order.php
   =========================== */

.woocommerce-order-details {
    background: var(--rgheeb-bg-card);
    border-radius: var(--rgheeb-border-radius);
    padding: 0;
}

.woocommerce-order-details__title {
    font-size: 20px;
    color: var(--rgheeb-text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rgheeb-border);
}


/* ===========================
   6. صفحة تسجيل الدخول
   form-login.php
   =========================== */

.woocommerce-form-login,
.woocommerce-form-register {
    background: var(--rgheeb-bg-card);
    border: 1px solid var(--rgheeb-border);
    border-radius: var(--rgheeb-border-radius);
    padding: 30px;
    box-shadow: var(--rgheeb-shadow-sm);
}

.woocommerce-form-login h2,
.woocommerce-form-register h2 {
    font-size: 22px;
    color: var(--rgheeb-text-dark);
    margin-bottom: 20px;
}

.woocommerce-form-login .form-row label,
.woocommerce-form-register .form-row label {
    color: var(--rgheeb-text-medium);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.woocommerce-form-login .input-text,
.woocommerce-form-register .input-text {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--rgheeb-border);
    border-radius: 8px;
    background: var(--rgheeb-bg-input);
    font-size: 14px;
    color: var(--rgheeb-text-dark);
    transition: border-color 0.2s;
}

.woocommerce-form-login .input-text:focus,
.woocommerce-form-register .input-text:focus {
    border-color: var(--rgheeb-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.woocommerce-form-login .woocommerce-button,
.woocommerce-form-register .woocommerce-button,
.woocommerce-form-login button[type="submit"],
.woocommerce-form-register button[type="submit"] {
    background: var(--rgheeb-gradient);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.woocommerce-form-login .woocommerce-button:hover,
.woocommerce-form-register .woocommerce-button:hover,
.woocommerce-form-login button[type="submit"]:hover,
.woocommerce-form-register button[type="submit"]:hover {
    box-shadow: var(--rgheeb-shadow-hover);
    transform: translateY(-1px);
}

.woocommerce-form-login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--rgheeb-text-light);
    font-size: 13px;
    margin: 10px 0;
}

.woocommerce-form-login .lost_password a {
    color: var(--rgheeb-primary);
    font-size: 13px;
    text-decoration: none;
}

.woocommerce-form-login .lost_password a:hover {
    text-decoration: underline;
}


/* ===========================
   7. تعديل الحساب
   form-edit-account.php
   =========================== */

.woocommerce-EditAccountForm .form-row label {
    color: var(--rgheeb-text-medium);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.woocommerce-EditAccountForm .input-text {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--rgheeb-border);
    border-radius: 8px;
    background: var(--rgheeb-bg-input);
    font-size: 14px;
    color: var(--rgheeb-text-dark);
    transition: border-color 0.2s;
}

.woocommerce-EditAccountForm .input-text:focus {
    border-color: var(--rgheeb-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.woocommerce-EditAccountForm fieldset {
    border: 1px solid var(--rgheeb-border);
    border-radius: var(--rgheeb-border-radius);
    padding: 20px;
    margin: 20px 0;
}

.woocommerce-EditAccountForm fieldset legend {
    color: var(--rgheeb-text-dark);
    font-weight: 600;
    font-size: 16px;
    padding: 0 10px;
}

.woocommerce-EditAccountForm button[type="submit"] {
    background: var(--rgheeb-gradient);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-EditAccountForm button[type="submit"]:hover {
    box-shadow: var(--rgheeb-shadow-hover);
    transform: translateY(-1px);
}


/* ===========================
   8. رسائل WooCommerce
   =========================== */

.woocommerce-message {
    border-color: var(--rgheeb-status-success) !important;
    background: rgba(72, 187, 120, 0.08);
    border-radius: 8px;
    padding: 14px 20px;
    color: var(--rgheeb-text-medium);
}

.woocommerce-error {
    border-color: var(--rgheeb-status-danger) !important;
    background: rgba(245, 101, 101, 0.08);
    border-radius: 8px;
    color: var(--rgheeb-text-medium);
}

.woocommerce-info {
    border-color: var(--rgheeb-status-info) !important;
    background: rgba(66, 153, 225, 0.08);
    border-radius: 8px;
    color: var(--rgheeb-text-medium);
}


/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
    .woocommerce-MyAccount-content {
        padding: 18px;
    }

    .woocommerce-MyAccount-navigation {
        position: static !important;
        max-height: none !important;
    }

    .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-orders-table tbody td {
        display: block;
        text-align: right;
        padding: 10px 16px;
        font-size: 13px;
    }

    .woocommerce-orders-table tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        color: var(--rgheeb-text-dark);
        display: inline;
        margin-left: 8px;
    }

    .woocommerce-orders-table tbody tr {
        border-bottom: 2px solid var(--rgheeb-border);
        margin-bottom: 10px;
        display: block;
    }

    .woocommerce-form-login,
    .woocommerce-form-register {
        padding: 20px;
    }
}
