/* Data, comparison and ranking tables */
@layer horeca.components {
  .horeca-blog-table {
    -webkit-overflow-scrolling: touch;
    margin: var(--horeca-space-6) 0;
    max-width: var(--horeca-wide-width);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    touch-action: pan-x pan-y;
  }

  table.horeca-blog-table,
  .horeca-blog-table table {
    border-collapse: collapse;
    border: 0;
    color: var(--horeca-ink);
    font-size: 0.9375rem;
    line-height: 1.45;
    min-width: 38rem;
    width: 100%;
  }

  .horeca-blog-table caption {
    caption-side: top;
    color: var(--horeca-ink);
    font-size: 1.125rem;
    font-weight: 700;
    padding: 0 0 var(--horeca-space-3);
    text-align: left;
  }

  .horeca-blog-table :where(th, td) {
    border: 0;
    border-bottom: 1px solid var(--horeca-line);
    padding: 0.8rem 0.9rem;
    text-align: left;
    vertical-align: top;
  }

  .horeca-blog-table :where(th, td):not(:first-child) {
    text-align: center;
  }

  .horeca-blog-table thead th {
    background: var(--horeca-ink);
    border-bottom: 0;
    color: var(--horeca-white);
    font-weight: 700;
  }

  .horeca-blog-table thead th:first-child {
    text-align: left;
  }

  .horeca-blog-table tbody tr:nth-child(even) {
    background: var(--horeca-surface);
  }

  .horeca-blog-table tbody th {
    font-weight: 700;
    text-align: left;
  }

  @media (max-width: 48rem) {
    .horeca-blog-table { margin: 2.25rem 0; }

    table.horeca-blog-table,
    .horeca-blog-table table {
      font-size: 0.875rem;
      min-width: 34rem;
    }

    .horeca-blog-table :where(th, td) { padding: 0.7rem 0.75rem; }
    .horeca-blog-table caption { font-size: 1rem; }
  }
}

/* În afara @layer — bate stilurile core/table (borduri negre etc.) */
#article-single-content .horeca-blog-table table,
#article-single-content .horeca-blog-table .wp-block-table table,
.horeca-blog-table table,
.horeca-blog-table .wp-block-table table {
	border: 0 !important;
	border-collapse: collapse !important;
	width: 100% !important;
}

#article-single-content .horeca-blog-table :where(th, td),
#article-single-content .horeca-blog-table .wp-block-table :where(th, td),
.horeca-blog-table :where(th, td),
.horeca-blog-table .wp-block-table :where(th, td) {
	border: 0 !important;
	border-bottom: 1px solid #d9dcde !important;
	padding: 0.8rem 0.9rem !important;
	vertical-align: top !important;
}

#article-single-content .horeca-blog-table :where(th, td):not(:first-child),
.horeca-blog-table :where(th, td):not(:first-child) {
	text-align: center !important;
}

#article-single-content .horeca-blog-table :where(th, td):first-child,
.horeca-blog-table :where(th, td):first-child {
	text-align: left !important;
}

#article-single-content .horeca-blog-table thead th,
.horeca-blog-table thead th {
	background: #222426 !important;
	border-bottom: 0 !important;
	color: #ffffff !important;
	font-weight: 700 !important;
}

#article-single-content .horeca-blog-table tbody tr:nth-child(even),
.horeca-blog-table tbody tr:nth-child(even) {
	background: #f4f5f5 !important;
}

#article-single-content .horeca-blog-table tbody th,
.horeca-blog-table tbody th {
	font-weight: 700 !important;
}

#article-single-content .horeca-blog-table caption,
.horeca-blog-table caption {
	caption-side: top !important;
	color: #222426 !important;
	font-size: 1.125rem !important;
	font-weight: 700 !important;
	padding: 0 0 1rem !important;
	text-align: left !important;
}

/* Ascunde bordura wrapper-ului core/table */
#article-single-content .horeca-blog-table .wp-block-table,
.horeca-blog-table .wp-block-table {
	border: 0 !important;
	margin: 0 !important;
}

#article-single-content .horeca-blog-table .wp-block-table figcaption,
.horeca-blog-table .wp-block-table figcaption {
	color: #222426 !important;
	font-size: 1.125rem !important;
	font-weight: 700 !important;
	margin: 0 0 1rem !important;
	text-align: left !important;
}
