/* One creator card for the whole site (Burak, 2026-11-29: "the same card for /app and /influencers/... so changes
   apply to whole site instead of a single spot"). Styled only here and loaded by the web app's shell and both public
   layouts. Two renderers print the same markup: the web app (resources/js/marketplace/workspace.jsx, CreatorResult)
   and the public pages (resources/views/partials/creator-card.blade.php); tests/Feature/CreatorCardTest.php keeps
   them in step. Self-contained: its own colours, so app, category and landing styles around it don't change it. */

.ht-card {
    --htc-ink: #21152e;
    --htc-muted: #776b86;
    --htc-line: #e8e0f1;
    --htc-hover: #c5b0ec;
    --htc-panel: #f7f4fb;
    --htc-divide: #e5ddef;
    --htc-accent: #7040d5;
    --htc-avatar: #efe8fb;
    --htc-go: #f1ebfb;
    --htc-surface: #fff;
    --htc-badge-bg: #e7f7ee;
    --htc-badge-ink: #13693b;
    --htc-ring: #fff;
    --htc-shadow: 0 20px 40px -26px rgb(64 34 94 / .4);
    /* The card's own width decides its header (see the end of the file), not the screen's. */
    container: ht-card / inline-size;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 18px;
    border: 1px solid var(--htc-line);
    border-radius: 18px;
    background: var(--htc-surface);
    color: var(--htc-ink);
    /* DM Sans is every layout's body font (the web app, category pages and the landing all load it). */
    font: inherit;
    font-family: 'DM Sans', system-ui, sans-serif;
    text-align: start;
    text-decoration: none;
    transition: border-color .2s, box-shadow .25s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
/* Page styles for links (the app, category pages, landing) never recolour or underline a card. */
a.ht-card, a.ht-card:hover, a.ht-card:visited { color: var(--htc-ink); text-decoration: none; }
/* The brand's gradient, as a thin rule along the top. */
.ht-card::before { content: ''; position: absolute; top: -1px; left: 22px; right: 22px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, #7447e8, #b13fd1 40%, #f04491 72%, #ff7a45); }
.ht-card:hover { border-color: var(--htc-hover); box-shadow: var(--htc-shadow); transform: translateY(-2px); }
.ht-card:focus-visible { outline: 3px solid var(--htc-accent); outline-offset: 3px; }

.ht-card .ht-card__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* The handle's initial sits under the account picture; a picture that fails to load is removed, so the initial shows. */
.ht-card .ht-card__avatar { position: relative; display: grid; flex: none; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: var(--htc-avatar); color: var(--htc-accent); font-size: 17px; font-weight: 700; line-height: 1; }
.ht-card .ht-card__avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ht-card .ht-card__who { display: grid; flex: 1; gap: 5px; min-width: 0; }
.ht-card .ht-card__handle { overflow: hidden; font-size: 15px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ht-card .ht-card__badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; overflow: hidden; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--htc-badge-bg); color: var(--htc-badge-ink); font-size: 12px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ht-card .ht-card__badge svg { display: block; flex: none; }
/* Longer translations end in "…" instead of being cut mid-letter (a flex box never shows text-overflow itself). */
.ht-card .ht-card__badge > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ht-card .ht-card__sub { overflow: hidden; color: var(--htc-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.ht-card .ht-card__platform { display: grid; flex: none; place-items: center; width: 30px; height: 30px; }
.ht-card .ht-card__platform svg { display: block; }

/* font-family: page styles give headings their display face (category pages: Manrope); the card keeps its own. */
.ht-card .ht-card__title { display: -webkit-box; min-height: 2.84em; margin: 16px 0; overflow: hidden; color: inherit; font-family: inherit; font-size: 16.5px; font-weight: 650; line-height: 1.42; letter-spacing: -.01em; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.ht-card .ht-card__stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: auto; padding: 12px 14px; border-radius: 12px; background: var(--htc-panel); }
.ht-card .ht-card__stat { display: block; min-width: 0; }
.ht-card .ht-card__stat + .ht-card__stat { padding-inline-start: 14px; border-inline-start: 1px solid var(--htc-divide); }
.ht-card .ht-card__stat small { display: block; margin-bottom: 4px; color: var(--htc-muted); font-size: 11.5px; line-height: 1.3; }
.ht-card .ht-card__stat strong { display: flex; align-items: center; gap: 5px; min-height: 26px; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.ht-card .ht-card__stat--rate strong { color: var(--htc-accent); }
.ht-card .ht-card__stat--none strong { color: var(--htc-muted); font-size: 13.5px; font-weight: 500; letter-spacing: 0; }
.ht-card .ht-card__stat svg { display: block; flex: none; }

.ht-card .ht-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.ht-card .ht-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; }
.ht-card .ht-card__price small { color: var(--htc-muted); font-size: 12px; }
.ht-card .ht-card__price strong { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.ht-card .ht-card__go { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--htc-go); color: var(--htc-accent); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.ht-card .ht-card__go svg { display: block; }
.ht-card:hover .ht-card__go { transform: translateX(3px); }
/* Right-to-left pages (Arabic, Hebrew, Persian, Urdu): the arrow points and moves the other way. */
:where([dir="rtl"]) .ht-card .ht-card__go svg { transform: scaleX(-1); }
:where([dir="rtl"]) .ht-card:hover .ht-card__go { transform: translateX(-3px); }

/* Dark sections: the landing's "New on HireTalents" and the creator pages' "More creators". */
.ht-card--dark {
    --htc-ink: #fff;
    --htc-muted: rgb(255 255 255 / .66);
    --htc-line: rgb(255 255 255 / .14);
    --htc-hover: rgb(255 255 255 / .34);
    --htc-panel: rgb(255 255 255 / .06);
    --htc-divide: rgb(255 255 255 / .12);
    --htc-accent: #ffb8de;
    --htc-avatar: rgb(255 255 255 / .08);
    --htc-go: rgb(255 255 255 / .1);
    --htc-surface: linear-gradient(165deg, #251439, #140b24 58%, #0f0819);
    --htc-badge-bg: rgb(62 224 143 / .14);
    --htc-badge-ink: #c9f8df;
    --htc-ring: #231236;
    --htc-shadow: 0 40px 70px -40px #000, 0 0 54px -24px rgb(240 68 145 / .5);
}

/* "Your card goes here": the open spot at the end of the landing's list. */
.ht-card--join { justify-content: center; gap: 12px; border-style: dashed; border-width: 2px; }
.ht-card--join::before { display: none; }
.ht-card--join .ht-card__avatar { width: 56px; height: 56px; }
.ht-card--join .ht-card__avatar img { position: static; width: 34px; height: 34px; object-fit: contain; }
.ht-card--join .ht-card__title { min-height: 0; margin: 4px 0 0; }
.ht-card--join .ht-card__sub { white-space: normal; }

/* The grid the public pages put cards in (the web app lays its own out in the workspace). */
.ht-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.ht-cards > li { display: flex; min-width: 0; }

/* Narrow cards (four in a row, phones' swipe row): the platform logo moves onto the picture's corner, so the handle and
   "Verified on Instagram" get the whole width. Measured against the content box: 272px is a card about 310px wide. */
@container ht-card (max-width: 271px) {
    .ht-card .ht-card__id { position: relative; }
    .ht-card .ht-card__platform { position: absolute; top: 27px; inset-inline-start: 27px; width: 22px; height: 22px; border-radius: 7px; background: var(--htc-ring); }
    .ht-card .ht-card__platform svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .ht-card, .ht-card__go { transition: none; }
    .ht-card:hover { transform: none; }
    .ht-card:hover .ht-card__go { transform: none; }
}
