/*
 * Shared card separation for the standalone pages.
 * This file names card systems, plus the matching homepage FAQ surface and
 * product-document divider. It avoids FAQ rows, tables and unrelated frames.
 */

/* Service and equipment catalogues used across the inner routes. */
.catalog-grid,
.monitoring-product-grid,
.object-product-grid {
  gap: 12px;
  border: 0;
}

/* Page-local catalog rules sometimes qualify a grid with the body class. */
body[class] :is(.catalog-grid, .monitoring-product-grid, .object-product-grid) {
  gap: 12px;
  border: 0;
}

.catalog-card,
.monitoring-product-card,
.object-product-card {
  overflow: hidden;
  border: 1px solid var(--sv-line, #dde3ec);
  border-radius: 12px !important;
}

body[class] :is(.catalog-card, .monitoring-product-card, .object-product-card) {
  overflow: hidden;
  border: 1px solid var(--sv-line, #dde3ec);
  border-radius: 12px !important;
}

.object-product-card {
  border-color: rgba(0, 47, 108, 0.13);
}

body[class] .object-product-card {
  border-color: rgba(0, 47, 108, 0.13);
}

/* Keep the card's border width and its existing hover/focus treatment. */
body[class] :is(.catalog-card, .monitoring-product-card, .object-product-card):not(:hover):not(:focus-within) {
  border-color: transparent !important;
}

body[class] :is(.catalog-card__visual, .monitoring-product-card__visual, .object-product-card__visual) {
  border-bottom-color: transparent !important;
}

:is(.catalog-card, .monitoring-product-card)::after {
  border-radius: inherit;
}

/* Related services retain their dark/light variants while becoming separate cards. */
.related-grid {
  gap: 12px;
  border: 0;
}

body[class] .related-grid {
  gap: 12px;
  border: 0;
}

.related-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px !important;
}

body[class] .related-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px !important;
}

.service-section--related-light .related-card {
  border-color: rgba(0, 47, 108, 0.16);
}

body[class] .service-section--related-light .related-card {
  border-color: rgba(0, 47, 108, 0.16);
}

body[class] .related-card:not(:hover):not(:focus-visible) {
  border-color: transparent !important;
}

/* Joined card grids on the driver-card and MCHD service routes. */
.mchd-owner-grid,
.driver-card-type-grid,
.monitoring-installation__expertise-grid,
.object-other-sites__grid {
  gap: 12px;
  border: 0;
}

.mchd-owner-card,
.driver-card-type,
.monitoring-installation__expertise-grid section,
.object-other-sites__grid article,
.driver-process-step {
  overflow: hidden;
  border-radius: 12px !important;
}

.mchd-owner-card,
.driver-card-type {
  border: 1px solid var(--driver-line, var(--sv-line, #dde3ec));
}

.mchd-owner-card {
  border-color: var(--sv-line, #dde3ec);
}

.monitoring-installation__expertise-grid section {
  border: 1px solid #dce5ee;
}

.object-other-sites__grid article {
  border: 1px solid rgba(0, 47, 108, 0.16);
}

/* Help and company card collections already have their own layouts. */
.help-manuals {
  gap: 12px;
}

.help-manual-card,
.company-certificate,
.company-facts > div {
  overflow: hidden;
  border-radius: 12px !important;
}

.company-certificate {
  border: 1px solid var(--company-line, #d9e0ea);
}

.company-certificate__image {
  border: 0;
}

.company-facts > div {
  border: 1px solid var(--company-line, #d9e0ea);
}

/* Editorial cards are individual surfaces; their existing grid gaps stay intact. */
.blog-page [data-blog-card],
.blog-feature {
  overflow: hidden;
  border-radius: 12px !important;
}

.blog-page [data-blog-card] {
  border: 1px solid var(--blog-line, #d9e0ea);
}

body[class] .tachograph-blog-selection__card:not(:hover):not(:focus-within),
[data-screen-label] [data-blog-card]:not(:hover):not(:focus-visible) {
  border-color: transparent !important;
}

/* Archive tiles are generated by blog-data.js; article content is outside this grid. */
.blog-page [data-blog-archive] > .blog-card:not(:hover):not(:focus-visible) {
  border-color: transparent !important;
}

/* Homepage card surfaces use the same compact geometry without touching FAQ rows. */
[data-screen-label] :is([data-service-card], [data-case-card], [data-mega-card], [data-blog-card]) {
  border-radius: 12px !important;
}

/* The homepage FAQ container is the counterpart of the inner-page list. */
[data-screen-label] [data-faq-inner] {
  box-shadow: none !important;
}

/* Dialog section divider only; leave each document link's frame intact. */
@media (min-width: 601px) {
  body[class] .product-dialog__documents {
    border-top-color: transparent !important;
  }

  body.driver-card-page .driver-card-detail-dialog .product-dialog__requirements {
    border-top-color: transparent !important;
  }
}

/* Filled controls in card groups and homepage card actions. */
:is(
  .catalog-card__actions,
  .monitoring-product-card__actions,
  .help-manual-card__actions
) > :is(a, button),
.service-section--related-light .related-card__link,
.related-card__link,
.blog-button,
.company-button,
.contact-button,
.legal-button,
.help-cta__phone,
[data-screen-label] :is([data-service-cta], [data-blog-card-cta], [data-blog-action], [data-cases-more], [data-solutions-cta] a) {
  border-radius: 8px !important;
}

/* The MCHD guide is an underlined text action, not a rounded control. */
.mchd-guide-trigger {
  border-radius: 0 !important;
}

/* The 30-day GLONASS trial section retains straight corners. */
.glonass-page .monitoring-journey,
.glonass-page .monitoring-journey * {
  border-radius: 0 !important;
}

.glonass-page .monitoring-hero .monitoring-card__online i,
.glonass-page .monitoring-hero .monitoring-final__connection-active i,
.glonass-page .monitoring-hero .monitoring-camera-feed__rec i {
  border-radius: 50% !important;
}

/* Utility and scenario actions that use their own page-local styles. */
.skip-link,
body [data-back-to-top],
body [data-login-contact],
.cookie-map-placeholder__actions > :is(a, button),
.object-zone-content__cta,
.era-vehicle-slide__details {
  border-radius: 8px !important;
}
