/* ============================================================
   RETAILER JEWELLER - WooCommerce My Account Styles
   Inspired by Tanishq-style premium jeweller layout
   ============================================================ */

/* ------ VARIABLES ------ */
:root {
  --rj-primary:       #0e1934;   /* Deep jewel red */
  --rj-primary-dark:  #252572;
  --rj-primary-light: #f5eded;
  --rj-gold:          #e4ad17;   /* Gold accent */
  --rj-text:          #0e1934;
  --rj-text-muted:    #777777;
  --rj-border:        #fff;
  --rj-bg:            #fafafa;
  --rj-white:         #ffffff;
  --rj-radius:        6px;
  --rj-shadow:        0 2px 12px rgba(0,0,0,0.07);
  --rj-sidebar-w:     260px;
  --rj-font:          "Cormorant Garamond", Sans-serif;
  --rj-font-sans:     'Inter Tight';
}

/* ------ WRAPPER ------ */
.rj-myaccount-wrapper {
  max-width: 1440px;
  padding: 24px 20px 60px;
  font-family: var(--rj-font-sans);
  color: var(--rj-text);
}

.woocommerce form.login {
  margin: 1em 0;
}

/* ------ PAGE HEADING ------ */
.rj-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--rj-primary);
}
.rj-account-title {
  font-family: var(--rj-font);
  font-size: 30px;
  font-weight: 700;
  color: var(--rj-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rj-account-icon {
  color: var(--rj-gold);
  font-size: 16px;
}
.rj-account-breadcrumb {
  font-size: 14px;
  color: var(--rj-text-muted);
}
.rj-account-breadcrumb strong {
  color: var(--rj-primary);
}

/* ------ MOBILE NAV TOGGLE ------ */
.rj-mobile-nav-toggle {
  display: none;
  width: 100%;
  background: var(--rj-primary);
  color: var(--rj-white);
  border: none;
  padding: 12px 18px;
  border-radius: var(--rj-radius);
  cursor: pointer;
  font-size: 15px;
  font-family: var(--rj-font-sans);
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rj-mobile-nav-toggle:focus { outline: 2px solid var(--rj-gold); }
.rj-toggle-arrow { font-size: 20px; transition: transform 0.2s; }
.rj-mobile-nav-toggle.is-open .rj-toggle-arrow { transform: rotate(90deg); }

/* ------ LAYOUT ------ */
.rj-account-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* ------ SIDEBAR ------ */
.rj-account-sidebar {
  width: var(--rj-sidebar-w);
  min-width: var(--rj-sidebar-w);
  flex-shrink: 0;
}
.rj-sidebar-inner {
  background: var(--rj-white);
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
  overflow: hidden;
  box-shadow: var(--rj-shadow);
}

/* NAV LIST */
.rj-account-nav { margin: 0; }
.rj-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rj-nav-item { border-bottom: 1px solid var(--rj-border); }
.rj-nav-item:last-child { border-bottom: none; }

.rj-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  color: var(--rj-text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.rj-nav-link:hover {
  background:  #15154203;
  color: var(--rj-primary);
}
.rj-nav-link--active,
.rj-nav-link[aria-current="page"] {
  background: var(--rj-primary);
  color: var(--rj-white) !important;
  font-weight: 600;
}
.rj-nav-link--active .rj-nav-icon,
.rj-nav-link[aria-current="page"] .rj-nav-icon {
  color: var(--rj-white);
}
.rj-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rj-primary);
  transition: color 0.15s;
}
.rj-nav-link:hover .rj-nav-icon { color: var(--rj-primary); }
.rj-nav-label { flex: 1; }
.rj-nav-active-bar {
  width: 4px;
  height: 100%;
  background: var(--rj-gold);
  position: absolute;
  left: 0; top: 0;
  border-radius: 0 2px 2px 0;
}

/* Logout item styling */
.rj-nav-logout .rj-nav-link {
  color: #c0392b;
}
.rj-nav-logout .rj-nav-icon { color: #c0392b; }
.rj-nav-logout .rj-nav-link:hover {
  background: #fdf2f2;
  color: #c0392b;
}

/* Support box */
.rj-sidebar-support {
  background:  #15154203;
  padding: 16px 18px;
  text-align: center;
  border-top: 1px solid #e8cece;
}
.rj-support-icon { font-size: 22px; color: var(--rj-primary); margin-bottom: 6px; }
.rj-support-text {
  font-size: 12px;
  color: var(--rj-text-muted);
  margin: 0 0 8px;
}
.rj-support-link {
  display: inline-block;
  font-size: 13px;
  color: var(--rj-primary);
  text-decoration: none;
  border: 1px solid var(--rj-primary);
  padding: 5px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}
.rj-support-link:hover {
  background: var(--rj-primary);
  color: var(--rj-white);
}

/* ------ MAIN CONTENT ------ */
.rj-account-content {
  flex: 1;
  min-width: 0;
}

/* ------ SECTION HEADER ------ */
.rj-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.rj-section-title {
  font-family: var(--rj-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--rj-primary);
  margin: 0;
}

/* ------ INFO CARDS ------ */
.rj-info-card {
  background: var(--rj-white);
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
  overflow: hidden;
  box-shadow: var(--rj-shadow);
}
.rj-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background:  #15154203;
  padding: 12px 18px;
  border-bottom: 1px solid #e8cece;
}
.rj-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--rj-primary);
  margin: 0;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rj-card-icon {
  color: var(--rj-primary);
  display: flex;
  align-items: center;
}
.rj-card-body { padding: 18px 20px; }

/* ------ INFO ROWS ------ */
.rj-info-row {
  display: flex;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
}
.rj-info-row:last-child { border-bottom: none; }
.rj-info-label {
  width: 160px;
  min-width: 140px;
  font-size: 14px;
  color: var(--rj-text-muted);
  font-weight: 500;
}
.rj-info-sep {
  margin: 0 12px;
  color: var(--rj-text-muted);
}
.rj-info-value {
  font-size: 14px;
  color: var(--rj-text);
  font-weight: 500;
}
.rj-muted { color: var(--rj-text-muted); font-style: italic; }

/* ------ QUICK LINKS GRID ------ */
.rj-quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.rj-quick-card {
  background: var(--rj-white);
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--rj-text);
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--rj-shadow);
}
.rj-quick-card:hover {
  border-color: var(--rj-primary);
  background:  #15154203;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139,26,26,0.1);
}
.rj-quick-icon {
  color: var(--rj-primary);
  display: flex;
}
.rj-quick-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--rj-text);
}
.rj-quick-card:hover .rj-quick-label { color: var(--rj-primary); }

/* ------ BUTTONS ------ */
.rj-btn-primary {
  display: inline-block !important;
  background: var(--rj-primary) !important;
  color: var(--rj-white) !important;
  border: none  !important;
  padding: 11px 28px !important;
  border-radius: var(--rj-radius) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s !important;
  font-family: var(--rj-font-sans) !important;
  letter-spacing: 0.3px !important;
}
.rj-btn-primary:hover {
  background: var(--rj-primary-dark)  !important;
  transform: translateY(-1px)  !important;
}
.rj-btn-primary:focus { outline: 2px solid var(--rj-gold) !important;}
.rj-btn-full { width: 100%; text-align: center; display: block; }

.rj-btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--rj-primary) !important;
  border: 1px solid var(--rj-primary);
  padding: 8px 20px;
  border-radius: var(--rj-radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--rj-font-sans);
}
.rj-btn-outline:hover {
  background: var(--rj-primary);
  color: var(--rj-white) !important;
}
.rj-btn-xs { padding: 5px 12px; font-size: 12px; }

.rj-btn-sm {
  display: inline-block;
  background:  #15154203;
  color: var(--rj-primary) !important;
  border: 1px solid #e0b0b0;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  margin-right: 4px;
}
.rj-btn-sm:hover {
  background: var(--rj-primary);
  color: var(--rj-white) !important;
}

/* ------ FORM STYLES ------ */
.rj-form-group {
  margin-bottom: 18px;
}
.rj-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--rj-text);
  margin-bottom: 7px;
}
.rj-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
  font-size: 14px;
  font-family: var(--rj-font-sans);
  color: var(--rj-text);
  background: var(--rj-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.rj-input:focus {
  border-color: var(--rj-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}
.rj-required { color: #c0392b; }
.rj-field-hint { font-size: 12px; color: var(--rj-text-muted); margin-top: 5px; }

.rj-form-row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.rj-form-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Password toggle */
.rj-input-password-wrap { position: relative; }
.rj-input-password-wrap .rj-input { padding-right: 44px; }
.rj-toggle-pw {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  color: var(--rj-text-muted);
  display: flex; align-items: center;
  padding: 0;
}
.rj-toggle-pw:hover { color: var(--rj-primary); }

/* Address fields */
.rj-address-fields .form-row { margin-bottom: 14px; }
.rj-address-fields .form-row label { font-size: 13px; font-weight: 600; color: var(--rj-text); margin-bottom: 6px; display: block; }
.rj-address-fields .form-row input,
.rj-address-fields .form-row select,
.rj-address-fields .form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
  font-size: 14px;
  box-sizing: border-box;
}
.rj-address-fields .form-row input:focus,
.rj-address-fields .form-row select:focus {
  border-color: var(--rj-primary);
  outline: none;
}
.rj-address-fields .form-row-first,
.rj-address-fields .form-row-last { display: inline-block; width: 48%; }
.rj-address-fields .form-row-first { margin-right: 3%; }

/* ------ ORDERS TABLE ------ */
.rj-orders-table-wrap { overflow-x: auto; }
.rj-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rj-orders-table thead tr {
  background: var(--rj-primary);
  color: var(--rj-white);
}
.rj-orders-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.rj-orders-table tbody tr {
  border-bottom: 1px solid var(--rj-border);
  transition: background 0.15s;
}
.rj-orders-table tbody tr:hover { background:  #15154203; }
.rj-orders-table tbody td,
.rj-orders-table tbody th { padding: 12px 16px; vertical-align: middle; }

.rj-order-number {
  color: var(--rj-primary);
  font-weight: 700;
  text-decoration: none;
}
.rj-order-number:hover { text-decoration: underline; }

/* Status badges */
.rj-order-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.rj-status-completed  { background: #d4edda; color: #155724; }
.rj-status-processing { background: #cce5ff; color: #004085; }
.rj-status-pending    { background: #fff3cd; color: #856404; }
.rj-status-cancelled  { background: #f8d7da; color: #721c24; }
.rj-status-on-hold    { background: #e2e3e5; color: #383d41; }
.rj-status-refunded   { background: #d6d8db; color: #383d41; }
.rj-status-failed     { background: #f8d7da; color: #721c24; }

/* Pagination */
.rj-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.rj-pagination-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--rj-primary);
  border-radius: var(--rj-radius);
  color: var(--rj-primary) !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.rj-pagination-btn:hover {
  background: var(--rj-primary);
  color: var(--rj-white) !important;
}

/* ------ PAYMENT TABLE ------ */
.rj-payment-table-wrap { overflow-x: auto; }
.rj-payment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rj-payment-table thead tr { background: var(--rj-primary); color: var(--rj-white); }
.rj-payment-table thead th { padding: 12px 16px; font-size: 13px; font-weight: 600; text-align: left; }
.rj-payment-table tbody tr { border-bottom: 1px solid var(--rj-border); }
.rj-payment-table tbody tr:hover { background:  #15154203; }
.rj-payment-table tbody td { padding: 12px 16px; vertical-align: middle; }
.rj-default-badge {
  display: inline-block;
  background: var(--rj-gold);
  color: var(--rj-white);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ------ EMPTY STATE ------ */
.rj-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--rj-white);
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
}
.rj-empty-icon { display: block; margin: 0 auto 16px; color: #ccc; }
.rj-empty-state p { font-size: 15px; color: var(--rj-text-muted); margin-bottom: 20px; }

/* ------ VIEW ORDER ------ */
.rj-view-order-status {
  background: var(--rj-white);
  border: 1px solid var(--rj-border);
  border-radius: var(--rj-radius);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.rj-view-order-status mark {
  background: none;
  font-weight: 700;
  padding: 0;
}
.rj-order-date { color: var(--rj-text); }
.rj-order-notes { list-style: none; padding: 0; margin: 0; }
.rj-order-note { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.rj-order-note:last-child { border-bottom: none; }
.rj-note-date { font-size: 12px; color: var(--rj-text-muted); margin-bottom: 6px; }
.rj-note-content { font-size: 14px; line-height: 1.6; }

/* ------ ADDRESSES ------ */
.rj-address-intro { font-size: 14px; color: var(--rj-text-muted); margin-bottom: 20px; }
.rj-addresses-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rj-address-card .rj-card-header { justify-content: flex-start; }
.rj-address-card .rj-btn-outline { margin-left: auto; }
.rj-address-text { font-size: 14px; color: var(--rj-text); line-height: 1.8; font-style: normal; }

/* ------ LOGIN PAGE ------ */
.rj-login-wrap {
  max-width: 520px;
  margin: 0 auto;
}
.rj-login-brand {
  text-align: center;
  margin-bottom: 24px;
}
.rj-login-diamond {
  display: inline-block;
  color: var(--rj-gold);
  font-size: 28px;
  margin-bottom: 8px;
}
.rj-login-brand-title {
  font-family: var(--rj-font);
  font-size: 26px;
  color: var(--rj-primary);
  margin: 0 0 6px;
}
.rj-login-brand-sub { font-size: 14px; color: var(--rj-text-muted); margin: 0; }

/* Login/Register tabs */
.rj-login-tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--rj-border);
  margin-bottom: 20px;
}
.rj-login-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--rj-text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: var(--rj-font-sans);
}
.rj-login-tab-btn.active {
  color: var(--rj-primary);
  border-bottom-color: var(--rj-primary);
}
.rj-login-tab-btn:hover { color: var(--rj-primary); }

/* Checkbox & lost password */
.rj-form-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.rj-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.rj-checkbox-label input { accent-color: var(--rj-primary); }
.rj-lost-password { font-size: 13px; color: var(--rj-primary); text-decoration: none; }
.rj-lost-password:hover { text-decoration: underline; }

/* ------ DASHBOARD ------ */
.rj-dashboard {}

/* ------ WooCommerce overrides inside RJ ------ */
.rj-account-content .woocommerce-notices-wrapper { margin-bottom: 16px; }
.rj-account-content .woocommerce-message,
.rj-account-content .woocommerce-error,
.rj-account-content .woocommerce-info {
  border-radius: var(--rj-radius);
  font-size: 14px;
}
.rj-account-content .woocommerce-message { border-top-color: var(--rj-primary); }
.rj-account-content .button,
.rj-account-content .woocommerce-Button {
  background: var(--rj-primary);
  color: var(--rj-white);
  border: none;
  padding: 9px 22px;
  border-radius: var(--rj-radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
}
.rj-account-content .button:hover,
.rj-account-content .woocommerce-Button:hover {
  background: var(--rj-primary-dark);
  color: var(--rj-white);
}

/* ============================================================
   RESPONSIVE — TABLET (max 900px)
   ============================================================ */
@media (max-width: 900px) {
  .rj-account-layout {
    flex-direction: column;
    gap: 0;
  }
  .rj-account-sidebar {
    width: 100%;
    min-width: 0;
    display: none;
  }
  .rj-account-sidebar.is-open { display: block; margin-bottom: 16px; }
  .rj-mobile-nav-toggle { display: flex; }
  .rj-quick-links { grid-template-columns: repeat(2, 1fr); }
  .rj-addresses-grid { grid-template-columns: 1fr; }
  .rj-form-row-group { grid-template-columns: 1fr; gap: 0; }
  .rj-info-label { width: 130px; min-width: 110px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 600px)
   ============================================================ */
@media (max-width: 600px) {
  .rj-myaccount-wrapper { padding: 16px 14px 40px; }

  .rj-account-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .rj-account-title { font-size: 21px; }

  .rj-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rj-section-title { font-size: 17px; }

  .rj-quick-links { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rj-quick-card { padding: 16px 10px; }

  /* Orders table responsive stacking */
  .rj-orders-table,
  .rj-orders-table thead,
  .rj-orders-table tbody,
  .rj-orders-table th,
  .rj-orders-table td,
  .rj-orders-table tr { display: block; width: 100%; }
  .rj-orders-table thead { display: none; }
  .rj-orders-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius);
    overflow: hidden;
  }
  .rj-orders-table tbody td,
  .rj-orders-table tbody th {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
  }
  .rj-orders-table tbody td:last-child,
  .rj-orders-table tbody th:last-child { border-bottom: none; }
  .rj-orders-table tbody td::before,
  .rj-orders-table tbody th::before {
    content: attr(data-title);
    font-weight: 700;
    color: var(--rj-text-muted);
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  /* Payment table stacking */
  .rj-payment-table,
  .rj-payment-table thead,
  .rj-payment-table tbody,
  .rj-payment-table th,
  .rj-payment-table td,
  .rj-payment-table tr { display: block; width: 100%; }
  .rj-payment-table thead { display: none; }
  .rj-payment-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius);
    overflow: hidden;
  }
  .rj-payment-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
  }
  .rj-payment-table tbody td::before {
    content: attr(data-title);
    font-weight: 700;
    color: var(--rj-text-muted);
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
  }

  /* Info rows */
  .rj-info-row { flex-wrap: wrap; }
  .rj-info-label { width: 100%; margin-bottom: 2px; font-size: 12px; }
  .rj-info-sep { display: none; }
  .rj-info-value { font-size: 14px; }

  /* Login */
  .rj-login-wrap { padding: 0 4px; }

  /* Address fields */
  .rj-address-fields .form-row-first,
  .rj-address-fields .form-row-last { display: block; width: 100%; margin-right: 0; }

  /* Form actions */
  .rj-form-actions { flex-direction: column; align-items: stretch; }
  .rj-form-actions .rj-btn-primary,
  .rj-form-actions .rj-btn-outline { text-align: center; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .rj-account-sidebar,
  .rj-mobile-nav-toggle,
  .rj-sidebar-support { display: none; }
  .rj-account-layout { display: block; }
  .rj-account-content { width: 100%; }
}
