/* Pixo User Panel - Frontend Styles
   Designed to match pixosite.ir dark purple theme */

:root {
    --pixo-primary: #4e71fe;
    --pixo-accent: #ff63fc;
    --pixo-dark-bg: #020209;
    --pixo-card-bg: #0f0f1a;
    --pixo-text: #f4f3ef;
    --pixo-muted: rgba(244, 243, 239, 0.55);
    --pixo-border: rgba(167, 139, 250, 0.2);
    --pixo-radius: 16px;
    --pixo-radius-sm: 10px;
    --pixo-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --pixo-font: "Yekan Bakh", "Vazirmatn", "Tahoma", sans-serif;
}

/* ========== Auth / Login ========== */
.pixo-up-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 16px;
    font-family: var(--pixo-font);
    direction: rtl;
}

.pixo-up-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--pixo-card-bg);
    border: 1px solid var(--pixo-border);
    border-radius: var(--pixo-radius);
    padding: 36px 32px;
    box-shadow: var(--pixo-shadow);
    color: var(--pixo-text);
}

.pixo-up-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.pixo-up-logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(78, 113, 254, 0.2), rgba(255, 99, 252, 0.15));
    border-radius: 50%;
    color: var(--pixo-primary);
}

.pixo-up-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--pixo-text);
}

.pixo-up-subtitle {
    font-size: 0.9rem;
    color: var(--pixo-muted);
    margin: 0;
}

/* Fields */
.pixo-up-field {
    margin-bottom: 20px;
}

.pixo-up-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--pixo-text);
}

.pixo-up-field .required {
    color: var(--pixo-accent);
}

.pixo-up-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--pixo-border);
    border-radius: var(--pixo-radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pixo-up-input-wrap:focus-within {
    border-color: var(--pixo-primary);
    box-shadow: 0 0 0 3px rgba(78, 113, 254, 0.2);
}

.pixo-up-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(78, 113, 254, 0.1);
    color: var(--pixo-primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-left: 1px solid var(--pixo-border);
    direction: ltr;
}

.pixo-up-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--pixo-border);
    border-radius: var(--pixo-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--pixo-text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pixo-up-input-wrap .pixo-up-input {
    border: none;
    border-radius: 0;
    background: transparent;
}

.pixo-up-input:focus {
    border-color: var(--pixo-primary);
    box-shadow: 0 0 0 3px rgba(78, 113, 254, 0.2);
}

.pixo-up-input::placeholder {
    color: var(--pixo-muted);
}

.pixo-up-hint {
    font-size: 0.75rem;
    color: var(--pixo-muted);
    margin: 6px 0 0;
}

/* OTP Inputs */
.pixo-up-otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    direction: ltr;
    flex-wrap: nowrap;
    width: 100%;
    margin: 8px 0 4px;
}

.pixo-up-otp-inputs input {
    box-sizing: border-box;
    width: 52px;
    min-width: 52px;
    max-width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: 22px;
    line-height: 56px;
    font-weight: 700;
    font-family: "Segoe UI", "Tahoma", "Vazirmatn", "Yekan Bakh", sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    border: 1.5px solid var(--pixo-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--pixo-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -moz-appearance: textfield;
    appearance: textfield;
}

.pixo-up-otp-inputs input::-webkit-outer-spin-button,
.pixo-up-otp-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pixo-up-otp-inputs input:focus {
    border-color: var(--pixo-primary);
    box-shadow: 0 0 0 3px rgba(78, 113, 254, 0.28);
    background: rgba(78, 113, 254, 0.08);
}

/* Buttons */
.pixo-up-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--pixo-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.pixo-up-btn-primary {
    background: linear-gradient(135deg, var(--pixo-primary), #6b5ce7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(78, 113, 254, 0.35);
}

.pixo-up-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(78, 113, 254, 0.45);
    color: #fff;
}

.pixo-up-btn-primary:active {
    transform: translateY(0);
}

.pixo-up-btn-block {
    width: 100%;
}

.pixo-up-btn-google {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pixo-border);
    color: var(--pixo-text);
}

.pixo-up-btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pixo-text);
}

.pixo-up-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.pixo-up-link-btn {
    background: none;
    border: none;
    color: var(--pixo-primary);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
}

.pixo-up-link-btn:hover {
    color: var(--pixo-accent);
}

.pixo-up-link-btn:disabled {
    color: var(--pixo-muted);
    cursor: default;
}

/* Divider */
.pixo-up-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--pixo-muted);
    font-size: 0.8rem;
}

.pixo-up-divider::before,
.pixo-up-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--pixo-border);
}

.pixo-up-divider span {
    padding: 0 14px;
}

/* Resend */
.pixo-up-resend {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--pixo-muted);
}

.pixo-up-change-phone {
    display: block;
    text-align: center;
    margin-top: 12px;
    width: 100%;
}

/* Messages */
.pixo-up-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--pixo-radius-sm);
    font-size: 0.875rem;
    text-align: center;
}

.pixo-up-message.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 500;
}

.pixo-up-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Already logged / login required */
.pixo-up-already-logged,
.pixo-up-login-required {
    text-align: center;
    padding: 48px 24px;
    color: var(--pixo-text);
    font-family: var(--pixo-font);
}

.pixo-up-already-logged p,
.pixo-up-login-required p {
    margin-bottom: 16px;
    color: var(--pixo-muted);
}

/* ========== Dashboard ========== */
.pixo-up-dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px;
    font-family: var(--pixo-font);
    direction: rtl;
    color: var(--pixo-text);
}

.pixo-up-dash-sidebar {
    background: var(--pixo-card-bg);
    border: 1px solid var(--pixo-border);
    border-radius: var(--pixo-radius);
    padding: 24px 16px;
    height: fit-content;
}

.pixo-up-dash-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--pixo-border);
}

.pixo-up-dash-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.pixo-up-dash-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pixo-primary), var(--pixo-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

.pixo-up-dash-user-info strong {
    display: block;
    font-size: 0.95rem;
}

.pixo-up-dash-user-info span {
    font-size: 0.8rem;
    color: var(--pixo-muted);
    direction: ltr;
    display: block;
}

.pixo-up-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pixo-up-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--pixo-radius-sm);
    color: var(--pixo-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.pixo-up-nav-item:hover,
.pixo-up-nav-item.active {
    background: rgba(78, 113, 254, 0.12);
    color: var(--pixo-primary);
}

.pixo-up-nav-item.pixo-up-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.pixo-up-dash-content {
    min-width: 0;
}

.pixo-up-card {
    background: var(--pixo-card-bg);
    border: 1px solid var(--pixo-border);
    border-radius: var(--pixo-radius);
    padding: 28px;
}

.pixo-up-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--pixo-text);
}

.pixo-up-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pixo-up-form-actions {
    margin-top: 24px;
}

.pixo-up-alert {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    visibility: visible !important;
    opacity: 1 !important;
}

.pixo-up-alert svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.pixo-up-alert span,
.pixo-up-alert .pixo-up-alert-text {
    flex: 1;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
    font-size: inherit;
    line-height: 1.6;
}

.pixo-up-alert-warning {
    background: rgba(234, 179, 8, 0.14) !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
    color: #fbbf24 !important;
}

/* ========== Header User ========== */
.pixo-up-header-user {
    display: inline-flex !important;
    align-items: center;
    font-family: var(--pixo-font);
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 220px;
    vertical-align: middle;
    line-height: 1;
}

.pixo-up-header-user *,
.pixo-up-header-user *::before,
.pixo-up-header-user *::after {
    box-sizing: border-box;
}

.pixo-up-header-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #f4f3ef !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    line-height: 1.2 !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, filter 0.18s ease;
    border: 1px solid rgba(167, 139, 250, 0.3);
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    white-space: nowrap;
    height: auto !important;
    min-height: 0 !important;
}

.pixo-up-header-link:hover {
    transform: translateY(-1px);
    background: rgba(78, 113, 254, 0.2) !important;
    border-color: rgba(78, 113, 254, 0.5);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(78, 113, 254, 0.25);
}

/* Guest login button */
.pixo-up-header-guest .pixo-up-header-link,
.pixo-up-header-login {
    color: #fff !important;
    font-weight: 600;
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 40%, #a855f7 100%) !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    padding: 8px 16px;
    max-width: none;
}

.pixo-up-header-guest .pixo-up-header-link:hover,
.pixo-up-header-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.5);
    filter: brightness(1.08);
    color: #fff !important;
}

.pixo-up-header-avatar {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: block;
}

.pixo-up-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
    color: inherit;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.pixo-up-header-icon svg {
    display: block;
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor;
}

.pixo-up-header-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    color: inherit !important;
    font-size: inherit !important;
    line-height: 1.2 !important;
    direction: ltr;
    text-align: left;
}

/* ===== Icon-only mode (forced) ===== */
.pixo-up-header-user.pixo-up-icon-only {
    max-width: none;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-link {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    justify-content: center;
    gap: 0;
    background: linear-gradient(145deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%) !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(109, 40, 217, 0.45);
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-text {
    display: none !important;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-icon {
    width: 22px;
    height: 22px;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-icon svg {
    width: 22px !important;
    height: 22px !important;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border: 2px solid rgba(255,255,255,0.25);
}

/* ===== Auto: icon-only on mobile, full on desktop ===== */
@media (max-width: 900px) {
    .pixo-up-header-user.pixo-up-icon-auto {
        max-width: none;
    }
    .pixo-up-header-user.pixo-up-icon-auto .pixo-up-header-link {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        padding: 0 !important;
        border-radius: 999px !important;
        justify-content: center;
        gap: 0;
        background: linear-gradient(145deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%) !important;
        border: none !important;
        box-shadow: 0 4px 18px rgba(109, 40, 217, 0.45);
    }
    .pixo-up-header-user.pixo-up-icon-auto .pixo-up-header-text {
        display: none !important;
    }
    .pixo-up-header-user.pixo-up-icon-auto .pixo-up-header-icon {
        width: 22px;
        height: 22px;
    }
    .pixo-up-header-user.pixo-up-icon-auto .pixo-up-header-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
    .pixo-up-header-user.pixo-up-icon-auto .pixo-up-header-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        border: 2px solid rgba(255,255,255,0.25);
    }
}

.menu-item .pixo-up-header-user,
.pixo-up-menu-item .pixo-up-header-user,
li.pixo-up-menu-item {
    max-width: 220px;
}

.woocommerce .pixo-up-header-avatar,
.woocommerce-page .pixo-up-header-avatar {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
}

/* Spinner */
@keyframes pixo-spin {
    to { transform: rotate(360deg); }
}

.pixo-spin {
    animation: pixo-spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .pixo-up-dashboard {
        grid-template-columns: 1fr;
    }

    .pixo-up-dash-sidebar {
        order: -1;
    }

    .pixo-up-dash-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pixo-up-form-row {
        grid-template-columns: 1fr;
    }

    .pixo-up-auth-card {
        padding: 28px 20px;
    }

    .pixo-up-otp-inputs input {
        width: 46px;
        min-width: 46px;
        max-width: 48px;
        height: 50px;
        min-height: 50px;
        font-size: 20px;
        line-height: 50px;
    }

    .pixo-up-otp-inputs {
        gap: 8px;
    }
}


/* ========== Cart in Dashboard ========== */
.pixo-up-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-right: auto;
    margin-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pixo-primary), var(--pixo-accent));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.pixo-up-cart-empty {
    text-align: center;
    padding: 40px 20px 28px;
}

.pixo-up-cart-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(78, 113, 254, 0.12), rgba(255, 99, 252, 0.1));
    color: var(--pixo-primary);
}

.pixo-up-cart-empty-img {
    max-width: 160px;
    max-height: 160px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
}

.pixo-up-cart-empty-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--pixo-text);
}

.pixo-up-cart-empty-text {
    font-size: 0.9rem;
    color: var(--pixo-muted);
    margin: 0 0 24px;
    line-height: 1.7;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.pixo-up-cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pixo-up-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--pixo-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pixo-border);
}

.pixo-up-cart-item-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.pixo-up-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pixo-up-cart-item-info {
    flex: 1;
    min-width: 0;
}

.pixo-up-cart-item-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pixo-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pixo-up-cart-item-name:hover {
    color: var(--pixo-primary);
}

.pixo-up-cart-item-meta {
    font-size: 0.8rem;
    color: var(--pixo-muted);
}

.pixo-up-cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pixo-text);
    white-space: nowrap;
}

.pixo-up-cart-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--pixo-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pixo-up-cart-total {
    font-size: 0.95rem;
    color: var(--pixo-muted);
}

.pixo-up-cart-total strong {
    color: var(--pixo-text);
    font-size: 1.1rem;
    margin-right: 8px;
}

.pixo-up-cart-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pixo-up-btn-outline {
    background: transparent;
    color: var(--pixo-text);
    border: 1px solid var(--pixo-border);
}

.pixo-up-btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pixo-text);
    border-color: var(--pixo-primary);
}

.pixo-up-nav-item {
    position: relative;
}

@media (max-width: 768px) {
    .pixo-up-cart-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .pixo-up-cart-actions {
        width: 100%;
    }
    .pixo-up-cart-actions .pixo-up-btn {
        flex: 1;
        text-align: center;
    }
}


/* Force icon-only: pure circle user button (no logout icon, no text) */
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-link,
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-login {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    background: linear-gradient(145deg, #8b5cf6 0%, #7c3aed 45%, #6d28d9 100%) !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(109, 40, 217, 0.45) !important;
    color: #fff !important;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-text {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-icon {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    color: #fff !important;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-icon svg {
    width: 22px !important;
    height: 22px !important;
    stroke: #fff !important;
}
.pixo-up-header-user.pixo-up-icon-only .pixo-up-header-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
}

/* ========== Phone verification in profile ========== */
.pixo-up-phone-field .pixo-up-verified-badge {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 999px;
    vertical-align: middle;
}

.pixo-up-phone-verified-row,
.pixo-up-phone-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.pixo-up-phone-verified-row .pixo-up-input,
.pixo-up-phone-input-row .pixo-up-input {
    flex: 1;
    min-width: 0;
}




.pixo-up-phone-verified-success {
    margin-top: 12px;
    padding: 12px 20px;
    border-radius: 999px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.pixo-up-btn-sm {
    padding: 10px 14px !important;
    font-size: 13px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.pixo-up-btn-secondary {
    background: rgba(167, 139, 250, 0.12) !important;
    border: 1px solid var(--pixo-border) !important;
    color: var(--pixo-text) !important;
}

.pixo-up-btn-secondary:hover {
    background: rgba(167, 139, 250, 0.22) !important;
}

.pixo-up-phone-otp-step {
    margin-top: 14px;
    padding: 14px;
    background: rgba(78, 113, 254, 0.06);
    border: 1px solid var(--pixo-border);
    border-radius: var(--pixo-radius-sm);
}

.pixo-up-phone-otp-step .pixo-up-otp-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--pixo-muted);
}

.pixo-up-phone-otp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.pixo-up-phone-otp-step .pixo-up-otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    direction: ltr;
}

.pixo-up-phone-otp-step .pixo-up-otp-inputs input {
    box-sizing: border-box;
    width: 48px;
    min-width: 48px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    text-align: center;
    font-size: 20px;
    line-height: 52px;
    font-weight: 700;
    font-family: "Segoe UI", "Tahoma", "Vazirmatn", sans-serif;
    font-variant-numeric: tabular-nums;
    border-radius: 12px;
    border: 1.5px solid var(--pixo-border);
    background: var(--pixo-card-bg);
    color: var(--pixo-text);
}

.pixo-up-phone-otp-step .pixo-up-otp-inputs input:focus {
    outline: none;
    border-color: var(--pixo-primary);
    box-shadow: 0 0 0 3px rgba(78, 113, 254, 0.2);
}

.pixo-up-timer {
    font-size: 12px;
    color: var(--pixo-muted);
}

#pixo-phone-message {
    margin-top: 10px;
}

.pixo-up-phone-field .pixo-up-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--pixo-muted);
}

@media (max-width: 520px) {
    .pixo-up-phone-verified-row,
    .pixo-up-phone-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    .pixo-up-btn-sm {
        width: 100%;
    }
}

/* ========== Recent Orders ========== */
.pixo-up-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
}

.pixo-up-orders-head,
.pixo-up-order-row {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 12px;
}

.pixo-up-orders-head {
    font-size: 12px;
    font-weight: 600;
    color: var(--pixo-muted);
    border-bottom: 1px solid var(--pixo-border);
    padding-bottom: 10px;
}

.pixo-up-order-row {
    border-bottom: 1px solid rgba(167, 139, 250, 0.1);
    transition: background 0.15s ease;
}

.pixo-up-order-row:last-child {
    border-bottom: none;
}

.pixo-up-order-row:hover {
    background: rgba(167, 139, 250, 0.06);
    border-radius: 10px;
}

.pixo-up-order-col-id a {
    color: var(--pixo-text);
    font-weight: 600;
    text-decoration: none;
}

.pixo-up-order-col-id a:hover {
    color: var(--pixo-primary);
}

.pixo-up-order-col-date {
    font-size: 13px;
    color: var(--pixo-muted);
    direction: ltr;
    text-align: right;
}

.pixo-up-order-col-total {
    font-weight: 600;
    font-size: 13px;
}

.pixo-up-order-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
    white-space: nowrap;
}

/* سبز — انجام شده */
.pixo-up-order-status-success,
.pixo-up-order-status-completed {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* بنفش/آبی — در حال آماده‌سازی */
.pixo-up-order-status-info,
.pixo-up-order-status-processing {
    background: rgba(78, 113, 254, 0.16) !important;
    color: #93a8ff !important;
    border: 1px solid rgba(78, 113, 254, 0.35);
}

/* زرد — در انتظار */
.pixo-up-order-status-warning,
.pixo-up-order-status-on-hold,
.pixo-up-order-status-pending {
    background: rgba(234, 179, 8, 0.16) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

/* قرمز — لغو / ناموفق */
.pixo-up-order-status-danger,
.pixo-up-order-status-cancelled,
.pixo-up-order-status-failed,
.pixo-up-order-status-refunded {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.pixo-up-order-col-action {
    text-align: left;
}

.pixo-up-orders-empty .pixo-up-cart-empty-text {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 720px) {
    .pixo-up-orders-head {
        display: none;
    }

    .pixo-up-order-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "id total"
            "date status"
            "action action";
        gap: 8px 12px;
        padding: 16px 12px;
        border: 1px solid var(--pixo-border);
        border-radius: 12px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--pixo-border);
    }

    .pixo-up-order-col-id { grid-area: id; }
    .pixo-up-order-col-date { grid-area: date; text-align: right; }
    .pixo-up-order-col-status { grid-area: status; text-align: left; }
    .pixo-up-order-col-total { grid-area: total; text-align: left; }
    .pixo-up-order-col-action { grid-area: action; text-align: stretch; }

    .pixo-up-order-col-action .pixo-up-btn {
        width: 100%;
        justify-content: center;
    }
}


/* Phone status banner — full width of field, pill style like login success */
.pixo-up-phone-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.pixo-up-phone-field .pixo-up-phone-banner,
#pixo-phone-banner.pixo-up-phone-banner {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 12px !important;
    padding: 12px 20px !important;
    border-radius: 999px !important;
    text-align: center !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.pixo-up-phone-banner-success,
#pixo-phone-banner.pixo-up-phone-banner-success {
    background: rgba(16, 185, 129, 0.14) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
}

.pixo-up-phone-banner-danger,
#pixo-phone-banner.pixo-up-phone-banner-danger {
    background: rgba(239, 68, 68, 0.14) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

/* Temporary AJAX messages under phone also pill-shaped */
#pixo-phone-message.success {
    background: rgba(16, 185, 129, 0.14) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
    border-radius: 999px !important;
    padding: 12px 20px !important;
    text-align: center !important;
}

#pixo-phone-message.error {
    background: rgba(239, 68, 68, 0.14) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    border-radius: 999px !important;
    padding: 12px 20px !important;
    text-align: center !important;
}

/* Never show send-code button in profile */
#pixo-send-phone-otp,
.pixo-up-phone-field #pixo-send-phone-otp,
.pixo-up-phone-input-row #pixo-send-phone-otp {
    display: none !important;
}

.pixo-up-phone-field > .pixo-up-input,
.pixo-up-phone-verify-wrap > .pixo-up-input {
    width: 100%;
    box-sizing: border-box;
}

.pixo-up-phone-field > .pixo-up-input[readonly],
.pixo-up-phone-field > .pixo-up-input:disabled {
    width: 100%;
    opacity: 0.95;
    cursor: default;
}

/* Phone register/change tab */
.pixo-up-phone-flow {
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pixo-up-phone-flow .pixo-up-btn-block {
    width: 100%;
}

.pixo-up-phone-otp-block {
    margin-top: 8px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(78, 113, 254, 0.06);
    border: 1px solid var(--pixo-border);
}

.pixo-up-phone-flow .pixo-up-message {
    margin-top: 4px;
}

.pixo-up-phone-flow .pixo-up-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ========== WooCommerce My Account — Pixo sidebar ========== */
.pixo-up-wc-sidebar {
    background: var(--pixo-card-bg, #0f0f1a);
    border: 1px solid var(--pixo-border, rgba(167, 139, 250, 0.2));
    border-radius: 16px;
    padding: 20px 16px;
    color: var(--pixo-text, #f4f3ef);
    font-family: var(--pixo-font, inherit);
    margin-bottom: 24px;
}

.pixo-up-wc-sidebar .pixo-up-dash-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--pixo-border, rgba(167, 139, 250, 0.2));
}

.pixo-up-wc-sidebar .pixo-up-dash-avatar,
.pixo-up-wc-sidebar .pixo-up-dash-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.pixo-up-wc-sidebar .pixo-up-dash-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.pixo-up-wc-sidebar .pixo-up-dash-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pixo-up-wc-sidebar .pixo-up-dash-user-info strong {
    font-size: 0.95rem;
    color: var(--pixo-text, #f4f3ef);
}

.pixo-up-wc-sidebar .pixo-up-dash-user-info span {
    font-size: 0.8rem;
    color: var(--pixo-muted, rgba(244, 243, 239, 0.55));
    direction: ltr;
    text-align: right;
}

.pixo-up-wc-sidebar .pixo-up-wc-nav {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pixo-up-wc-sidebar .pixo-up-wc-nav li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pixo-up-wc-sidebar .pixo-up-nav-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 14px !important;
    border-radius: 12px;
    color: var(--pixo-muted, rgba(244, 243, 239, 0.7)) !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    background: transparent !important;
    border: none !important;
}

.pixo-up-wc-sidebar .pixo-up-nav-item:hover,
.pixo-up-wc-sidebar .pixo-up-nav-item.active {
    background: rgba(124, 58, 237, 0.25) !important;
    color: #c4b5fd !important;
}

.pixo-up-wc-sidebar .pixo-up-nav-item svg {
    flex-shrink: 0;
}

/* Keep WC layout: navigation column uses our sidebar */
.woocommerce-account .woocommerce-MyAccount-navigation.pixo-up-wc-sidebar {
    width: 100%;
}

@media (min-width: 769px) {
    .woocommerce-account .woocommerce {
        display: flex;
        flex-wrap: wrap;
        gap: 24px;
        align-items: flex-start;
    }
    .woocommerce-account .woocommerce-MyAccount-navigation.pixo-up-wc-sidebar {
        flex: 0 0 280px;
        max-width: 300px;
    }
    .woocommerce-account .woocommerce-MyAccount-content {
        flex: 1 1 0;
        min-width: 0;
    }
}
