/* Shared by the shop app and the backoffice (EventCardView.razor). --event-color: the event's colour ("#RRGGBB"), set inline on the card. Same look and sizes as the
   "Os meus espaços" cards (SpaceCard.razor.css): 24px corners, the colour glowing inside the card from the bottom edge
   up (nothing outside the card) and the small frosted button. */

.event-card {
    --event-color: var(--color-primary, #17189B);
    position: relative;
    isolation: isolate;
    border-radius: 24px;
}

.event-card__surface {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 260px;
    border-radius: inherit;
    background-color: var(--event-color);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--event-color) 30%, transparent),
        0 10px 22px -16px rgba(15, 16, 60, 0.45);
    isolation: isolate;
}

.event-card--plain .event-card__surface {
    background-image:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--color-accent, #E8BC33) 30%, transparent), transparent 50%),
        linear-gradient(160deg, color-mix(in srgb, var(--event-color) 82%, white) 0%, var(--event-color) 55%, color-mix(in srgb, var(--event-color) 70%, black) 100%);
}

/* The banner fills the card, cropped. */
.event-card__banner {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scrim and inner glow: the photo darkens towards the bottom in the event's colour, which rises, blurred, from the
   bottom edge inside the card, so the title and the description read. */
.event-card--banner .event-card__surface::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--event-color) 10%, transparent) 0%,
        color-mix(in srgb, color-mix(in srgb, var(--event-color) 60%, black) 60%, transparent) 45%,
        color-mix(in srgb, color-mix(in srgb, var(--event-color) 55%, black) 95%, transparent) 100%);
    box-shadow: inset 0 -48px 64px -16px color-mix(in srgb, var(--event-color) 85%, black);
    pointer-events: none;
}

.event-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
    color: var(--color-on-primary, #fff);
}

.event-card__dates {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    font: 700 13px/1.2 var(--font-sans, "Inter", "Segoe UI", system-ui, sans-serif);
    letter-spacing: 0.02em;
    color: var(--color-accent, #E8BC33);
    text-shadow: 0 1px 10px color-mix(in srgb, var(--event-color) 40%, black);
}

.event-card__dates svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.event-card__title {
    margin: 0;
    font: 800 24px/1.12 var(--font-sans, "Inter", "Segoe UI", system-ui, sans-serif);
    letter-spacing: -0.02em;
    color: var(--color-on-primary, #fff);
    text-shadow: 0 1px 12px color-mix(in srgb, var(--event-color) 40%, black);
}

.event-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    font: 500 14px/1.45 var(--font-sans, "Inter", "Segoe UI", system-ui, sans-serif);
    color: color-mix(in srgb, var(--color-on-primary, #fff) 86%, transparent);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: pre-line;
}

.event-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    margin-top: 16px;
    padding: 0 18px;
    border: 1px solid color-mix(in srgb, var(--color-on-primary, #fff) 45%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--color-on-primary, #fff) 18%, transparent);
    color: var(--color-on-primary, #fff);
    font: 800 15px/1 var(--font-sans, "Inter", "Segoe UI", system-ui, sans-serif);
    white-space: nowrap;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 150ms ease, transform 120ms ease;
}

.event-card__btn:hover {
    background: color-mix(in srgb, var(--color-on-primary, #fff) 28%, transparent);
}

.event-card__btn:active {
    transform: translateY(1px);
}

.event-card__btn:focus-visible {
    outline: 2px solid var(--color-on-primary, #fff);
    outline-offset: 3px;
}

.event-card__btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* The yellow tick marks the state. */
.event-card__done {
    cursor: default;
}

.event-card__done svg {
    color: var(--color-accent, #E8BC33);
    stroke-width: 2.4;
}

/* Preview (backoffice): nothing to press. */
.event-card--preview .event-card__btn {
    pointer-events: none;
}
