/* Core Benefits legend */

.legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--visa-navy);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot--core {
  background: var(--visa-blue);
}

/* Benefits table */

.benefits-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  table-layout: fixed;
}

.benefits-table th {
  text-align: left;
  font-weight: 400;
  font-size: 16px;
  color: var(--visa-navy);
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-component);
}

.benefits-table .col-name { width: 15%; }
.benefits-table .col-type { width: 14%; }
.benefits-table .col-id { width: 7%; }
.benefits-table .col-cards { width: 25%; }
.benefits-table .col-date { width: 9%; }
.benefits-table .col-hierarchy { width: 10%; }
.benefits-table .col-status { width: 11%; }

.status-info-wrapper {
  position: relative;
  display: inline-block;
}

.status-info-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 4px;
  cursor: pointer;
}

.status-tooltip {
  display: none;
  position: absolute;
  top: 24px;
  right: 0;
  width: 326px;
  background: var(--visa-white);
  border-radius: 8px;
  box-shadow: 0px 4px 20px 2px rgba(0, 0, 0, 0.25);
  padding: 16px 19px 22px 16px;
  z-index: 20;
  cursor: default;
}

.status-info-wrapper:hover .status-tooltip {
  display: block;
}

.status-tooltip-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-inky);
  margin: 0 0 16px 0;
  text-align: left;
}

.status-tooltip-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.status-tooltip-row:last-child {
  margin-bottom: 0;
}

.status-tooltip-badge-col {
  flex-shrink: 0;
  width: 132px;
  display: flex;
}

.status-tooltip-row .badge {
  white-space: nowrap;
}

.status-tooltip-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-inky);
  margin: 0;
  text-align: left;
}

.benefits-table td {
  font-size: 14px;
  color: var(--text-subtle);
  padding: 14px 8px 14px 0;
  border-bottom: 2px solid var(--border-light);
  vertical-align: middle;
}

.benefits-table th.col-cards,
.benefits-table td:nth-child(4) {
  padding-right: 32px;
}

.benefits-table tbody tr {
  cursor: pointer;
}

.benefits-table tbody tr:hover td {
  background: var(--background-light);
}

.benefit-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 96px;
}

.pagination-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-subtle);
}

.select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.items-per-page select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--border-component);
  background: var(--visa-white);
  color: var(--text-inky);
  font-size: 14px;
  padding: 0 20px 0 8px;
}

.select-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-subtle);
  border-bottom: 1.5px solid var(--text-subtle);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.pagination-summary {
  font-size: 16px;
  color: var(--text-inky);
}

.pagination-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  appearance: none;
  cursor: pointer;
  background: transparent;
  border: none;
  min-width: 33px;
  height: 32px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-link);
  padding: 6px 8px;
}

.page-btn--active {
  border: 1px solid var(--visa-blue);
  font-weight: 600;
}

.page-btn--arrow {
  color: var(--text-subtle);
}

/* Overlay content (menu-detail-overlay-specific). Base shade/card/fade,
   header/title/close, and actions row live in common.css (shared with the
   benefit page's Add New Tier overlay). */

.overlay-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.overlay-status-label {
  font-size: 14px;
  color: var(--text-inky);
}

.overlay-tabs {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  border-bottom: 1px solid var(--border-light);
}

.overlay-tab {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px 12px 12px 12px;
  font-size: 16px;
  color: var(--text-subtle);
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
}

.overlay-tab--active {
  background: var(--background-light);
  color: var(--visa-blue);
  border-bottom: 2px solid var(--visa-blue);
  font-weight: 600;
}

.overlay-body {
  margin-top: 24px;
}

.overlay-panel {
  display: none;
}

.overlay-panel--active {
  display: block;
}

.basic-info-columns {
  display: flex;
  gap: 44px;
}

.basic-info-col {
  flex: 1;
  min-width: 0;
}

.basic-info-col > *:first-child {
  margin-top: 0;
}

.field-line {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: var(--text-inky);
}

.field-label {
  font-weight: 400;
  color: var(--text-subtle);
}

.field-value {
  font-weight: 500;
  font-size: 14px;
}

.field-group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-inky);
  margin: 16px 0 4px 0;
}

#detail-card-types {
  font-weight: 400;
}

.version-line {
  font-size: 13px;
  color: var(--text-link);
  margin: 0 0 4px 0;
}

.version-line--current {
  font-weight: 500;
  color: var(--text-inky);
}

.history-line {
  font-size: 13px;
  color: var(--text-inky);
  margin: 0 0 8px 0;
}

.history-line--with-comment {
  margin-bottom: 0;
}

.history-date,
.history-date-spacer {
  display: inline-block;
  width: 80px;
}

.history-comment-link {
  font-size: 13px;
  color: var(--text-link);
  margin: 0 0 8px 0;
  cursor: pointer;
}

.comment-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-inky);
  margin: 0 0 4px 0;
}

.comment-text {
  font-size: 13px;
  color: var(--text-inky);
  margin: 0 0 4px 0;
}

.package-link {
  font-size: 13px;
  color: var(--text-link);
  margin: 0 0 4px 0;
}

.product-groups-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-inky);
}

.product-groups-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.product-groups-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-subtle);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}

.product-groups-table td {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-inky);
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid var(--border-light);
}

/* Approve is view-only outside Pending Approval; a Rejected benefit's path
   forward is edit-and-resubmit, not re-deciding it from here. Add Comment
   and View benefit page stay visible regardless of status. */
#overlay.overlay--no-decision #overlay-approve,
#overlay.overlay--no-decision #overlay-reject {
  display: none;
}

/* Approve / Reject / Add Comment action modal. Stacks above the existing
   detail overlay (and its own shade) -- #id selectors here beat the base
   .overlay/.overlay-shade z-index from common.css regardless of source
   order, since this file loads after common.css anyway. */
#action-shade {
  z-index: 20;
}

#action-modal {
  width: 642px;
  z-index: 21;
}

.action-modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-modal-icon {
  width: 14px;
  height: 14px;
}

.action-modal-field {
  margin: 16px 0 0 0;
}

.action-modal-label {
  display: block;
  font-size: 12px;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.action-modal-textarea {
  width: 100%;
  min-height: 185px;
  box-sizing: border-box;
  border: 1px solid var(--border-component);
  border-radius: 6px;
  padding: 7px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-inky);
  resize: vertical;
}

.action-modal-textarea--error {
  border-color: var(--red-error-border);
}

.action-modal-actions {
  margin-top: 16px;
}
