/**
 * Honk Eventkalender - Frontend Stylesheet (Phase 2)
 * Minimalistisches, theme-unabhängiges Design für Event-Cards & Pagination
 */

:root {
    --hnk-event-bg: #fbfbfb;
    --hnk-event-border: #e2e8f0;
    --hnk-event-radius: 8px;
    --hnk-text-main: #1e293b;
    --hnk-text-muted: #64748b;
    --hnk-text-accent: #0f172a;
    --hnk-link-color: #2563eb;
    --hnk-link-hover: #1d4ed8;
}

/* Wrapper & Grundaufbau */
.hnk-archive-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--hnk-text-main);
}

.hnk-archive-header {
    margin-bottom: 2rem;
    text-align: left;
}

.hnk-archive-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    color: var(--hnk-text-accent);
}

/* Container mit Live-Region & Ladezustand */
.hnk-events-container {
    position: relative;
    outline: none;
    min-height: 200px;
}

.hnk-events-container.is-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Responsive Grid für Cards */
.hnk-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .hnk-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hnk-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Einzelne Event-Card */
.hnk-card {
    background-color: var(--hnk-event-bg);
    border: 1px solid var(--hnk-event-border);
    border-radius: var(--hnk-event-radius);
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: none; /* Verbindlich keine Schatten */
    transition: border-color 0.2s ease;
}

.hnk-card:hover {
    border-color: #cbd5e1;
}

.hnk-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Datum bzw. Datumszeitraum */
.hnk-card-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hnk-text-muted);
    text-transform: none;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

/* Veranstaltungsname (Hervorgehobene Überschrift) */
.hnk-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--hnk-text-accent);
    margin: 0 0 0.5rem 0;
    padding: 0;
}

/* Veranstalter */
.hnk-card-organizer {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hnk-text-muted);
    margin-bottom: 0.5rem;
}

/* Uhrzeit */
.hnk-card-time {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hnk-text-main);
    margin-bottom: 0.5rem;
}

/* Location Name */
.hnk-card-location {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hnk-text-main);
    margin-bottom: 0.25rem;
}

/* Adresse & Google Maps Link */
.hnk-card-address {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--hnk-text-muted);
    margin-bottom: 0.75rem;
}

.hnk-card-map-link {
    color: var(--hnk-link-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
    transition: color 0.15s ease;
}

.hnk-card-map-link:hover,
.hnk-card-map-link:focus {
    color: var(--hnk-link-hover);
    text-decoration: underline;
}

/* Kurzbeschreibung */
.hnk-card-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--hnk-text-main);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--hnk-event-border);
    word-break: break-word;
}

/* Leere Veranstaltungsübersicht (Empty State) */
.hnk-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    background-color: var(--hnk-event-bg);
    border: 1px dashed var(--hnk-event-border);
    border-radius: var(--hnk-event-radius);
    margin: 2rem 0;
}

.hnk-empty-state-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--hnk-text-muted);
    margin: 0;
}

/* Pagination: ← 1 - 2 - 3 - … - 5 → */
.hnk-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0 1.5rem 0;
}

.hnk-pagination-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.hnk-pagination-item {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.hnk-pagination-separator {
    color: var(--hnk-text-muted);
    font-size: 0.95rem;
    user-select: none;
}

.hnk-pagination-dots {
    color: var(--hnk-text-muted);
    padding: 0 0.25rem;
    user-select: none;
}

.hnk-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--hnk-text-main);
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.hnk-pagination-link:hover:not(.is-disabled):not(.is-active) {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--hnk-link-hover);
}

.hnk-pagination-link.is-active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--hnk-text-accent);
    cursor: default;
}

.hnk-pagination-link.is-disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
}

.hnk-pagination-prev,
.hnk-pagination-next {
    font-size: 1.1rem;
    line-height: 1;
}

/* Ladeanzeige & Fehleralert */
.hnk-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hnk-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--hnk-text-accent);
    animation: hnk-spin 0.8s linear infinite;
}

@keyframes hnk-spin {
    to {
        transform: rotate(360deg);
    }
}

.hnk-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hnk-alert {
    padding: 1rem;
    border-radius: var(--hnk-event-radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hnk-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
