/* My Account Redesign - Premium Mobile-First Design */

.my-account-redesign {
    --primary-color: rgb(185, 47, 77);
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Profile Header */
.account-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #E04D6A 100%);
    padding: 30px 20px 60px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    color: white;
    text-align: center;
    position: relative;
    margin-bottom: -30px;
    z-index: 1;
}

.avatar-wrapper {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 auto;
}

.account-header .avatar-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    overflow: hidden;
    background: #fff;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-profile-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-decoration: none;
    cursor: pointer;
    z-index: 3;
    border: 2px solid #fff;
}

.edit-profile-btn i {
    font-size: 16px;
    line-height: 1;
}

/* Avatar image styling is now handled by the general .avatar-wrapper img rule above */

.account-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}

.account-header p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Quick Actions Card */
.quick-actions {
    background: #fff;
    margin: 0 20px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    position: relative;
    z-index: 2;
}

.quick-action-item {
    text-align: center;
    text-decoration: none;
    color: #333;
    flex: 1;
}

.quick-action-item i {
    font-size: 24px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.quick-action-item span {
    font-size: 12px;
    font-weight: 600;
    display: block;
}

.quick-action-item .value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Menu List */
.account-menu {
    margin-top: 50px;
    padding: 0 20px;
}

.menu-group {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background-color: #f8f9fa;
}

.menu-item i.icon-start {
    font-size: 20px;
    margin-right: 15px;
    color: #555;
    width: 25px;
    text-align: center;
}

.menu-item .menu-label {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.menu-item i.icon-end {
    font-size: 18px;
    color: #ccc;
}

.menu-item.logout {
    color: #dc3545;
}

.menu-item.logout i.icon-start {
    color: #dc3545;
}

/* Orders Styling */
.order-tabs-container {
    background: #fff;
    padding: 10px 0;
    position: sticky;
    top: 75px; 
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.order-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 15px;
    gap: 10px;
    scrollbar-width: none;
}

.order-tabs::-webkit-scrollbar {
    display: none;
}

.order-tab {
    padding: 8px 15px;
    background: #f1f1f1;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.order-tab.active {
    background: var(--primary-color);
    color: #fff;
}

.order-card {
    background: #fff;
    margin: 15px 15px;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.order-id {
    font-weight: 700;
    font-size: 14px;
}

.order-status {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-received { background: #e3f2fd; color: #1976d2; }
.status-processed { background: #fff3e0; color: #f57c00; }
.status-shipped { background: #f3e5f5; color: #7b1fa2; }
.status-delivered { background: #e8f5e9; color: #388e3c; }
.status-cancelled { background: #ffebee; color: #d32f2f; }
.status-returned { background: #fafafa; color: #616161; }

.order-card-body {
    display: flex;
    gap: 15px;
}

.order-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.order-details {
    flex: 1;
}

.order-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.order-price {
    font-weight: 700;
    color: var(--primary-color);
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f8f9fa;
}

.order-date {
    font-size: 12px;
    color: #999;
}

/* Wallet Styling */
.wallet-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 25px;
    border-radius: 25px;
    margin: 20px;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.wallet-label {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.wallet-balance {
    font-size: 32px;
    font-weight: 800;
}

.wallet-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.wallet-btn {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.wallet-btn.add {
    background: #fff;
    color: #1e293b;
}

.wallet-btn.withdraw {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Address Card */
.address-card {
    background: #fff;
    margin: 15px;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    border: 2px solid transparent;
}

.address-card.default {
    border-color: var(--primary-color);
}

.address-type {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f1f1;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #666;
}

.address-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
}

.address-phone {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.address-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.address-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f8f9fa;
}

.address-action-btn {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.address-action-btn.delete {
    color: #dc3545;
}

/* RTL Adjustments */
[data-is-rtl='true'] .account-header .avatar-wrapper {
    margin-left: auto;
    margin-right: auto;
}

[data-is-rtl='true'] .menu-item i.icon-start {
    margin-right: 0;
    margin-left: 15px;
}

[data-is-rtl='true'] .menu-item i.icon-end {
    transform: rotate(180deg);
}

[data-is-rtl='true'] .address-type {
    right: auto;
    left: 20px;
}

/* Modal Styling */
.modal-bottom {
    margin: 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.modal-bottom .modal-content {
    border-radius: 30px 30px 0 0;
    padding-bottom: 30px;
}

/* Section Title */
.account-section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
    font-weight: 700;
    margin: 20px 20px 10px;
    color: #333;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.9);
    background-color: #f8f9fa;
}

[data-is-rtl='true'] .back-btn i {
    transform: rotate(180deg);
}

#edit-profile-modal .avatar-inner {
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#edit-profile-modal .avatar-wrapper {
    margin-bottom: 15px;
}

.back-btn i {
    font-size: 24px;
    line-height: 1;
}
