/*
 * SPDX-License-Identifier: AGPL-3.0-only WITH LicenseRef-Pretalx-AGPL-3.0-Terms
 * Public events listing — card grid styles
 */

.event-list-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}


.event-list-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.event-list-home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d8e3ea;
    border-radius: 999px;
    background: #ffffff;
    color: #1f6f5b;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.event-list-home-button:hover {
    background: #f7fbff;
    color: #155f4e;
    text-decoration: none;
}

.event-list-home-button-primary {
    border-color: #1f8f78;
    background: linear-gradient(135deg, #156456, #4b9af0);
    color: #ffffff;
}

.event-list-home-button-primary:hover {
    background: linear-gradient(135deg, #125749, #3b82d6);
    color: #ffffff;
}

.event-list-hero {
    text-align: center;
    margin-bottom: 36px;
}

.event-list-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

.event-list-hero p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}


.event-list-search {
    max-width: 860px;
    margin: -14px auto 34px;
    padding: 12px;
    border: 1px solid rgba(31, 143, 120, 0.18);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 250, 247, 0.96));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.event-list-search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    border: 1px solid #dce8ef;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.event-list-search-box::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    pointer-events: none;
    border: 1px solid rgba(31, 143, 120, 0.08);
}

.event-list-search-box i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf8f4;
    color: #1f8f78;
    font-size: 0.95rem;
    pointer-events: none;
}

.event-list-search-box input {
    width: 100%;
    min-height: 58px;
    padding: 12px 26px 12px 68px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #152033;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
}

.event-list-search-box input::placeholder {
    color: #8795a8;
    font-weight: 600;
}

.event-list-search:focus-within {
    border-color: rgba(31, 143, 120, 0.36);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08), 0 0 0 4px rgba(31, 143, 120, 0.10);
}

.event-list-search-hint {
    margin: 9px 20px 0;
    color: #6d7b8e;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
}

.event-search-empty {
    max-width: 860px;
    margin: 0 auto 28px;
    padding: 18px 22px;
    border: 1px dashed #b9ccd6;
    border-radius: 18px;
    background: #ffffff;
    color: #5b6b80;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.event-card[hidden],
.event-list-section[hidden],
.event-search-empty[hidden] {
    display: none !important;
}

.event-list-section {
    margin-top: 36px;
}

.event-list-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.event-list-section-title .badge {
    background: #6366f1;
    color: #fff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.event-list-section-title.upcoming .badge { background: #3b82f6; }
.event-list-section-title.current .badge { background: #10b981; }

.event-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .event-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .event-card-grid { grid-template-columns: 1fr; }
    .event-list-page { padding: 20px 14px 40px; }
}

.event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06),
                0 4px 12px rgba(15, 23, 42, 0.04);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid #eef2f7;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10),
                0 2px 6px rgba(15, 23, 42, 0.06);
    text-decoration: none !important;
    color: inherit;
}

.event-card-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none !important;
}

.event-card-main:hover {
    color: inherit;
    text-decoration: none !important;
}

.event-card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.event-card:hover .event-card-poster img {
    transform: scale(1.04);
}

.event-card-status {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.event-card-status.upcoming { background: rgba(59, 130, 246, 0.95); }
.event-card-status.cfp-closed { background: rgba(107, 114, 128, 0.92); }
.event-card-status.cfp-not-open { background: rgba(245, 158, 11, 0.95); }

.event-card-review-count {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.94);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(120, 53, 15, 0.24);
    backdrop-filter: blur(6px);
}

.event-card-review-count strong {
    font-size: 0.9rem;
    font-weight: 900;
}

.event-card-review-count.is-empty {
    background: rgba(55, 65, 81, 0.82);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.18);
}

.event-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.event-card-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.45;
    margin: 0;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #eef2f7;
}

.event-card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 0.88rem;
}

.event-card-meta-row .label {
    color: #9ca3af;
    flex-shrink: 0;
}

.event-card-meta-row .value {
    color: #374151;
    font-weight: 500;
}

.event-card-meta-row .value.deadline {
    color: #dc2626;
}

.event-card-meta-row i {
    width: 14px;
    color: #6366f1;
    flex-shrink: 0;
}

.event-card-meta-row i.fa-clock-o,
.event-card-meta-row i.fa-clock { color: #f59e0b; }

.event-list-empty {
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}

.event-list-empty i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 16px;
}


.event-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 16px 16px;
}

.event-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d8e3ea;
    border-radius: 10px;
    background: #ffffff;
    color: #276f63;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
}

.event-card-action:hover {
    background: #f8fafc;
    color: #155f4e;
    text-decoration: none !important;
}

.event-card-action.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #18a06f, #39a3d9);
    color: #ffffff;
}

.event-card-action.review {
    border-color: #f6c56d;
    background: #fff7ed;
    color: #b45309;
}

.event-card-action.manage {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.event-card-action.primary:hover,
.event-card-action.review:hover,
.event-card-action.manage:hover {
    filter: brightness(0.98);
}

@media (max-width: 480px) {
    .event-card-actions {
        grid-template-columns: 1fr;
    }
}

/* Event list search */
.event-list-search {
    max-width: 860px;
    margin: -14px auto 34px;
    padding: 12px;
    border: 1px solid rgba(31, 143, 120, 0.18);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 250, 247, 0.96));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.event-list-search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    border: 1px solid #dce8ef;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.event-list-search-box::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    pointer-events: none;
    border: 1px solid rgba(31, 143, 120, 0.08);
}

.event-list-search-box i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf8f4;
    color: #1f8f78;
    font-size: 0.95rem;
    pointer-events: none;
}

.event-list-search-box input {
    width: 100%;
    min-height: 58px;
    padding: 12px 26px 12px 68px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #152033;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
}

.event-list-search-box input::placeholder {
    color: #8795a8;
    font-weight: 600;
}

.event-list-search:focus-within {
    border-color: rgba(31, 143, 120, 0.36);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08), 0 0 0 4px rgba(31, 143, 120, 0.10);
}

.event-list-search-hint {
    margin: 9px 20px 0;
    color: #6d7b8e;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
}

.event-search-empty {
    max-width: 860px;
    margin: 0 auto 28px;
    padding: 18px 22px;
    border: 1px dashed #b9ccd6;
    border-radius: 18px;
    background: #ffffff;
    color: #5b6b80;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.event-card[hidden],
.event-list-section[hidden],
.event-search-empty[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .event-list-search {
        margin: -8px 0 28px;
        padding: 10px;
        border-radius: 18px;
    }

    .event-list-search-box,
    .event-list-search-box input {
        border-radius: 14px;
    }
}
