/* =========================================================================
   easyMember — Public Activity Pages
   /public/activities (index) + /public/activities/{uuid} (detalj)

   Optimerade för social sharing, mejl-länkar och QR-koder.
   ========================================================================= */

:root {
    --em-pub-radius: 14px;
    --em-pub-radius-lg: 20px;
    --em-pub-text: #1f2937;
    --em-pub-muted: #6b7280;
    --em-pub-bg: #f7f8fb;
    --em-pub-surface: #ffffff;
    --em-pub-border: #e5e7eb;
    --em-pub-accent: var(--em-accent, #2f55d4);
    --em-pub-accent-soft: rgba(47, 85, 212, 0.08);
    --em-pub-success: #16a34a;
    --em-pub-warning: #d97706;
    --em-pub-danger: #dc2626;
}

.em-pub-body {
    background: var(--em-pub-bg);
    color: var(--em-pub-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Topbar & footer ---------------------------------------------------- */

.em-pub-topbar {
    background: var(--em-pub-surface);
    border-bottom: 1px solid var(--em-pub-border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.em-pub-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.em-pub-brand img { height: 36px; width: auto; }
.em-pub-brand-text { font-weight: 700; font-size: 1.05rem; color: var(--em-pub-text); text-decoration: none; }
.em-pub-brand { text-decoration: none; }
.em-pub-topbar-nav {
    display: flex;
    gap: 20px;
}
.em-pub-topbar-link {
    color: var(--em-pub-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color .15s;
}
.em-pub-topbar-link:hover { color: var(--em-pub-accent); }

.em-pub-footer {
    margin-top: auto;
    padding: 28px 0;
    background: var(--em-pub-surface);
    border-top: 1px solid var(--em-pub-border);
    color: var(--em-pub-muted);
    font-size: 0.85rem;
}
.em-pub-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.em-pub-footer-link { color: var(--em-pub-muted); text-decoration: none; }
.em-pub-footer-link:hover { color: var(--em-pub-accent); }

/* =========================================================================
   PUBLIK INDEX-LISTA (/public/activities)
   ========================================================================= */

.em-publist-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 48px 24px 56px;
    text-align: center;
}
.em-publist-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}
.em-publist-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 12px;
    color: white;
}
.em-publist-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.em-publist-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 56px;
}

.em-publist-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    /* auto-fill ger fasta kortstorlekar oavsett antal — ett ensamt kort
       blir t.ex. ~320px brett istället för att sträckas över hela bredden. */
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 20px;
    justify-content: start;
}

.em-publist-card-wrap { display: flex; }
.em-publist-card {
    display: flex;
    flex-direction: column;
    background: var(--em-pub-surface);
    border-radius: var(--em-pub-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    width: 100%;
    transition: transform .15s, box-shadow .15s;
}
.em-publist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    color: inherit;
    text-decoration: none;
}
.em-publist-card:focus-visible {
    outline: 3px solid var(--em-pub-accent);
    outline-offset: 2px;
}

.em-publist-card-cover {
    position: relative;
    height: 180px;
    background: #f3f4f6;
    overflow: hidden;
}
.em-publist-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.em-publist-card-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(0,0,0,0.15);
    font-size: 3.5rem;
}
.em-publist-card-date {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    min-width: 56px;
}
.em-publist-card-date-day {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--em-pub-text);
}
.em-publist-card-date-month {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--em-pub-muted);
    margin-top: 2px;
}
.em-publist-card-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}
.em-publist-card-overlay--full {
    background: rgba(220, 38, 38, 0.92);
    color: white;
}
.em-publist-card-overlay--soon {
    background: rgba(245, 158, 11, 0.92);
    color: #422006;
}

.em-publist-card-body {
    padding: 18px 18px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.em-publist-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
    color: var(--em-pub-text);
}
.em-publist-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--em-pub-muted);
    font-size: 0.825rem;
    margin-bottom: 10px;
}
.em-publist-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.em-publist-card-meta i {
    opacity: 0.7;
}
.em-publist-card-desc {
    color: var(--em-pub-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.em-publist-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--em-pub-border);
}
.em-publist-card-price {
    font-weight: 700;
    color: var(--em-pub-text);
}
.em-publist-card-seats {
    font-size: 0.78rem;
    color: var(--em-pub-success);
    font-weight: 500;
}

.em-publist-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--em-pub-muted);
}
.em-publist-empty i {
    font-size: 3.5rem;
    color: rgba(0,0,0,0.15);
    margin-bottom: 20px;
}
.em-publist-empty h2 {
    color: var(--em-pub-text);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.em-publist-empty p {
    margin: 0;
}

/* =========================================================================
   PUBLIK DETALJSIDA (/public/activities/{uuid})
   ========================================================================= */

.em-pubact-breadcrumb {
    background: var(--em-pub-surface);
    border-bottom: 1px solid var(--em-pub-border);
    padding: 12px 0;
}
.em-pubact-breadcrumb a {
    color: var(--em-pub-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}
.em-pubact-breadcrumb a:hover {
    color: var(--em-pub-accent);
}

/* --- Hero -------------------------------------------------------------- */

.em-pubact-hero {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}
.em-pubact-hero--has-cover { background: #1f2937; }
.em-pubact-hero-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: saturate(1.1);
}
.em-pubact-hero-tint {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
}
.em-pubact-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 56px 24px 40px;
}
.em-pubact-hero-eyebrow {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.88;
    margin-bottom: 10px;
    text-transform: capitalize;
}
.em-pubact-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 18px;
    color: white;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.em-pubact-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.em-pubact-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: white;
}
.em-pubact-hero-pill i { opacity: 0.85; }
.em-pubact-hero-pill--price {
    background: rgba(255,255,255,0.95);
    color: var(--em-pub-text);
}

/* --- Layout ------------------------------------------------------------ */

.em-pubact-container {
    max-width: 1200px;
    margin: -32px auto 0;
    padding: 0 24px 56px;
    position: relative;
    z-index: 3;
}

/* --- Section card ------------------------------------------------------ */

.em-pubact-section {
    background: var(--em-pub-surface);
    border: 1px solid var(--em-pub-border);
    border-radius: var(--em-pub-radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.em-pubact-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--em-pub-text);
    margin: 0 0 16px;
}
.em-pubact-section-title i { color: var(--em-pub-accent); }
.em-pubact-section-body {
    color: #374151;
    line-height: 1.65;
}

/* --- Tillval lista ----------------------------------------------------- */

.em-pubact-addon-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.em-pubact-addon {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--em-pub-border);
}
.em-pubact-addon:last-child { border-bottom: none; }
.em-pubact-addon-main { flex: 1; }
.em-pubact-addon-name {
    font-weight: 600;
    color: var(--em-pub-text);
    margin-bottom: 4px;
}
.em-pubact-addon-req {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(217, 119, 6, 0.12);
    color: var(--em-pub-warning);
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
}
.em-pubact-addon-desc {
    font-size: 0.88rem;
    color: var(--em-pub-muted);
}
.em-pubact-addon-price {
    font-weight: 700;
    color: var(--em-pub-text);
    white-space: nowrap;
}

/* --- Karta ------------------------------------------------------------- */

.em-pubact-map {
    border-radius: var(--em-pub-radius);
    overflow: hidden;
    border: 1px solid var(--em-pub-border);
}
.em-pubact-maps-link {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    color: var(--em-pub-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.em-pubact-maps-link:hover { text-decoration: underline; }

/* --- CTA-box ----------------------------------------------------------- */

.em-pubact-cta {
    background: var(--em-pub-surface);
    border: 1px solid var(--em-pub-border);
    border-radius: var(--em-pub-radius);
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    position: sticky;
    top: 88px;
}
.em-pubact-cta-seats {
    text-align: center;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--em-pub-accent-soft);
    border-radius: 12px;
}
.em-pubact-cta-seats-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--em-pub-accent);
    line-height: 1;
}
.em-pubact-cta-seats-label {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--em-pub-muted);
    font-weight: 500;
}
.em-pubact-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    background: var(--em-pub-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform .12s, box-shadow .15s;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(47, 85, 212, 0.25);
}
.em-pubact-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(47, 85, 212, 0.35);
    color: white;
}
.em-pubact-cta-foot {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--em-pub-muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 0;
}
.em-pubact-cta-foot a {
    color: var(--em-pub-accent);
    text-decoration: none;
    font-weight: 500;
}
.em-pubact-cta-deadline {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--em-pub-warning);
    border-radius: 6px;
    font-size: 0.82rem;
    color: #92400e;
}
.em-pubact-cta-status {
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}
.em-pubact-cta-status--info { background: rgba(59, 130, 246, 0.12); color: #1e40af; }
.em-pubact-cta-status--danger { background: rgba(220, 38, 38, 0.12); color: var(--em-pub-danger); }
.em-pubact-cta-status--warning { background: rgba(245, 158, 11, 0.12); color: #92400e; }
.em-pubact-cta-status--neutral { background: #f3f4f6; color: #4b5563; }

/* --- Share-knappar ----------------------------------------------------- */

.em-pubact-share {
    background: var(--em-pub-surface);
    border: 1px solid var(--em-pub-border);
    border-radius: var(--em-pub-radius);
    padding: 20px;
    margin-top: 16px;
    text-align: center;
}
.em-pubact-share-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--em-pub-muted);
    margin-bottom: 12px;
}
.em-pubact-share-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.em-pubact-share-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: var(--em-pub-text);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
    font-size: 0.95rem;
}
.em-pubact-share-btn:hover { transform: translateY(-2px); }
.em-pubact-share-btn--fb:hover   { background: #1877f2; color: white; }
.em-pubact-share-btn--tw:hover   { background: #000;     color: white; }
.em-pubact-share-btn--li:hover   { background: #0a66c2; color: white; }
.em-pubact-share-btn--mail:hover { background: var(--em-pub-accent); color: white; }
.em-pubact-share-btn--copy:hover { background: var(--em-pub-text);   color: white; }

/* --- Responsiv --------------------------------------------------------- */

@media (max-width: 991.98px) {
    .em-pubact-cta { position: static; margin-top: 24px; }
}
@media (max-width: 575.98px) {
    .em-pubact-hero-inner { padding: 40px 20px 32px; }
    .em-pubact-section { padding: 20px 18px; }
    .em-pubact-container { padding: 0 16px 40px; }
    .em-publist-grid { grid-template-columns: 1fr; gap: 16px; }
    .em-publist-hero { padding: 40px 20px 36px; }
    .em-publist-container { padding: 0 16px 40px; }
}
