.mtm-events {
    display: grid;
    grid-template-columns: repeat(var(--mtm-columns, 3), minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
}

.mtm-events-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: clamp(16px, 4vw, 72px);
    padding-right: clamp(16px, 4vw, 72px);
}

.mtm-event {
    border: 1px solid #d8dde4;
    border-radius: 8px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.mtm-event-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #e5e7eb;
    overflow: hidden;
}

.mtm-event-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-weight: 700;
}

.mtm-slide {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.mtm-slide.is-active {
    display: block;
}

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

.mtm-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 42px;
    border: 0;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.mtm-prev {
    left: 8px;
}

.mtm-next {
    right: 8px;
}

.mtm-event-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.mtm-event-body h2 {
    margin-top: 0;
}

.mtm-date {
    color: #475569;
    font-weight: 700;
}

.mtm-location,
.mtm-address {
    margin: 0 0 10px;
}

.mtm-description {
    flex: 1;
}

.mtm-description details {
    margin-top: 8px;
}

.mtm-description summary {
    cursor: pointer;
    font-weight: 700;
}

.mtm-card-actions {
    margin-top: 18px;
}

.mtm-events-section {
    width: 100%;
    margin-top: 42px;
}

.mtm-events-heading {
    margin: 0 0 18px;
}

.mtm-event.is-past {
    background: #f8fafc;
}

.mtm-recap-title {
    margin: 12px 0 8px;
    font-size: 1.05em;
}

.mtm-event-state {
    margin: 18px 0 0;
    color: #64748b;
    font-weight: 700;
}

body .mtm-lightbox {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 2147483647 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 24px;
    background: rgba(15, 23, 42, 0.86);
    box-sizing: border-box;
}

body .mtm-lightbox[hidden] {
    display: none;
}

body .mtm-lightbox img {
    max-width: min(1100px, 96vw);
    max-height: 88vh;
    object-fit: contain;
    background: #fff;
}

body .mtm-lightbox button {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

body.mtm-lightbox-open {
    overflow: hidden;
}

.mtm-form,
.mtm-scanner,
.mtm-scanner-login {
    max-width: 920px;
}

.mtm-registration-wrap {
    width: 100%;
    max-width: 920px;
}

.mtm-registration-wrap .mtm-form {
    max-width: none;
}

.mtm-back-link {
    margin: 0 0 28px;
}

.mtm-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px 18px;
}

.mtm-form label,
.mtm-scanner label,
.mtm-scanner-login label {
    display: block;
    margin-bottom: 14px;
    font-weight: 700;
}

.mtm-form input,
.mtm-form select,
.mtm-scanner input,
.mtm-scanner-login input[type="text"],
.mtm-scanner-login input[type="password"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
}

.mtm-scanner-login {
    padding: 22px;
    border: 1px solid #d8dde4;
    border-radius: 8px;
    background: #fff;
}

.mtm-scanner-login .login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.mtm-scanner-login .login-remember input {
    width: auto;
    margin: 0;
}

.mtm-scanner-login .button,
.mtm-scanner-login input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: #1f3a5f;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.mtm-ticket-row {
    display: grid;
    grid-template-columns: 1fr 1fr 42px;
    gap: 12px;
    align-items: end;
    margin-bottom: 10px;
}

.mtm-remove-ticket {
    height: 42px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 22px;
}

.mtm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: #1f3a5f;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.mtm-secondary {
    background: #475569;
}

.mtm-consent {
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.mtm-consent input {
    display: inline-block;
    width: auto;
    margin: 0 8px 0 0;
}

.mtm-message {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-left: 4px solid #15803d;
    background: #f0fdf4;
}

#mtm-reader {
    max-width: 520px;
    min-height: 280px;
    margin-bottom: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.mtm-scan-result {
    margin-top: 18px;
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.mtm-scan-result.is-pending {
    border-color: #475569;
    background: #f8fafc;
}

.mtm-scan-result.is-success {
    border-color: #15803d;
    background: #f0fdf4;
}

.mtm-scan-result.is-error {
    border-color: #b91c1c;
    background: #fef2f2;
}

.mtm-scan-result dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 14px;
    margin: 12px 0 0;
}

.mtm-scan-result dt {
    font-weight: 700;
}

.mtm-scan-result dd {
    margin: 0;
}

.mtm-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.82);
    box-sizing: border-box;
}

.mtm-scan-modal[hidden] {
    display: none;
}

.mtm-scan-modal-card {
    width: min(620px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 26px;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.mtm-scan-modal.is-success .mtm-scan-modal-card {
    border-top: 10px solid #15803d;
}

.mtm-scan-modal.is-error .mtm-scan-modal-card {
    border-top: 10px solid #b91c1c;
}

.mtm-scan-modal-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 18px;
}

.mtm-scan-modal-card dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 14px;
    margin: 0 0 22px;
    font-size: 18px;
}

.mtm-scan-modal-card dt {
    font-weight: 700;
}

.mtm-scan-modal-card dd {
    margin: 0;
}

.mtm-scan-modal-card .mtm-button {
    width: 100%;
    min-height: 56px;
    font-size: 20px;
}

body.mtm-scan-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .mtm-events {
        grid-template-columns: 1fr;
    }

    .mtm-events-full {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mtm-fields,
    .mtm-ticket-row {
        grid-template-columns: 1fr;
    }

    .mtm-remove-ticket {
        width: 42px;
    }

    .mtm-scan-modal-card {
        padding: 22px;
    }

    .mtm-scan-modal-card strong {
        font-size: 24px;
    }

    .mtm-scan-modal-card dl {
        grid-template-columns: 1fr;
        gap: 4px;
        font-size: 17px;
    }
}
