/**
 * Condalab My Account Page CSS
 * 2-column layout: sidebar + main content
 */

/* ===== PS DEFAULT OVERRIDES FOR MY-ACCOUNT ===== */
#my-account #wrapper {
  padding-top: 0;
  background: #f8f8f8;
}
#my-account #wrapper > .container {
  max-width: 1320px;
  padding: 32px 16px;
}
#my-account #content-wrapper {
  padding: 0;
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}
#my-account #content {
  border: none;
  box-shadow: none;
  background: transparent;
}
#my-account #main {
  padding: 0;
  margin: 0;
}
#my-account .page-content {
  padding: 0;
  margin: 0;
}
#my-account #left-column,
#my-account #right-column {
  display: none;
}

/* ===== 2-COLUMN LAYOUT ===== */
.cdl-account-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.cdl-account-layout__sidebar {
  position: sticky;
  top: 120px;
}

/* ===== SIDEBAR ===== */
.cdl-account-sidebar {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
}

.cdl-account-sidebar__header {
  padding: 24px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.cdl-account-sidebar__greeting {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #888;
  margin-bottom: 2px;
}

.cdl-account-sidebar__name {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.cdl-account-sidebar__menu {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.cdl-account-sidebar__menu li {
  margin: 0;
}

.cdl-account-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.cdl-account-sidebar__item:hover {
  background: #f8f8f8;
  color: #1a1a1a;
  text-decoration: none;
}

.cdl-account-sidebar__item i.material-icons {
  font-size: 20px;
  color: #999;
  transition: color 0.15s;
}

.cdl-account-sidebar__item:hover i.material-icons {
  color: #666;
}

.cdl-account-sidebar__item--active {
  background: rgba(235, 190, 24, 0.08);
  color: #1a1a1a;
  font-weight: 600;
}

.cdl-account-sidebar__item--active i.material-icons {
  color: #EBBE18;
}

.cdl-account-sidebar__item--active:hover {
  background: rgba(235, 190, 24, 0.12);
}

/* Hook-injected module links (wishlist, GDPR, email alerts) */
.cdl-account-sidebar__menu > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  float: none;
}

.cdl-account-sidebar__menu > a:hover {
  background: #f8f8f8;
  color: #1a1a1a;
  text-decoration: none;
}

.cdl-account-sidebar__menu > a .link-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cdl-account-sidebar__menu > a .link-item i.material-icons {
  font-size: 20px;
  color: #999;
  transition: color 0.15s;
}

.cdl-account-sidebar__menu > a:hover .link-item i.material-icons {
  color: #666;
}

.cdl-account-sidebar__separator {
  height: 1px;
  background: #f0f0f0;
  margin: 8px 0;
}

.cdl-account-sidebar__item--logout {
  color: #888;
}

.cdl-account-sidebar__item--logout:hover {
  color: #c00;
  background: #fff5f5;
}

.cdl-account-sidebar__item--logout:hover i.material-icons {
  color: #c00;
}

/* ===== SECTION HEADERS ===== */
.cdl-account-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cdl-account-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.cdl-account-section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #EBBE18;
  text-decoration: none;
  transition: color 0.15s;
}

.cdl-account-section-link:hover {
  color: #c9a010;
  text-decoration: none;
}

.cdl-account-section-link i.material-icons {
  font-size: 16px;
}

/* ===== ORDERS TABLE ===== */
.cdl-account-orders {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.cdl-account-orders__table-wrap {
  overflow-x: auto;
}

.cdl-account-orders__table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.cdl-account-orders__table thead th {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #f0f0f0;
  text-align: left;
  white-space: nowrap;
}

.cdl-account-orders__table tbody tr {
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.1s;
}

.cdl-account-orders__table tbody tr:last-child {
  border-bottom: none;
}

.cdl-account-orders__table tbody tr:hover {
  background: #fafafa;
}

.cdl-account-orders__table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  color: #333;
}

.cdl-account-orders__ref a {
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
}

.cdl-account-orders__ref a:hover {
  color: #EBBE18;
}

.cdl-account-orders__date {
  color: #888;
  font-size: 13px;
}

.cdl-account-orders__col-total {
  text-align: right;
}

.cdl-account-orders__total {
  text-align: right;
  font-weight: 600;
  color: #1a1a1a;
}

.cdl-account-orders__col-action {
  text-align: center;
  width: 48px;
}

.cdl-account-orders__action {
  text-align: center;
}

.cdl-account-orders__detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #888;
  transition: background 0.15s, color 0.15s;
}

.cdl-account-orders__detail-btn:hover {
  background: #f0f0f0;
  color: #1a1a1a;
  text-decoration: none;
}

.cdl-account-orders__detail-btn i.material-icons {
  font-size: 18px;
}

/* Status badges */
.cdl-account-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  line-height: 1.4;
}

/* Mobile order cards (hidden on desktop) */
.cdl-account-orders__mobile {
  display: none;
}

.cdl-account-orders__mobile-card {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
}

.cdl-account-orders__mobile-card:last-child {
  border-bottom: none;
}

.cdl-account-orders__mobile-card:hover {
  text-decoration: none;
}

.cdl-account-orders__mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cdl-account-orders__mobile-ref {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
}

.cdl-account-orders__mobile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cdl-account-orders__mobile-date {
  font-size: 13px;
  color: #888;
}

.cdl-account-orders__mobile-total {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

/* ===== EMPTY STATE ===== */
.cdl-account-empty {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
}

.cdl-account-empty i.material-icons {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.cdl-account-empty p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  margin: 0;
}

/* ===== OLIGOS SECTION ===== */
.cdl-account-oligos {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
}

.cdl-account-oligos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* ===== OLIGO CARD ===== */
.cdl-account-oligo-card {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.cdl-account-oligo-card:hover {
  border-color: #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cdl-account-oligo-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cdl-account-oligo-card__name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.cdl-account-oligo-card__order {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
}

.cdl-account-oligo-card__sequence {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #009A17;
  background: #f5faf6;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  word-break: break-all;
  line-height: 1.5;
}

.cdl-account-oligo-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.cdl-account-oligo-card__bases,
.cdl-account-oligo-card__scale,
.cdl-account-oligo-card__purif {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f5f5f5;
  color: #666;
}

.cdl-account-oligo-card__bases {
  background: #eef6ff;
  color: #3366cc;
}

.cdl-account-oligo-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cdl-account-oligo-card__date {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #aaa;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .cdl-account-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cdl-account-layout__sidebar {
    position: static;
  }

  .cdl-account-sidebar__menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 8px 12px;
  }

  .cdl-account-sidebar__menu li {
    flex: none;
  }

  .cdl-account-sidebar__item {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
  }

  .cdl-account-sidebar__separator {
    display: none;
  }

  /* Hook-injected links compact on tablet */
  .cdl-account-sidebar__menu > a {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    width: auto;
  }

  .cdl-account-oligos__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  #my-account #wrapper > .container {
    padding: 16px 12px;
  }

  .cdl-account-orders {
    padding: 16px;
  }

  .cdl-account-orders__table-wrap {
    display: none;
  }

  .cdl-account-orders__mobile {
    display: block;
  }

  /* Fix status badge overflow on mobile */
  .cdl-account-orders__mobile-top {
    flex-wrap: wrap;
    gap: 6px;
  }

  .cdl-account-status {
    white-space: normal;
    font-size: 11px;
    max-width: 100%;
  }

  .cdl-account-oligos {
    padding: 16px;
  }

  .cdl-account-section-title {
    font-size: 17px;
  }

  .cdl-account-sidebar__header {
    padding: 16px;
  }

  .cdl-account-sidebar__menu {
    padding: 8px;
  }

  .cdl-account-sidebar__item {
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
  }

  .cdl-account-sidebar__item i.material-icons {
    font-size: 18px;
  }

  /* Hook-injected links compact on mobile */
  .cdl-account-sidebar__menu > a {
    padding: 8px 10px;
    font-size: 12px;
    width: auto;
  }

  .cdl-account-sidebar__menu > a .link-item {
    gap: 6px;
  }

  .cdl-account-sidebar__menu > a .link-item i.material-icons {
    font-size: 18px;
  }
}
