/* Noqta - My Account (Orders + View Order) */





.woocommerce-account-body {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#wc-otp-form #send-otp, #wc-otp-form #verify-otp {
    width: 100%;
    padding: 13px 20px;
    background: var(--primary-color)!important;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.iti__selected-country {
    background: #eee !important;
}

.iti--inline-dropdown .iti__dropdown-content {
    left: 0;
}

#phone-step, #otp-step {
    width: 100%;
}












/* --- Account Layout Cleanup --- */
.woocommerce-account .woocommerce-MyAccount-navigation {
display: none;
}

.woocommerce-account .woocommerce-MyAccount-content {
width: 100% !important;
max-width: 1200px;
float: none !important;
background: #ffffff;
border-radius: 12px;
padding: 30px 20px;
}

.woocommerce-account-body .woocommerce {
width: 100% !important;
padding-block: 20px;
max-width: 1000px;
margin: auto; 
padding-bottom: 70px
}

.woocommerce-orders-table__cell.woocommerce-orders-table__cell-order-actions::before {
display: none
}


.woocommerce-account .woocommerce-MyAccount-content a{
color: var(--primary-color);
}

/* --- Table Styling (Desktop) --- */
.woocommerce-orders-table {
border: none !important;
border-collapse: separate !important;
border-spacing: 0 12px !important; /* Creates a gap between rows */
}

.woocommerce-orders-table thead th {
background-color: #f8f9fa;
border: none;
color: #555;
text-transform: uppercase;
font-size: 14px;
padding: 15px !important;
}

.woocommerce-orders-table tbody tr {
background: #fff;
transition: transform 0.2s ease;
}

.woocommerce-orders-table tbody tr:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.woocommerce-orders-table tbody td, 
.woocommerce-orders-table tbody th {

padding: 20px 15px !important;
}

.woocommerce-notices-wrapper + div:not(.noqta-empty-orders):not(.noqta-account-actions) {display: none !important;}

/* --- Modern Buttons --- */
.woocommerce-account .button {
background-color: var(--primary-color) !important;
color: #fff !important;
border-radius: 6px !important;
border: none !important;
font-weight: 600 !important;
padding: 10px 20px !important;
transition: opacity 0.3s ease !important;
display: inline-flex;
align-items: center;
justify-content: center;
text-decoration: none;
}

.woocommerce-account .button:hover {
opacity: 0.9;
}

/* --- Status Badges --- */
.woocommerce-orders-table__cell-order-status {
font-weight: bold;
color: var(--primary-color);
}

/* --- Mobile Optimization (Cards) --- */
@media screen and (max-width: 768px) {
/* Container */
.woocommerce-account .woocommerce-MyAccount-content {
padding: 18px 14px 70px;
}

/* Hide table header on mobile */
.woocommerce-orders-table thead {
display: none !important;
}

/* Each order becomes a "card" */
.woocommerce-orders-table {
border: none !important;
border-collapse: separate !important;
border-spacing: 0 !important;
}

.woocommerce-orders-table tbody {
display: block;
}

.woocommerce-orders-table tbody tr {
display: block;
margin: 0 0 14px 0;
border: 1px solid #eee !important;
border-radius: 12px;
overflow: hidden;
background: #fff;
}

/* Rows (label right, value left) */
.woocommerce-orders-table tbody td,
.woocommerce-orders-table tbody th {
display: flex;
flex-direction: row-reverse; /* RTL */
justify-content: space-between;
align-items: center;
gap: 10px;
border: none !important;
padding: 14px 14px !important;
text-align: right !important;
width: 100%;
box-sizing: border-box;
}

.woocommerce-orders-table tbody td::before,
.woocommerce-orders-table tbody th::before {
content: attr(data-title) ":";
font-weight: 700;
color: #6b7280;
font-size: 13px;
flex-shrink: 0;
line-height: 1.2;
}

/* Subtle separators between fields */
.woocommerce-orders-table tbody tr > * + * {
border-top: 1px solid #f1f1f1 !important;
}

/* Order status: orange like screenshot */
.woocommerce-orders-table__cell-order-status {
color: #f59e0b !important;
font-weight: 700;
}

/* Total: slightly stronger */
.woocommerce-orders-table__cell-order-total {
font-weight: 700;
}

/* Actions: make the button full width on its own row */
.woocommerce-orders-table__cell-order-actions {
flex-direction: column;
align-items: stretch;
gap: 10px;
background: #fafafa;
}

.woocommerce-orders-table__cell-order-actions::before {
align-self: flex-end; /* label stays on the right */
}

.woocommerce-orders-table__cell-order-actions .button {
width: 100%;
margin: 0 !important;
padding: 12px 16px !important;
border-radius: 10px !important;
font-size: 15px;
font-weight: 700;
background-color: var(--primary-color) !important;
color: #fff !important;
text-align: center;
}
}

/* =========================
View Order (My Account) UI
========================= */

/* Top quick actions (Orders / Back to store) */
.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper + div {
margin: 14px 0 18px !important;
justify-content: center;
gap: 10px;
flex-wrap: nowrap;
}

.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper + div .button {
width: 100%;
max-width: 220px;
padding: 10px 12px !important;
font-size: 15px !important;
border-radius: 10px !important;
line-height: 1.2;
}

/* “تم تقديم الطلب ...” message card */
.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type {
background: #fff;
border: 1px solid #eee;
border-radius: 12px;
padding: 14px 14px;
margin: 0 0 14px 0;
line-height: 1.7;
}

.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type mark {
background: transparent;
padding: 0;
font-weight: 700;
color: var(--primary-color);
}

/* Section cards */
.woocommerce-account .woocommerce-order-details,
.woocommerce-account .woocommerce-customer-details {
background: #fff;
border: 1px solid #eee;
border-radius: 12px;
padding: 14px;
margin: 0 0 14px 0;
}

.woocommerce-account .woocommerce-order-details__title,
.woocommerce-account .woocommerce-column__title {
margin: 0 0 12px 0;
font-size: 16px;
font-weight: 800;
color: #111827;
text-align: right;
}

/* Order details table -> clean */
.woocommerce-account .woocommerce-table--order-details {
width: 100%;
border: none !important;
border-collapse: collapse !important;
margin: 0 !important;
}

.woocommerce-account .woocommerce-table--order-details thead th {
background: #f8f9fa;
border: none !important;
padding: 12px 10px !important;
font-size: 13px;
color: #6b7280;
}

.woocommerce-account .woocommerce-table--order-details tbody td {
border: none !important;
padding: 12px 10px !important;
vertical-align: top;
}

.woocommerce-account .woocommerce-table--order-details tbody tr + tr td {
border-top: 1px solid #f1f1f1 !important;
}

.woocommerce-account .woocommerce-table--order-details .product-name a {
color: #111827;
font-weight: 700;
text-decoration: none;
}

.woocommerce-account .woocommerce-table--order-details .product-quantity {
color: #6b7280;
font-weight: 700;
}

.woocommerce-account .woocommerce-table--order-details tfoot th,
.woocommerce-account .woocommerce-table--order-details tfoot td {
border: none !important;
padding: 10px 10px !important;
}

.woocommerce-account .woocommerce-table--order-details tfoot tr + tr th,
.woocommerce-account .woocommerce-table--order-details tfoot tr + tr td {
border-top: 1px solid #f1f1f1 !important;
}

.woocommerce-account .woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-account .woocommerce-table--order-details tfoot tr:last-child td {
padding-bottom: 2px !important;
}

.woocommerce-account .woocommerce-table--order-details tfoot th {
color: #6b7280;
font-weight: 800;
text-align: right;
}

.woocommerce-account .woocommerce-table--order-details tfoot td {
font-weight: 800;
text-align: left;
}

/* Billing address */
.woocommerce-account .woocommerce-customer-details address {
background: #fafafa;
border: 1px solid #f1f1f1;
border-radius: 10px;
padding: 12px;
margin: 0;
line-height: 1.7;
}

.woocommerce-account .woocommerce-customer-details--phone,
.woocommerce-account .woocommerce-customer-details--email {
margin: 8px 0 0 0;
color: #374151;
font-weight: 700;
}

/* Mobile: make order details table behave like cards */
@media screen and (max-width: 768px) {
.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper + div {
flex-wrap: wrap;
gap: 10px;
}

.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper + div .button {
max-width: unset;
flex: 1 1 160px;
}

.woocommerce-account .woocommerce-table--order-details thead {
display: none;
}

.woocommerce-account .woocommerce-table--order-details tbody tr {
display: block;
border: 1px solid #eee;
border-radius: 12px;
padding: 10px 12px;
margin: 0 0 12px 0;
background: #fff;
}

.woocommerce-account .woocommerce-table--order-details tbody td {
display: flex;
flex-direction: row-reverse; /* RTL label/value feel */
justify-content: space-between;
align-items: flex-start;
gap: 10px;
padding: 8px 0 !important;
}

.woocommerce-account .woocommerce-table--order-details tbody td.product-name::before {
content: "المنتج:";
font-weight: 800;
color: #6b7280;
flex-shrink: 0;
}

.woocommerce-account .woocommerce-table--order-details tbody td.product-total::before {
content: "الإجمالي:";
font-weight: 800;
color: #6b7280;
flex-shrink: 0;
}

.woocommerce-account .woocommerce-table--order-details tbody tr td + td {
border-top: 1px solid #f1f1f1 !important;
}

/* Totals -> key/value rows */
.woocommerce-account .woocommerce-table--order-details tfoot tr {
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
gap: 10px;
padding: 10px 0;
}

.woocommerce-account .woocommerce-table--order-details tfoot th,
.woocommerce-account .woocommerce-table--order-details tfoot td {
padding: 0 !important;
border: none !important;
}
}







.noqta-view-order {
  width: 100%;
  direction: rtl;
}

.noqta-view-order-actions {
  margin: 0px 0 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.noqta-view-order-actions .button {
  width: 100%;
  max-width: 220px;
  padding: 10px 12px !important;
  font-size: 15px !important;
  border-radius: 10px !important;
  line-height: 1.2;
}

.noqta-view-order-status {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 14px 0;
  line-height: 1.7;
}

.noqta-view-order-status mark {
  background: transparent;
  padding: 0;
  font-weight: 800;
  color: var(--primary-color);
}

.noqta-view-order-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 14px 0;
}

.noqta-view-order-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  text-align: right;
}

/* Items */
.noqta-order-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.noqta-order-item {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.noqta-order-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.noqta-order-item-thumb {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
}

.noqta-order-item-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.noqta-order-item-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.noqta-order-item-main {
  flex: 1 1 auto;
  min-width: 0;
}

.noqta-order-item-name {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 800;
  color: #111827;
  font-size: 12px;
}

.noqta-order-item-label {
  color: #6b7280;
  font-weight: 800;
}

.noqta-order-item-name a {
  color: #111827;
  text-decoration: none;
}

.noqta-order-item-qty {
  color: #6b7280;
  font-weight: 800;
  white-space: nowrap;
}

.noqta-order-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f1f1f1;
  margin-top: 10px;
  padding-top: 10px;
}

.noqta-order-item-total-label {
  color: #6b7280;
  font-weight: 800;
}

.noqta-order-item-total-value {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 800;
}

/* Totals */
.noqta-order-totals {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.noqta-order-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.noqta-order-total-label {
  color: #6b7280;
  font-weight: 800;
}

.noqta-order-total-value {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 800;
}

/* Billing */
.noqta-order-address {
  background: #fafafa;
  border: 1px solid #f1f1f1;
  border-radius: 10px;
  padding: 12px;
  line-height: 1.8;
}

.noqta-order-address-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.noqta-order-address-meta-label {
  color: #6b7280;
  font-weight: 800;
}

.noqta-order-address-meta-value {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 800;
}

/* Updates */
.noqta-order-updates {
  margin: 0;
  padding: 0 18px 0 0;
}

.noqta-order-update {
  margin: 0 0 12px 0;
}

.noqta-order-update-meta {
  color: #6b7280;
  font-weight: 800;
  margin-bottom: 6px;
}

@media (max-width: 480px) {
  .noqta-view-order-actions .button {
    max-width: unset;
  }

  .noqta-order-item-thumb {
    width: 42px;
    height: 42px;
    aspect-ratio: 1/1;
  }
}


.woocommerce-notices-wrapper + div:not(.noqta-empty-orders):not(.noqta-account-actions) {display: none !important;}

.noqta-view-order-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

.noqta-view-order-actions .button {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 10px 0px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    line-height: 1.2;
    text-align: center !important;
    text-decoration: none !important;
    color: #fff !important;
    background-color: var(--primary-color) !important;
}

/* =========================
   Orders Page Actions
========================= */
.noqta-account-actions {
  margin: 0 0 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  direction: rtl;
}

.noqta-account-greeting {
  font-weight: 800;
  font-size: 14px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

.noqta-account-actions .noqta-signout-button {
  /* Override large theme button defaults */
  border-radius: 10px !important;
  padding: 6px 10px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  width: auto !important;
  max-width: max-content;
  flex: 0 0 auto;
}

/* Beat the very specific WooCommerce "top quick actions" button rules */
.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper + div.noqta-account-actions a.noqta-signout-button.button {
  width: auto !important;
  max-width: none !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
  line-height: 1 !important;
}

@media (max-width: 480px) {
  /* Mobile: prevent wide flex buttons, cap signout width */
  .woocommerce-account .woocommerce-MyAccount-content > .woocommerce-notices-wrapper + div.noqta-account-actions a.noqta-signout-button.button {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 140px !important;
    min-width: unset !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .noqta-account-greeting {
    max-width: calc(100% - 150px);
  }
}

/* =========================
   Empty Orders State
========================= */
.noqta-empty-orders {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 50vh;
    direction: rtl;
}

.noqta-empty-orders-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 70%, #000) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: noqta-bounce 2s ease-in-out infinite;
}

.noqta-empty-orders-icon svg {
    width: 48px;
    height: 48px;
    color: #fff;
}

@keyframes noqta-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.noqta-empty-orders-title {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.noqta-empty-orders-message {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0 0 28px 0;
    max-width: 320px;
}

.noqta-empty-orders-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.noqta-empty-orders-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

.noqta-empty-orders-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .noqta-empty-orders {
        padding: 40px 16px;
        min-height: 40vh;
    }

    .noqta-empty-orders-icon {
        width: 80px;
        height: 80px;
    }

    .noqta-empty-orders-icon svg {
        width: 40px;
        height: 40px;
    }

    .noqta-empty-orders-title {
        font-size: 20px;
    }

    .noqta-empty-orders-message {
        font-size: 14px;
    }

    .noqta-empty-orders-btn {
        width: 100%;
        padding: 14px 24px;
    }
}