/* Modules.Horses — presentation styles.
   Host theme overrides on top via .cl-* utility tokens (Cavallearn-Gold etc.).
   Kept neutral so CDL/Worklino could embed without rewrite. */

:root {
    --hrs-bg-card: rgba(255, 255, 255, 0.04);
    --hrs-border: rgba(255, 255, 255, 0.1);
    --hrs-text-muted: rgba(255, 255, 255, 0.55);
    --hrs-accent: var(--cl-gold, #d4af37);
    --hrs-danger: #d04848;
    --hrs-success: #4caf50;
    --hrs-warning: #f0a020;
    --hrs-radius: 12px;
}

.hrs-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.hrs-section { margin-bottom: 2rem; }
.hrs-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 .75rem;
}
.hrs-section__toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: .5rem 0;
}

.hrs-list { display: flex; flex-direction: column; gap: .75rem; }

/* ─── Gallery grid (HorseList) ───────────────────────────────────────────── */
.hrs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}
@media (min-width: 720px) {
    .hrs-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 360px)); }
}
.hrs-gallery-grid--single {
    grid-template-columns: minmax(280px, 360px) !important;
    justify-content: center;
}

/* ─── HorseGalleryCard (large card, photo + info layout) ─────────────────── */
.hrs-gcard {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hrs-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    min-height: 300px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
[data-theme="light"] .hrs-gcard { background: rgba(0,0,0,0.03); }
.hrs-gcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
    border-color: var(--hrs-accent);
}
[data-theme="light"] .hrs-gcard:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.18); }
.hrs-gcard--dimmed { opacity: .55; }

.hrs-gcard__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}
[data-theme="light"] .hrs-gcard__photo { background: rgba(0,0,0,0.05); }
.hrs-gcard__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Cinematic — Foto scaliert minimal nur beim Card-Hover. Karte selbst hebt sich getrennt. */
    transition: transform .45s ease;
}
.hrs-gcard:hover .hrs-gcard__photo img { transform: scale(1.02); }
.hrs-gcard__photo-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--hrs-text-muted);
    gap: .5rem;
}
.hrs-gcard__photo-empty i { font-size: 2.5rem; }
.hrs-gcard__photo-hint { font-size: .8rem; }

.hrs-gcard__status {
    position: absolute;
    top: .75rem;
    right: .75rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    background: rgba(0,0,0,0.6);
    color: white;
    backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
[data-theme="light"] .hrs-gcard__status {
    background: rgba(255,255,255,0.85);
    color: #333;
}
.hrs-gcard__status--sold { background: rgba(240,160,32,0.4); color: white; }
.hrs-gcard__status--retired { background: rgba(120,120,120,0.5); color: white; }
.hrs-gcard__status--deceased { background: rgba(60,60,60,0.6); color: rgba(255,255,255,0.75); }
[data-theme="light"] .hrs-gcard__status--sold { background: rgba(240,160,32,0.85); color: #4a3010; }
[data-theme="light"] .hrs-gcard__status--retired { background: rgba(140,140,140,0.85); color: #333; }
[data-theme="light"] .hrs-gcard__status--deceased { background: rgba(80,80,80,0.85); color: #f0f0f0; }
.hrs-gcard__status-cross { font-size: 1em; opacity: .9; }

.hrs-gcard__info {
    padding: .9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}
.hrs-gcard__name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
}
.hrs-gcard__disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    align-items: center;
}
.hrs-gcard__more {
    font-size: .75rem;
    color: var(--hrs-text-muted);
    padding: .15rem .45rem;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
}
[data-theme="light"] .hrs-gcard__more { background: rgba(0,0,0,0.05); }
.hrs-gcard__meta {
    color: var(--hrs-text-muted);
    font-size: .85rem;
    margin-top: auto;
}
.hrs-gcard__meta-sep { margin: 0 .35rem; opacity: .55; }

/* ─── Empty-state Hero CTA ───────────────────────────────────────────────── */
.hrs-empty-hero {
    text-align: center;
    padding: 3.5rem 2rem;
    background: rgba(255,255,255,0.03);
    border: 1px dashed var(--hrs-border);
    border-radius: 20px;
    max-width: 560px;
    margin: 2rem auto;
}
[data-theme="light"] .hrs-empty-hero { background: rgba(0,0,0,0.02); }
.hrs-empty-hero__icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(212,175,55,0.12);
    color: var(--hrs-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}
[data-theme="light"] .hrs-empty-hero__icon { background: rgba(212,175,55,0.18); }
.hrs-empty-hero__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}
.hrs-empty-hero__text {
    color: var(--hrs-text-muted);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}
.hrs-empty-hero__cta {
    font-size: 1rem;
    padding: .65rem 1.5rem;
}

.hrs-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1rem;
    background: var(--hrs-bg-card);
    border: 1px solid var(--hrs-border);
    border-radius: var(--hrs-radius);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, border-color .15s;
}
.hrs-card:hover {
    transform: translateY(-1px);
    border-color: var(--hrs-accent);
}
.hrs-card--dimmed { opacity: .55; }

.hrs-card__avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.hrs-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hrs-card__avatar i { font-size: 1.4rem; color: var(--hrs-text-muted); }

.hrs-card__body { flex: 1; min-width: 0; }
.hrs-card__name { font-weight: 600; }
.hrs-card__meta { color: var(--hrs-text-muted); font-size: .82rem; }

.hrs-status {
    font-size: .75rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}
.hrs-status--active { background: rgba(76,175,80,0.18); color: var(--hrs-success); }
.hrs-status--sold { background: rgba(240,160,32,0.15); color: var(--hrs-warning); }
.hrs-status--retired { background: rgba(255,255,255,0.08); }
.hrs-status--deceased { background: rgba(208,72,72,0.15); color: var(--hrs-danger); }

.hrs-empty, .hrs-skeleton {
    text-align: center;
    padding: 2rem;
    color: var(--hrs-text-muted);
    background: var(--hrs-bg-card);
    border-radius: var(--hrs-radius);
}
.hrs-empty i { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

/* Tabs */
.hrs-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--hrs-border);
    margin-bottom: .5rem;
    overflow-x: auto;
}
.hrs-tab {
    background: none;
    border: none;
    color: var(--hrs-text-muted);
    padding: .75rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.hrs-tab--active {
    color: inherit;
    border-bottom-color: var(--hrs-accent);
}

/* Forms */
.hrs-form { display: flex; flex-direction: column; gap: 1rem; }
.hrs-form__row { display: flex; flex-direction: column; gap: .25rem; }
.hrs-form__row label { font-size: .85rem; color: var(--hrs-text-muted); }
.hrs-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.hrs-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hrs-border);
    border-radius: 8px;
    padding: .55rem .75rem;
    color: inherit;
    font: inherit;
}
.hrs-input:focus { outline: none; border-color: var(--hrs-accent); }
.hrs-input--compact { max-width: 320px; }
.hrs-form__row--narrow { max-width: 480px; }
.hrs-hint { color: var(--hrs-text-muted); font-size: .75rem; }
.hrs-form__actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }

.hrs-info-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .5rem 1rem;
    margin: 0;
}
.hrs-info-grid dt { color: var(--hrs-text-muted); }
.hrs-info-grid dd { margin: 0; }

/* Buttons */
.hrs-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--hrs-border);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    transition: background .15s, border-color .15s;
}
.hrs-btn:hover { background: rgba(255,255,255,0.05); }
.hrs-btn:disabled { opacity: .5; cursor: not-allowed; }
.hrs-btn--primary {
    background: var(--hrs-accent);
    color: #000;
    border-color: var(--hrs-accent);
}
.hrs-btn--primary:hover { filter: brightness(1.1); }
.hrs-btn--ghost { background: rgba(255,255,255,0.04); }
.hrs-btn--ghost-sm {
    padding: .2rem .5rem;
    font-size: .8rem;
    background: rgba(255,255,255,0.04);
}

.hrs-text-muted { color: var(--hrs-text-muted); }

.hrs-alert {
    padding: .75rem 1rem;
    border-radius: 8px;
    margin: .5rem 0;
}
.hrs-alert--error {
    background: rgba(208,72,72,0.1);
    border: 1px solid rgba(208,72,72,0.3);
    color: var(--hrs-danger);
}

/* Status controls */
.hrs-status-controls { margin-top: 1.5rem; }
.hrs-status-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

/* Pills */
.hrs-pill {
    font-size: .7rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    margin-left: .35rem;
}
.hrs-pill--primary { background: rgba(212,175,55,0.18); color: var(--hrs-accent); }
.hrs-pill--info { background: rgba(64,144,224,0.18); color: #6db1ff; }
.hrs-pill--success { background: rgba(76,175,80,0.18); color: var(--hrs-success); }
.hrs-pill--muted { background: rgba(255,255,255,0.08); color: var(--hrs-text-muted); }

/* Access manager */
.hrs-access__title { margin: 0 0 1rem; font-size: 1rem; }
.hrs-access__grant { margin-bottom: 1.5rem; }
.hrs-access__hint { color: var(--hrs-text-muted); font-size: .8rem; margin-top: .25rem; }
.hrs-access__hint--warn { color: var(--hrs-warning); }
.hrs-access__results {
    list-style: none;
    padding: 0;
    margin: .25rem 0;
    border: 1px solid var(--hrs-border);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}
.hrs-access__results li {
    padding: .5rem .75rem;
    cursor: pointer;
}
.hrs-access__results li:hover { background: rgba(255,255,255,0.05); }
.hrs-access__form {
    margin-top: .5rem;
    padding: .75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.hrs-access__form-row { display: flex; gap: .5rem; align-items: center; }
.hrs-access__form-row .hrs-input { flex: 1; }
.hrs-access__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.hrs-access__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.hrs-access__item--inactive { opacity: .6; }

/* Goals + Relations editors */
.hrs-goals, .hrs-relations { display: flex; flex-direction: column; gap: .75rem; }
.hrs-goals__header, .hrs-relations__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hrs-goals__header h3, .hrs-relations__header h3 { margin: 0; font-size: 1rem; }
.hrs-goal-editor, .hrs-relation-editor {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.hrs-goal-editor__row, .hrs-relation-editor__row { display: flex; gap: .5rem; }
.hrs-goal-editor__row .hrs-input,
.hrs-relation-editor__row .hrs-input { flex: 1; }
.hrs-goal-editor__actions, .hrs-relation-editor__actions {
    display: flex; gap: .5rem; justify-content: flex-end;
}
.hrs-goal-list, .hrs-relation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.hrs-goal {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border-left: 3px solid var(--hrs-border);
}
.hrs-goal--success { border-left-color: var(--hrs-success); }
.hrs-goal--primary { border-left-color: var(--hrs-accent); }
.hrs-goal--muted { opacity: .6; }
.hrs-goal__actions { display: flex; gap: .25rem; }
.hrs-relation {
    padding: .5rem .75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.hrs-relation > .hrs-btn--ghost-sm { margin-left: auto; }

/* Uploader + Gallery */
.hrs-uploader {
    border: 2px dashed var(--hrs-border);
    border-radius: var(--hrs-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color .15s, background .15s;
}
.hrs-uploader--drag { border-color: var(--hrs-accent); background: rgba(212,175,55,0.05); }
.hrs-uploader__file-input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
}
.hrs-uploader__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    color: var(--hrs-text-muted);
}
.hrs-uploader__label i { font-size: 2rem; }
.hrs-uploader__pending {
    list-style: none;
    padding: 0;
    margin: .75rem 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .85rem;
}
.hrs-uploader__actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }

.hrs-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}
.hrs-gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    overflow: hidden;
}
.hrs-gallery__item img, .hrs-gallery__item video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.hrs-gallery__caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: .35rem .5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    font-size: .75rem;
}
.hrs-gallery__delete {
    position: absolute;
    top: .25rem; right: .25rem;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    padding: .25rem .4rem;
    border-radius: 6px;
    cursor: pointer;
}
.hrs-gallery__delete:hover { background: var(--hrs-danger); }
.hrs-gallery__doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    color: inherit;
    gap: .5rem;
}
.hrs-gallery__doc i { font-size: 2rem; }

/* ─── Hero (Übersichts-Tab) ──────────────────────────────────────────────── */
.hrs-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    max-height: 480px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    margin-bottom: 1rem;
}
[data-theme="light"] .hrs-hero {
    background: rgba(0,0,0,0.04);
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}
.hrs-hero--empty {
    border: 2px dashed var(--hrs-border);
    box-shadow: none;
}
.hrs-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hrs-hero__upload {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 2rem;
    text-align: center;
}
.hrs-hero__upload-icon {
    font-size: 3rem;
    color: var(--hrs-text-muted);
}
.hrs-hero__upload-text {
    font-size: 1.05rem;
    color: var(--hrs-text-muted);
    margin-bottom: .5rem;
}
.hrs-hero__upload .hrs-uploader {
    border: none;
    padding: 0;
    margin: 0;
    width: auto;
}
.hrs-hero__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hrs-text-muted);
    font-size: 4rem;
}
.hrs-hero__status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    background: rgba(0,0,0,0.55);
    color: white;
    backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
[data-theme="light"] .hrs-hero__status {
    background: rgba(255,255,255,0.85);
    color: #333;
}
.hrs-hero__status--active { background: rgba(76,175,80,0.35); }
.hrs-hero__status--sold { background: rgba(240,160,32,0.35); }
.hrs-hero__status--retired { background: rgba(140,140,140,0.45); }
.hrs-hero__status--deceased {
    background: rgba(60,60,60,0.55);
    color: rgba(255,255,255,0.75);
}
.hrs-hero__status-cross {
    font-size: 1em;
    opacity: .9;
}

.hrs-hero-caption {
    margin-bottom: 1.5rem;
}
.hrs-hero-caption__name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    line-height: 1.15;
}
.hrs-hero-caption__birth {
    color: var(--hrs-text-muted);
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* ─── Overview-Tab sections ──────────────────────────────────────────────── */
.hrs-overview { display: flex; flex-direction: column; gap: 1.5rem; }
.hrs-overview__description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    white-space: pre-wrap;
}
[data-theme="light"] .hrs-overview__description { color: rgba(0,0,0,0.78); }
.hrs-meta-chips {
    color: var(--hrs-text-muted);
    font-size: .9rem;
    line-height: 1.6;
}
.hrs-meta-chips__sep {
    margin: 0 .5rem;
    opacity: .55;
}
.hrs-overview-section { }
.hrs-overview-section__title {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--hrs-text-muted);
    margin: 0 0 .5rem;
    font-weight: 600;
}
.hrs-overview-section__link {
    margin-left: .5rem;
    font-size: .8rem;
    color: var(--hrs-accent);
    text-decoration: none;
}
.hrs-overview-section__link:hover { text-decoration: underline; }
.hrs-goals-preview { display: flex; flex-direction: column; gap: .35rem; }
.hrs-goal-preview {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
[data-theme="light"] .hrs-goal-preview { background: rgba(0,0,0,0.03); }
.hrs-access-preview {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.hrs-access-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
}
[data-theme="light"] .hrs-access-avatar { background: rgba(0,0,0,0.08); }

/* ─── Discipline pills ─────────────────────────────────────────────────────
   Each discipline carries its own --pill-bg / --pill-fg / --pill-border
   custom properties. Dark theme defaults below; [data-theme="light"] overrides
   restore readability on bright backgrounds.
*/
.hrs-disc-editor { display: flex; flex-direction: column; gap: .75rem; }
.hrs-disc-editor__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hrs-disc-editor__header h3 { margin: 0; font-size: 1rem; }
.hrs-disc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}
.hrs-disc-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
    line-height: 1.2;
    background: var(--pill-bg, rgba(255,255,255,0.1));
    color: var(--pill-fg, currentColor);
    border: 1px solid var(--pill-border, transparent);
}
.hrs-disc-pill--primary {
    box-shadow: 0 0 0 2px var(--pill-fg, var(--hrs-accent));
    font-weight: 600;
}
.hrs-disc-pill__star { font-size: .7em; }
.hrs-disc-pill__sep { opacity: .5; }
.hrs-disc-pill__level { font-weight: 500; }
.hrs-disc-pill__remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0 .15rem;
    margin-left: .2rem;
    opacity: .6;
    font-size: 1em;
}
.hrs-disc-pill__remove:hover { opacity: 1; }
.hrs-disc-make-primary {
    padding: .2rem .4rem !important;
}

/* Dark-theme palette (default — matches data-theme="dark") */
.hrs-disc-pill--dressage     { --pill-bg: rgba(214,180,128,0.18); --pill-fg: #e6c896; }
.hrs-disc-pill--showjumping  { --pill-bg: rgba(220,60,60,0.22);   --pill-fg: #ee8a8c; }
.hrs-disc-pill--eventing     { --pill-bg: rgba(76,175,80,0.20);   --pill-fg: #8fd793; }
.hrs-disc-pill--western      { --pill-bg: rgba(150,100,60,0.25);  --pill-fg: #d6a878; }
.hrs-disc-pill--working-equitation { --pill-bg: rgba(140,150,80,0.22); --pill-fg: #c5d486; }
.hrs-disc-pill--gaited       { --pill-bg: rgba(240,200,80,0.18);  --pill-fg: #f5d77a; }
.hrs-disc-pill--driving      { --pill-bg: rgba(160,160,170,0.18); --pill-fg: #c0c0c8; }
.hrs-disc-pill--vaulting     { --pill-bg: rgba(220,80,160,0.20);  --pill-fg: #ec9bc7; }
.hrs-disc-pill--endurance    { --pill-bg: rgba(64,180,180,0.22);  --pill-fg: #82dcdc; }
.hrs-disc-pill--reining      { --pill-bg: rgba(140,40,60,0.25);   --pill-fg: #e183a0; }
.hrs-disc-pill--other        { --pill-bg: rgba(255,255,255,0.10); --pill-fg: #c0c0c0; }

/* Light-theme palette — applied when <html data-theme="light">.
   Lighter, less saturated backgrounds + darker, higher-contrast text. */
[data-theme="light"] .hrs-disc-pill--dressage     { --pill-bg: rgba(180,140,80,0.14);  --pill-fg: #7a5829; }
[data-theme="light"] .hrs-disc-pill--showjumping  { --pill-bg: rgba(200,40,40,0.10);   --pill-fg: #a82828; }
[data-theme="light"] .hrs-disc-pill--eventing     { --pill-bg: rgba(58,128,62,0.12);   --pill-fg: #2d6a30; }
[data-theme="light"] .hrs-disc-pill--western      { --pill-bg: rgba(120,75,40,0.12);   --pill-fg: #6b4520; }
[data-theme="light"] .hrs-disc-pill--working-equitation { --pill-bg: rgba(110,120,60,0.12); --pill-fg: #525a26; }
[data-theme="light"] .hrs-disc-pill--gaited       { --pill-bg: rgba(180,140,40,0.14);  --pill-fg: #806020; }
[data-theme="light"] .hrs-disc-pill--driving      { --pill-bg: rgba(100,100,110,0.10); --pill-fg: #4a4a55; }
[data-theme="light"] .hrs-disc-pill--vaulting     { --pill-bg: rgba(180,50,130,0.10);  --pill-fg: #983364; }
[data-theme="light"] .hrs-disc-pill--endurance    { --pill-bg: rgba(40,140,140,0.10);  --pill-fg: #1d6c6c; }
[data-theme="light"] .hrs-disc-pill--reining      { --pill-bg: rgba(120,30,50,0.12);   --pill-fg: #8c2238; }
[data-theme="light"] .hrs-disc-pill--other        { --pill-bg: rgba(0,0,0,0.06);       --pill-fg: #555555; }

.hrs-disc-add {
    padding: .75rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
[data-theme="light"] .hrs-disc-add { background: rgba(0,0,0,0.03); }
.hrs-disc-add__row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.hrs-disc-add__primary {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .9rem;
}
.hrs-disc-add__actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

/* Picker */
.hrs-picker { display: flex; flex-direction: column; gap: .25rem; }
.hrs-picker__label { font-size: .85rem; color: var(--hrs-text-muted); }
.hrs-picker__select {
    padding: .55rem .75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--hrs-border);
    border-radius: 8px;
    color: inherit;
    font: inherit;
}
.hrs-picker__hint { font-size: .75rem; color: var(--hrs-text-muted); }
.hrs-picker__hint--warn { color: var(--hrs-warning); }
