.royal-myaccount-container {
    position: relative;
    width: 100%;
    margin: 25px 0;
}
.royal-myaccount-container .royal-myaccount-layout {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
}
.royal-myaccount-container .royal-myaccount-menu-section {
    width: 22%;
    min-width: 330px;
}
.royal-myaccount-container .royal-myaccount-menu-content-section {
    width: 78%;
    padding: 20px;
}
.royal-myaccount-container .royal-myaccount-menu-section,
.royal-myaccount-container .royal-myaccount-menu-content-section{
    border: 1px solid #e0e0e2;
    border-radius: 8px;
}
.royal-myaccount-menu-section .user-data-profile {
    border-bottom: 1px solid #f0f0f1;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}
.royal-myaccount-profile-name-edit {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
span.royal-myaccount-display-phone-number {
    color: #878787;
}
.royal-myaccount-menu-section .user-data-profile span.royal-myaccount-edit-profile a,
.royal-myaccount-menu-items ul li a .royal-myaccount-menu-item .royal-myaccount-menu-icon {
    display: flex;
    align-items: center;
}
.royal-myaccount-edit-profile a span {
    color: #19bfd3;
}
.royal-myaccount-menu-items ul {
    margin: 0;
    list-style: none;
    padding: 0;
}
.royal-myaccount-menu-items ul li a .royal-myaccount-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f1;
    padding: 16px 0;
}
.royal-myaccount-menu-items ul li a {
    display: block;
    padding: 0 16px;
    color: #3f4064;
}
.royal-myaccount-menu-items ul li a:hover {
    background: #f2f2f2;
}
.royal-myaccount-menu-items ul li a .royal-myaccount-menu-item .royal-myaccount-menu-icon {
    display: flex;
    align-items: center;
}
.royal-myaccount-menu-items li.royal-myaccount-menu {
    position: relative;
}
.royal-myaccount-menu-items li.royal-myaccount-menu.active {
    font-weight: 800;
}
.royal-myaccount-menu-items li.royal-myaccount-menu.active::before,
.woocommerce-view-order .royal-myaccount-menu-items li.royal-myaccount-menu.royal-orders::before {
    content: '';
    position: absolute;
    top: 7px;
    right: 0px;
    border-radius: 4px 0 0 4px;
    width: 4px;
    height: 46px;
    background: #ef4056;
}
.royal-myaccount-menu-icon.image {
    width: 30px;
    height: 30px;
}

/* Start Orders Page Style */
.royal-myaccount-orders .tab-header {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.royal-myaccount-orders .tab {
    padding: 10px 5px;
    color: #777;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}
.royal-myaccount-orders .tab.active a {
    color: #ff6b6b;
}
.royal-myaccount-orders .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 4px 4px 0 0;
    background-color: #ff6b6b;
}
.royal-myaccount-orders .order-status {
    display: flex;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
}
.royal-myaccount-orders .order-status {
    background-color: #a1a3a8;
    color: #fff;
}
.royal-myaccount-orders .search-box {
    margin-bottom: 20px;
}
.royal-myaccount-orders .search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.royal-myaccount-orders .empty-orders {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    color: #777;
}
.royal-myaccount-orders .empty-orders img {
    width: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}
.royal-myaccount-orders .tab a {
    display: flex;
    align-items: center;
}
.tab.active span.order-status {
    background-color: #ef4056;
    color: #fff;
}
/* End Orders Page Style */

/* View Order Style ==> Start */
.royal-back-button{
    color: #333 !important;
    display: flex;
    gap: 8px;
    font-weight: 800;
    border-radius: 8px;
    border: 1px solid #eee;
    width: fit-content;
    padding: 10px 16px;
    align-items: center;
}
.woocommerce-order-details__title{
    font-size: 18px !important;
    margin-top: 40px !important;
    margin-bottom: 0 !important;
    font-weight: 600 !important;

}
.royal-order-summary {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 8px;
}
.royal-summary-section {
    flex: 1;
    min-width: 300px;
     border-bottom: 1px solid #eee;
}
.royal-summary-section:last-child {
    border-bottom: none;
}
.royal-order-information {
    display: flex;
    justify-content: space-between;
    margin: 15px;
    padding: 16px;
    border-radius: 8px;
    gap: 20px;
    flex-wrap: wrap;
}
.royal-order-information.payment-failed {
    background: #ffefef;
    border: 1px solid #fbb6b6;
}
.royal-order-information.successful-payment {
    background: #eefdef;
    border: 1px solid #83e587;
}
span.royal-information-label {
    display: flex;
    align-items: center;
    gap: 7px;
}
.royal-information-date-price {
    display: flex;
    justify-content: space-between;
    gap: 50px;
}
.royal-section-title {
    font-family: "Vazirmatn", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px !important;
}
.royal-summary-boxs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}
.royal-summary-box {
    font-size: 14px;
    margin-left: 25px;
}
.royal-summary-label {
    color: #999;
    font-weight: 500
}
.royal-summary-value {
    color: #333;
    font-weight: 500
}
span.royal-summary-value.saving-price {
    color: #00b707;
    font-weight: bold;
}
.royal-summary-boxs.order-details .royal-summary-box {
    font-size: 14.5px;
}
.royal-summary-boxs.order-details {
    margin-top: 10px;
}
.royal-address-postcode {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    line-height: 2.3;
}
.royal-order-products {
    display: flex;
    flex-wrap: wrap;
    padding: 0 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    flex-direction: column;
}
.royal-product-card {
    border-bottom: 1px solid #eee;
    width: 100%;
    font-size: 14px;
    padding: 20px 0;
}
.order-product-detail {
    display: flex;
}
.royal-product-order-detail {
    padding: 10px 16px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    gap: 25px;
}
.royal-product-image img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}
.royal-product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-right: 15px;
    gap: 4px;
}
.royal-order-products .product-discount {
    font-size: 12px;
    color: red;
    font-weight: bold;
}
.royal-product-name {
    font-size: 14px;
}
.royal-product-name a {
    color: #23254e !important;
    text-decoration: none;
    font-weight: 500;
}
.royal-product-image {
    position: relative;
    height: fit-content;
}
.royal-product-quantity {
    background: #fff;
    color: #000000;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid #ddd;
    font-size: 12px;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    bottom: -5px;
    line-height: 1;
}
.royal-product-total {
    font-weight: bold;
    font-size: 17px;
}

/* View Order Style ==> End */
.royal-order-card {
    display: flex;
}
.royal-myaccount-order-list .completed-orders-item,
.royal-myaccount-order-list .processing-orders-item,
.royal-myaccount-order-list .refunded-orders-item,
.royal-myaccount-order-list .cancelled-orders-item {
    border: 1px solid #e0e0e2;
    border-radius: 10px;
    margin-bottom: 20px;
}
.royal-myaccount-order-list .completed-orders-item:last-child,
.royal-myaccount-order-list .processing-orders-item:last-child,
.royal-myaccount-order-list .refunded-orders-item:last-child,
.royal-myaccount-order-list .cancelled-orders-item:last-child {
    margin-bottom: 0px;
}
.royal-myaccount-order-list .order-completed,
.royal-myaccount-order-list .order-processing,
.royal-myaccount-order-list .order-refunded,
.royal-myaccount-order-list .order-cancelled {
    display: flex;
    justify-content: space-between;
    padding: 15px;
}
.royal-myaccount-order-list span.order-date {
    color: #a1a3ad;
}
.royal-myaccount-order-list .order-completed .completed-status-badge,
.royal-myaccount-order-list .order-processing .processing-status-badge,
.royal-myaccount-order-list .order-refunded .refunded-status-badge,
.royal-myaccount-order-list .order-cancelled .cancelled-status-badge {
    display: flex;
    gap: 10px;
    align-items: center;
}
.completed-orders-item .order-completed-details,
.processing-orders-item .order-processing-details,
.refunded-orders-item .order-refunded-details,
.cancelled-orders-item .order-cancelled-details {
    display: flex;
    gap: 10px;
    padding: 0 15px;
    flex-wrap: wrap;
}
.completed-orders-item .order-completed-details>span, 
.processing-orders-item .order-processing-details>span,
.refunded-orders-item .order-refunded-details>span,
.cancelled-orders-item .order-cancelled-details>span {
    margin-left: 20px;
}
.order-completed-details span.order-details-text,
.order-processing-details span.order-details-text,
.order-refunded-details span.order-details-text,
.order-cancelled-details span.order-details-text {
    color: #999;
    font-size: 14px;
}
.order-completed-details span.order-details-value,
.order-processing-details span.order-details-value,
.order-refunded-details span.order-details-value,
.order-cancelled-details span.order-details-value {
    color: #3f4064;
}
.completed-orders-item .order-completed-products,
.processing-orders-item .order-processing-products,
.refunded-orders-item .order-refunded-products,
.cancelled-orders-item .order-cancelled-products {
    margin: 15px 0 0 0;
    border-top: 1px solid #e0e0e2;
    border-bottom: 1px solid #e0e0e2;
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.completed-orders-item .order-completed-actions .action-button,
.processing-orders-item .order-processing-actions .action-button,
.refunded-orders-item .order-refunded-actions .action-button,
.cancelled-orders-item .order-cancelled-actions .action-button {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.completed-orders-item .order-completed-actions,
.processing-orders-item .order-processing-actions,
.refunded-orders-item .order-refunded-actions,
.cancelled-orders-item .order-cancelled-actions {
    padding: 15px;
}
.completed-orders-item .order-completed-actions .action-button span.icon,
.processing-orders-item .order-processing-actions .action-button span.icon,
.refunded-orders-item .order-refunded-actions .action-button span.icon,
.cancelled-orders-item .order-cancelled-actions .action-button span.icon {
    display: flex;
}
.completed-orders-item .order-completed-actions .action-button span,
.completed-orders-item .order-completed-actions .action-button span a,
.processing-orders-item .order-processing-actions .action-button span,
.processing-orders-item .order-processing-actions .action-button span a,
.refunded-orders-item .order-refunded-actions .action-button span,
.refunded-orders-item .order-refunded-actions .action-button span a,
.cancelled-orders-item .order-cancelled-actions .action-button span,
.cancelled-orders-item .order-cancelled-actions .action-button span a {
    color: #19bfd3;
}
.royal-product-attributes {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9em;
}
.royal-product-attributes li {
    margin: 0;
    padding: 0;
}


/* my-address.php styles Start */

.royal-myaccount-content .royal-edit-address-box {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e2;
    border-radius: 8px;
    background-color: #ffffff;
}
.royal-myaccount-content .royal-edit-address-box h2 {
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.royal-myaccount-content .royal-edit-address-box p {
    margin: 5px 0;
    font-size: 14px;
}
.royal-myaccount-content .royal-edit-address-box .royal-edit-address-button {
    margin-top: 15px;
    display: inline-block;
    background-color: var(--primary_color);
    color: #fff;
    padding: 11px 29px;
    line-height: 1;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.royal-myaccount-content .royal-edit-address-box .royal-edit-address-button:hover {
    background-color: var(--button_gradient_top_color_hover);
}

/* my-address.php styles Start */

.royal-view-order-title {
    display: flex;
    align-items: center;
    gap: 15px; /* ایجاد فاصله بین عنوان و آیکون */
}
.royal-back-to-orders-link .dashicons {
    font-size: 24px;   /* اندازه آیکون */
    color: #555;      /* رنگ آیکون */
    transition: color 0.3s;
}
.royal-back-to-orders-link:hover .dashicons {
    color: var(--primary_color); /* تغییر رنگ آیکون در زمان هاور */
}


/* استایل یادداشت های سفارش در صفحه جزئیات سفارش Start */

section.royal-order-notes {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 20px 0;
}
.royal-order-notes li.royal-order-notes__item {
    display: flex;
    font-size: 14px;
    align-items: flex-start;
    line-height: 2;
    padding: 3px 0;
    flex-wrap: wrap;
}
.royal-order-notes .royal-order-notes__item-content.royal-summary-value p {
    margin: 0;
}
.royal-order-notes ul.royal-order-notes__list {
    padding: 0;
    margin: 0;
}
.royal-order-notes h2.fusion-responsive-typography-calculated {
    margin-top: 7px;
}
.royal-order-notes .royal-order-notes__item-date.royal-summary-label {
    min-width: 135px;
    margin-left: 10px;
}

/* استایل یادداشت های سفارش در صفحه جزئیات سفارش End */


/* mobile trigger start */
.royal-myaccount-container a.mobile-menu-trigger {
    font-size: 17px;
    border: 1px solid #cfd8dc;
    border-radius: 7px;
    padding: 5px;
    line-height: 1;
    width: 40px;
    height: 40px;
    position: fixed;
    /* top: 120px; */
    left: 0;
    margin: 7px;
    color: #607d8b;
    display: none;
    justify-content: center !important;
    align-items: center;
    background: #eceff1;
    cursor: pointer;
    z-index: 999;
}
.royal-myaccount-container a.mobile-menu-trigger i {
    margin: 0;
}
/* mobile trigger End */


@media screen and (max-width: 890px){
    .woocommerce-account main#main {
        padding: 0 !important;
    }
    .royal-myaccount-container .royal-myaccount-menu-content-section {
        padding: 7px;
    }
    .royal-myaccount-container .royal-myaccount-layout {
        flex-direction: column-reverse;
    }
    .royal-myaccount-container .royal-myaccount-menu-section,
    .royal-myaccount-container .royal-myaccount-menu-content-section {
        width: 100%;
        min-width: 100%;
    }
    .royal-myaccount-container .royal-myaccount-menu-content-section {
        border-width:0 0 0 0;
        border-radius: 0px;
    }
     .royal-myaccount-container .royal-myaccount-menu-section {
        border-width:1px 0 1px 0;
        border-radius: 0;
    }
    .royal-myaccount-orders .tab-header {
        display: flex;
        justify-content: space-between;
        gap: 0;
        margin-bottom: 10px;
    }
    .royal-myaccount-orders .tab-header a {
        font-size: 12px;
    }
    
    .royal-myaccount-orders .tab-header::-webkit-scrollbar {
        height: 8px;
        background-color: #eee;
        border-radius: 8px;
    }
    .royal-myaccount-orders .tab-header::-webkit-scrollbar-thumb {
        background-color: #999;
        border-radius: 8px;
        border: 2px solid #f1f1f1;
    }
    form.woocommerce-EditAccountForm.edit-account {
        font-size: 90%;
    }
    .royal-myaccount-container {
        margin: 15px 0;
    }
    .royal-myaccount-container a.mobile-menu-trigger {
        display: flex;
    }
}

