/* Shared card declarations belong in one cacheable asset, not every feed row. */
.memory-feed-card { position: relative; }
.memory-feed-card .memory-card-options {
    position: absolute;
    top: 12px;
    right: 26px;
    background: #757575;
    border-radius: 100%;
    display: flex;
    cursor: pointer;
    z-index: 2;
}
.memory-feed-card .memory-card-options-icon { color: white; font-size: 16px; padding: 2px; }
.memory-feed-card .memory-element-image { position: relative; }
.memory-feed-card .memory-element-thumbnail,
.memory-feed-card .memory-card-avatar-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.memory-feed-card .memory-card-avatar-image { border-radius: inherit; }
.memory-feed-card .memory-card-featured-star { font-size: 11px; }
.memory-feed-card .memory-card-copy { margin: auto 0; font-family: 'SFPROTEXT'; width: 100%; }
.memory-feed-card .memory-card-title {
    font-size: 20px;
    font-weight: 500;
    color: black;
    margin-bottom: 10px;
    word-break: break-word;
    display: flex;
    justify-content: space-between;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.memory-feed-card .memory-card-author { display: flex; width: 100%; }
.memory-feed-card .memory-username { width: 83%; }
/* The full title (capped at 90 characters) clamped to two lines, instead of a
   20-character cut that hid most titles on phones. */
.memory-feed-card .memory-card-mobile-title {
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.memory-feed-card .memory-card-date { font-size: 12px; font-weight: normal; display: flex; margin-top: 3px; }
.memory-feed-card .memory-card-calendar { font-size: 12px; margin: auto 0; margin-right: 3px; }
.memory-feed-card .memory-card-date-label { margin: auto 0; }
.memory-feed-card .memory-liked { z-index: auto; flex-wrap: wrap; }
.memory-feed-card .memory-card-location,
.memory-feed-card .memory-card-actions { display: flex; align-items: center; }
.memory-feed-card .memory-card-location-icon { width: 20px; height: 20px; color: #757575; }
.memory-feed-card .memory-card-country { padding-left: 5px; font-size: 14px; color: #757575; }
.memory-feed-card .memory-card-action { display: flex; align-items: center; margin-right: 4px; }
.memory-feed-card .memory-card-actions .memory-action-button {
    font-size: 20px;
    color: #757575;
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.memory-feed-card .memory-card-mark-count { padding-left: 5px; font-size: 14px; }
.memory-feed-card .memory-card-mark { display: inline-flex; align-items: center; }

/* Desktop feed card. Every card has the same three rows: title, author, and
   a footer of location plus actions. The footer never wraps (a long country
   is cut with an ellipsis) and sits at the bottom of the card, so cards line
   up whether or not they have a country. utils.css loads after this file, so
   these selectors need more weight than its `.memory-list .memory-element …`
   rules. The phone home (.mh) styles its own card in mobile-home.css. */
@media screen and (min-width: 813px) {
    .memory-feed-card:not(.mh *) .memory-card-options {
        top: var(--ds-space-3);
        right: var(--ds-space-3);
        background: var(--ds-ink-soft);
    }
    .memory-feed-card:not(.mh *) .memory-element {
        align-items: stretch;
        min-height: 136px;
        border: 1px solid var(--ds-card-border);
        border-radius: var(--ds-radius-md);
        background: var(--ds-card);
        box-shadow: var(--ds-shadow-card);
    }
    .memory-feed-card:not(.mh *) .memory-element .memory-element-image {
        flex: none;
        width: 128px;
        min-height: 0;
        background: var(--ds-surface);
    }
    .memory-feed-card:not(.mh *) .memory-element .memory-element-thumbnail {
        position: absolute;
        inset: 0;
    }
    .memory-feed-card:not(.mh *) .memory-element .memory-element-details {
        box-sizing: border-box;
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        padding: var(--ds-space-3) var(--ds-space-4) var(--ds-space-1);
    }
    .memory-feed-card:not(.mh *) .memory-card-copy {
        display: flex;
        flex-direction: column;
        gap: var(--ds-space-2);
        min-width: 0;
        margin: 0;
        font-family: var(--ds-font-sans);
    }
    .memory-feed-card:not(.mh *) .memory-card-title {
        display: block;
        margin: 0;
        overflow: hidden;
        color: var(--ds-ink);
        font: 600 var(--ds-font-size-h4) / var(--ds-line-height-h4) var(--ds-font-sans);
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .memory-feed-card:has(.memory-card-options):not(.mh *) .memory-card-title { padding-right: var(--ds-space-8); }
    .memory-feed-card:not(.mh *) .memory-card-author { align-items: center; gap: var(--ds-space-2); }
    .memory-feed-card:not(.mh *) .memory-avatar {
        flex: none;
        width: var(--ds-space-6);
        height: var(--ds-space-6);
        margin: 0;
        overflow: hidden;
        border-radius: var(--ds-radius-pill);
        background: var(--ds-surface);
    }
    .memory-feed-card:not(.mh *) .memory-username {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        color: var(--ds-ink-soft);
        font: 500 var(--ds-font-size-bodySm) / var(--ds-line-height-bodySm) var(--ds-font-sans);
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .memory-feed-card:not(.mh *) .memory-liked {
        position: static;
        flex-wrap: nowrap;
        gap: var(--ds-space-2);
        margin-top: auto;
        color: var(--ds-ink-soft);
        font-family: var(--ds-font-sans);
    }
    .memory-feed-card:not(.mh *) .memory-card-location { flex: 1 1 auto; min-width: 0; gap: var(--ds-space-1); }
    .memory-feed-card:not(.mh *) .memory-card-location-icon {
        flex: none;
        width: auto;
        height: auto;
        color: var(--ds-ink-faint);
        font-size: var(--ds-font-size-h4);
    }
    .memory-feed-card:not(.mh *) .memory-card-country {
        margin: 0;
        padding: 0;
        overflow: hidden;
        color: var(--ds-ink-soft);
        font-size: var(--ds-font-size-bodySm);
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .memory-feed-card:not(.mh *) .memory-card-actions { flex: none; margin-inline-start: auto; margin-right: calc(-1 * var(--ds-space-2)); }
    .memory-feed-card:not(.mh *) .memory-card-action { margin: 0; }
    .memory-feed-card:not(.mh *) .memory-card-actions .memory-action-button {
        border-radius: var(--ds-radius-pill);
        color: var(--ds-ink-soft);
        font-size: var(--ds-font-size-h3);
    }
    .memory-feed-card:not(.mh *) .memory-card-actions .memory-action-button .material-icons-outlined { font-size: inherit; }
    .memory-feed-card:not(.mh *) .memory-card-mark { gap: var(--ds-space-1); min-height: 44px; padding-inline: var(--ds-space-2); }
    .memory-feed-card:not(.mh *) .memory-card-mark-count {
        margin: 0;
        padding: 0;
        min-width: 1ch;
        color: var(--ds-ink-soft);
        font-size: var(--ds-font-size-bodySm);
        font-variant-numeric: tabular-nums;
    }
}
