/* Portal Events — WordPress Plugin Styles */

:root {
    --portal-events-gap: 1.5rem;
    --portal-events-radius: 0.5rem;
    --portal-events-border: #e5e7eb;
    --portal-events-bg: #ffffff;
    --portal-events-text: #1f2937;
    --portal-events-muted: #6b7280;
    --portal-events-accent: #18181b;
    --portal-events-accent-text: #ffffff;
}

/* Layout */
.portal-events--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--portal-events-gap);
}

.portal-events--list {
    display: flex;
    flex-direction: column;
    gap: var(--portal-events-gap);
}

/* Card */
.portal-event {
    background: var(--portal-events-bg);
    border: 1px solid var(--portal-events-border);
    border-radius: var(--portal-events-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portal-events--list .portal-event {
    flex-direction: row;
}

/* Image */
.portal-event__image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.portal-events--list .portal-event__image {
    width: 240px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.portal-event__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.portal-event__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

/* Header */
.portal-event__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-event__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--portal-events-text);
    margin: 0;
    line-height: 1.3;
}

.portal-event__price {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--portal-events-accent);
    color: var(--portal-events-accent-text);
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
}

/* Categories */
.portal-event__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.portal-event__category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid var(--portal-events-border);
    color: var(--portal-events-muted);
    white-space: nowrap;
}

/* Category Key / Legend */
.portal-category-key {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: var(--portal-events-gap);
}

.portal-category-key__item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.portal-category-key__swatch {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 0.25rem;
    background: var(--portal-events-border);
    flex-shrink: 0;
}

.portal-category-key__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--portal-events-text);
}

/* Members Only Badge */
.portal-event__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.portal-event__image .portal-event__badge--members {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    z-index: 1;
    background: #000000;
    color: #ffffff;
}

.portal-event__body .portal-event__badge--members {
    background: #000000;
    color: #ffffff;
    align-self: flex-start;
}

/* Description */
.portal-event__description {
    font-size: 0.875rem;
    color: var(--portal-events-muted);
    margin: 0;
    line-height: 1.5;
}

/* Meta */
.portal-event__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.8125rem;
    color: var(--portal-events-muted);
}

.portal-event__spots--full {
    color: #dc2626;
    font-weight: 500;
}

/* Button */
.portal-event__btn {
    display: inline-block;
    margin-top: auto;
    padding: 0.625rem 1.25rem;
    background: var(--portal-events-accent);
    color: var(--portal-events-accent-text);
    text-align: center;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--portal-events-radius);
    transition: opacity 0.15s;
}

.portal-event__btn:hover {
    opacity: 0.85;
    color: var(--portal-events-accent-text);
    text-decoration: none;
}

/* Error / Empty */
.portal-events-error,
.portal-events-empty {
    padding: 2rem;
    text-align: center;
    color: var(--portal-events-muted);
    border: 1px solid var(--portal-events-border);
    border-radius: var(--portal-events-radius);
}

/* ── Date-block style ─────────────────────────── */

:root {
    --portal-events-date-bg: #FF8E00;
    --portal-events-date-text: #000000;
}

.portal-event--date-block {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.15s;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.portal-event--date-block:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    color: inherit;
    text-decoration: none;
}

/* Image area */
.portal-event__image-area {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

.portal-event__image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-event__image-placeholder {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
}

.portal-event__image-area .portal-event__badge--members {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    z-index: 1;
    background: #000000;
    color: #ffffff;
}

/* Info row: date block + details */
.portal-event__info {
    display: flex;
    align-items: stretch;
    min-height: 5.5rem;
    flex: 1;
}

.portal-event__date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--portal-events-date-bg);
    color: var(--portal-events-date-text);
    padding: 0.75rem 1rem;
    min-width: 5.5rem;
    flex-shrink: 0;
    align-self: stretch;
}

.portal-event__date-day {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.portal-event__date-month {
    font-size: 1.125rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Details */
.portal-event__details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.75rem 1.25rem;
    flex: 1;
    min-width: 0;
}

.portal-event--date-block .portal-event__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--portal-events-text);
    text-transform: uppercase;
    margin: 0;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.portal-event--date-block .portal-event__price-inline {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--portal-events-text);
    margin: 0;
}

.portal-event--date-block .portal-event__location {
    font-size: 0.875rem;
    color: var(--portal-events-muted);
    margin: 0;
}

.portal-event--date-block .portal-event__time {
    font-size: 0.875rem;
    color: var(--portal-events-muted);
    margin: 0;
}

/* ── Perks ─────────────────────────────────────── */

.portal-perks--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--portal-events-gap);
}

.portal-perks--list {
    display: flex;
    flex-direction: column;
    gap: var(--portal-events-gap);
}

.portal-perk {
    background: var(--portal-events-bg);
    border: 1px solid var(--portal-events-border);
    border-radius: var(--portal-events-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portal-perks--list .portal-perk {
    flex-direction: row;
}

.portal-perk__image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.portal-perks--list .portal-perk__image {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.portal-perk__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-perk__image .portal-perk__badge {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    z-index: 1;
}

.portal-perk__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
    background: #000000;
    color: #ffffff;
}

.portal-perk__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.portal-perk__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--portal-events-text);
    margin: 0;
    line-height: 1.3;
}

.portal-perk__description {
    font-size: 0.875rem;
    color: var(--portal-events-muted);
    line-height: 1.5;
}

.portal-perk__description a {
    color: var(--portal-events-accent);
    text-decoration: underline;
}

.portal-perk__link {
    display: inline-block;
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--portal-events-accent);
    text-decoration: none;
}

.portal-perk__link:hover {
    text-decoration: underline;
}

/* Error / Empty - perks */
.portal-perks-error,
.portal-perks-empty {
    padding: 2rem;
    text-align: center;
    color: var(--portal-events-muted);
    border: 1px solid var(--portal-events-border);
    border-radius: var(--portal-events-radius);
}

/* ── Shop ──────────────────────────────────────── */

.portal-shop--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--portal-events-gap);
}

.portal-shop--list {
    display: flex;
    flex-direction: column;
    gap: var(--portal-events-gap);
}

.portal-shop-product {
    background: var(--portal-events-bg);
    border: 1px solid var(--portal-events-border);
    border-radius: var(--portal-events-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portal-shop--list .portal-shop-product {
    flex-direction: row;
}

.portal-shop-product__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.portal-shop--list .portal-shop-product__image {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.portal-shop-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-shop-product__image .portal-shop-product__badge {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    z-index: 1;
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: var(--portal-events-accent);
    color: var(--portal-events-accent-text);
}

.portal-shop-product__badge--members {
    background: #000000;
    color: #ffffff;
}

.portal-shop-product__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
}

.portal-shop-product__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--portal-events-text);
    margin: 0;
    line-height: 1.3;
}

.portal-shop-product__price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--portal-events-text);
}

.portal-shop-product__description {
    font-size: 0.8125rem;
    color: var(--portal-events-muted);
    line-height: 1.5;
    margin: 0;
}

.portal-shop-product__stock {
    font-size: 0.75rem;
    color: #d97706;
    font-weight: 500;
}

.portal-shop-product__variants {
    font-size: 0.75rem;
    color: var(--portal-events-muted);
}

.portal-shop-product__btn {
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 1rem;
    background: var(--portal-events-accent);
    color: var(--portal-events-accent-text);
    text-align: center;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--portal-events-radius);
    transition: opacity 0.15s;
}

.portal-shop-product__btn:hover {
    opacity: 0.85;
    color: var(--portal-events-accent-text);
    text-decoration: none;
}

/* Error / Empty - shop */
.portal-shop-error,
.portal-shop-empty {
    padding: 2rem;
    text-align: center;
    color: var(--portal-events-muted);
    border: 1px solid var(--portal-events-border);
    border-radius: var(--portal-events-radius);
}

/* Responsive */
@media (max-width: 640px) {
    .portal-events--grid {
        grid-template-columns: 1fr;
    }

    .portal-events--list .portal-event {
        flex-direction: column;
    }

    .portal-events--list .portal-event__image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .portal-perks--grid {
        grid-template-columns: 1fr;
    }

    .portal-perks--list .portal-perk {
        flex-direction: column;
    }

    .portal-perks--list .portal-perk__image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .portal-shop--grid {
        grid-template-columns: 1fr;
    }

    .portal-shop--list .portal-shop-product {
        flex-direction: column;
    }

    .portal-shop--list .portal-shop-product__image {
        width: 100%;
        aspect-ratio: 1 / 1;
    }
}
