/* Resource card (template-parts/integrations-new/integration-card.php),
   Figma UI Kit "resource-card" node 2817:722. Shared by Integrations and the
   Competitors hub, so it carries its own values instead of page variables.
   Type sizes come from the global sd-type-* classes in the markup. */

.in-new-card,
.in-new-card * {
    box-sizing: border-box;
}

.in-new-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    /* 24px in Figma, measured from the outer edge: 23px + the 1px border. */
    padding: 23px;
    overflow: hidden;
    border: 1px solid var(--sd-card-border, rgba(0, 0, 0, 0.1));
    border-radius: var(--sd-card-radius, 16px);
    background: #fff;
    color: #262626;
    text-decoration: none;
    transition: border-color var(--sd-card-transition, 0.2s ease), box-shadow var(--sd-card-transition, 0.2s ease);
}

.in-new-card__logo {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
}

.in-new-card__content {
    display: flex;
    width: 100%;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

/* Cards in a row stretch to the tallest one; Explore stays pinned to the
   bottom so the links line up (16px from the copy is the minimum). */
.in-new-card__content > .sd-link-button {
    margin-top: auto;
}

.in-new-card__copy {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.in-new-card__copy h2,
.in-new-card__copy h3,
.in-new-card__copy p {
    margin: 0;
}

.in-new-card__copy h2,
.in-new-card__copy h3 {
    color: #262626;
}

.in-new-card__copy p {
    color: rgba(0, 0, 0, 0.75);
}

/* Hover: border and the Explore link highlight together (the link-button is a
   <span> inside the card link, so it mirrors the global .sd-link-button hover). */
a.in-new-card--linked:hover,
a.in-new-card--linked:focus-visible {
    /* Shared card hover tokens: css/style.min.css :root (--sd-card-*). */
    border-color: var(--sd-card-border-hover, rgba(0, 0, 0, 0.2));
    box-shadow: var(--sd-card-shadow-hover, 0 1px 2px rgba(0, 0, 0, 0.1));
    color: #262626;
}

a.in-new-card--linked:focus-visible {
    outline: 2px solid #262626;
    outline-offset: 2px;
}

a.in-new-card--linked:hover .sd-link-button__label,
a.in-new-card--linked:focus-visible .sd-link-button__label {
    color: currentColor;
    text-decoration-color: currentColor;
}

a.in-new-card--linked:hover .sd-link-button__icon,
a.in-new-card--linked:focus-visible .sd-link-button__icon {
    transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
    .in-new-card {
        transition: none;
    }
}
