/* 
 * User Account Styles 
 */

.account-sidebar {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.account-sidebar .nav-link {
    color: var(--bs-dark);
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.account-sidebar .nav-link:hover,
.account-sidebar .nav-link.active {
    background-color: var(--bs-primary);
    color: white;
}

.account-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.account-content {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.account-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.account-title {
    margin-bottom: 0;
    font-weight: 600;
}

/* Profile */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #eee;
}

.avatar-upload {
    position: relative;
    width: 120px;
    margin: 0 auto 20px;
}

.avatar-upload .avatar-edit {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 34px;
    height: 34px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.avatar-upload input {
    display: none;
}

/* Orders */
.order-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.order-number {
    font-weight: 600;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background-color: #ffeeba;
    color: #856404;
}

.status-processing {
    background-color: #b8daff;
    color: #004085;
}

.status-shipped {
    background-color: #c3e6cb;
    color: #155724;
}

.status-delivered {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f5c6cb;
    color: #721c24;
}

.order-product {
    display: flex;
    margin-bottom: 10px;
}

.order-product-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 15px;
    background-color: white;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.order-product-name {
    font-weight: 500;
}

.order-product-price {
    font-weight: 500;
    color: var(--bs-primary);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.order-total-label {
    font-weight: 600;
}

.order-total-value {
    font-weight: 600;
    color: var(--bs-primary);
}

/* Order Details */
.order-detail-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-detail-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.order-detail-info div {
    margin-bottom: 15px;
}

.order-detail-label {
    font-weight: 500;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.order-detail-value {
    font-weight: 600;
}

.order-detail-products {
    margin-top: 30px;
}

.order-detail-product {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.order-detail-product:last-child {
    border-bottom: none;
}

.order-detail-product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-right: 15px;
}

.order-detail-product-name {
    font-weight: 500;
}

.order-detail-product-price {
    color: var(--bs-primary);
    font-weight: 500;
}

.order-detail-product-quantity {
    color: #666;
}

.order-detail-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.order-detail-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.order-detail-summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.order-detail-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Address Book */
.address-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

.address-card.default {
    border-color: var(--bs-primary);
}

.address-card.default::after {
    content: 'Mặc định';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--bs-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.address-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.address-details {
    margin-bottom: 15px;
    line-height: 1.6;
}

.address-actions {
    display: flex;
    gap: 10px;
}

/* Wishlist */
.wishlist-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.wishlist-item:last-child {
    border-bottom: none;
}

.wishlist-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-right: 15px;
}

.wishlist-item-name {
    font-weight: 500;
}

.wishlist-item-price {
    color: var(--bs-primary);
    font-weight: 500;
    margin-top: 5px;
}

.wishlist-item-actions {
    margin-top: 10px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .account-sidebar {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .order-header {
        flex-direction: column;
    }
    
    .order-status {
        margin-top: 10px;
        align-self: flex-start;
    }
    
    .order-detail-info {
        flex-direction: column;
    }
}
