/* Importerer Google Font så vi kan brgue den i vores styles, ved brug af Googles import url */
@import url('https://fonts.googleapis.com/css2?family=Phetsarath:wght@400;700&family=TikTok+Sans:opsz,wght@12..36,300..900&display=swap');

body {
    font-family: 'TikTok Sans', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f5f7fb;
}

/* Centrerer alt indhold til midten af siden */
.auth-center {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px 16px;
}

.auth-card {
    width: 360px;
    max-width: calc(100% - 32px);
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(15,23,42,0.08);
    box-sizing: border-box;
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .auth-header h1 {
    margin: 0 0 6px 0;
    font-size: 20px;
    letter-spacing: -0.2px;
    color: #0f172a;
}

.auth-card .auth-header .subtitle {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-card .hint {
    display: block;
    margin-top: -6px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #6b7280;
}

 .auth-card label {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="tel"] {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.auth-card input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124,58,237,0.06);
}

.auth-card button {
    padding: 10px 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.auth-card button:hover {
    background: #1e4fdc;
}

/* Mindre footer under vores events (register/login link) */
.auth-footer {
    text-align: center;
    margin-top: 6px;
}
.auth-footer p {
    margin: 0;
    font-size: 13px;
    color: #475569;
}
.auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* Login error message: fjerner standard marginer, så det hele er lidt tættere */
#error-message.error, .error {
    margin: 0;
    font-size: 13px;
    color: #dc2626;
}

/* Events side styling */
.events-page {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    align-self: flex-start;
}

.events-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    font-size: 24px;
    margin: 0 0 20px 0;
    color: #0f172a;
}

/* Header med det lille ikon i styling */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header .user-badge {
    position: absolute;
    right: 0;
    top: 0;
    transform: translateY(-6px);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-badge .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: none;
    font-size: 18px;
}

.user-popup {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    color: #0f172a;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
    white-space: nowrap;
    font-size: 14px;
    z-index: 5;
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.user-popup .popup-name {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-popup .popup-email {
    color: #475569;
    font-weight: 500;
}

.user-popup .popup-phone {
    color: #475569;
    font-weight: 500;
    font-size: 13px;
    margin-top: 2px;
}

.user-badge:hover .user-popup,
.user-badge:focus .user-popup,
.user-badge:focus-within .user-popup {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Popup actions */
.popup-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.popup-action {
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e6eefc;
    font-size: 13px;
}

.popup-action.popup-logout {
    background: #fff1f2;
    color: #9f1239;
    border-color: #fee2e2;
}

/* Reduced motion: fjerner animationen */
@media (prefers-reduced-motion: reduce) {
    .user-popup { transition: none; transform: none; }
}

/* Mindre visuel rettelse, når man er på mobil: gør at popup er fuld bredde */
@media (max-width: 420px) {
    .user-popup {
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        transform: translateX(-10px);
        white-space: normal;
    }
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: stretch;
}

.event-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 170px;
    box-sizing: border-box;
    transition: transform 180ms ease, box-shadow 180ms ease;
    overflow: hidden;
}

/* Styling vedr. billedet som er til hvert event */
.event-cover {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px 12px 0 0;
    margin: -20px -20px 12px -20px;
}

.event-card .event-title {
    margin-top: 0.25rem;
}

.event-card:hover,
.event-card:focus {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15,23,42,0.12);
    cursor: pointer;
}

.event-card:focus {
    outline: 3px solid rgba(124,58,237,0.12);
    outline-offset: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .event-card { transition: none; transform: none; }
}

.event-title {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: #0f172a;
}

.event-desc {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-weight: 600;
    color: #111827;
}

.event-meta time {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.event-price {
    background: #eef2ff;
    color: #312e81;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
}

/* Styling til når siden bliver mindre i bredde, så det stadge ser godt ud */
@media (max-width: 820px) {
        .events-grid { grid-template-columns: 1fr; }
        .events-page { padding: 24px 12px; }
        .events-container { max-width: 720px; }
}

.event-sign-up {
    background-color: #22304f;
    color: #fff;
    border: none;
    padding: 0.5em 1.2em;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.event-sign-up:hover {
    background-color: #182239;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.logout-btn {
    display: block;
    margin-top: 10px;
    padding: 8px 12px;
    text-align: center;
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    text-decoration: none;
}
.logout-btn:hover {
    background: #c0392b;
}