/* OqtaneLibrary.TournamentLanding – layout i tråd med TTAdminLandingside */
.tts-module.tts-module--tournament-landing.tts-module--landing {
    max-width: var(--choose-hero-max-width, 100%);
    width: 100%;
    margin: 0.75rem auto 0;
    padding: 1rem 1rem 2rem;
    box-sizing: border-box;
    border-radius: 0.85rem;
    background: #e2e8f0;
    color: #202124;
}

.tournament-landing {
    width: 100%;
}

.tournament-landing__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tournament-landing__section {
    padding: 2rem 1rem;
}

.tournament-landing__section--muted {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

.tournament-landing__section--search {
    padding: 1.25rem 1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

.tournament-landing__section--primary {
    margin-bottom: 0.75rem;
}

.tournament-landing__section--collapsible {
    margin-top: 0.75rem;
}

.tournament-landing__section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.tournament-landing__section-summary::-webkit-details-marker {
    display: none;
}

.tournament-landing__section-summary::after {
    content: "▸";
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #64748b;
    transition: transform 0.15s ease;
}

.tournament-landing__section--collapsible[open] > .tournament-landing__section-summary::after {
    transform: rotate(90deg);
}

.tournament-landing__section-summary .tournament-landing__section-title {
    margin: 0;
}

.tournament-landing__section-count {
    margin-left: auto;
    margin-right: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.tournament-landing__section-body {
    margin-top: 1.25rem;
}

.tournament-landing__section-search {
    margin-bottom: 1rem;
}

.tournament-landing__section-header {
    margin-bottom: 1.5rem;
}

.tournament-landing__section-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.tournament-landing__section-lead {
    margin: 0;
    color: #475569;
    max-width: 48rem;
}

.tournament-landing__search-label {
    display: block;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.tournament-landing__search-input {
    display: block;
    width: 100%;
    max-width: 36rem;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-sizing: border-box;
}

.tournament-landing__search-input:focus {
    outline: none;
    border-color: var(--tts-accent, #673ab7);
    box-shadow: 0 0 0 3px var(--tts-accent-outline-hover-bg, rgba(103, 58, 183, 0.12));
}

.tournament-landing__search-input:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
}

.tournament-landing__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.tournament-landing__toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.tournament-landing__toolbar-label {
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.tournament-landing__toolbar-actions {
    margin-left: auto;
}

.tournament-landing__empty {
    margin: 0;
    color: #64748b;
}

.tournament-landing__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.tournament-landing__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 0.75rem rgba(15, 23, 42, 0.06);
    min-height: 100%;
    text-align: start;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tournament-landing__card-host {
    -webkit-touch-callout: none;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

.tournament-landing__card--selectable {
    cursor: pointer;
}

.tournament-landing__card--selectable:hover {
    border-color: var(--tts-accent, #673ab7);
    box-shadow: 0 0.35rem 0.85rem rgba(15, 23, 42, 0.1);
}

.tournament-landing__card--selectable:focus {
    outline: none;
}

.tournament-landing__card--selectable:focus-visible {
    box-shadow: 0 0 0 3px var(--tts-accent-outline-hover-bg, rgba(103, 58, 183, 0.2)), 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08);
}

.tournament-landing__section--muted .tournament-landing__card {
    background: #ffffff;
    box-shadow: 0 0.2rem 1rem rgba(15, 23, 42, 0.1);
}

.tournament-landing__card--selected {
    border-color: var(--tts-accent, #673ab7) !important;
    border-width: 2px;
    box-shadow: 0 0.25rem 0.65rem var(--tts-btn-primary-shadow, rgba(103, 58, 183, 0.18)) !important;
}

.tournament-landing__card--create {
    cursor: pointer;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-style: dashed;
    border-color: var(--tts-accent, #673ab7);
    background: #fafbff;
    min-height: 8rem;
}

.tournament-landing__card-create-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    flex: 1;
}

.tournament-landing__card-create-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    color: var(--tts-accent, #673ab7);
}

.tournament-landing__card-create-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.tournament-landing__card--create .tournament-landing__card-title {
    margin: 0;
}

.tournament-landing__card--create:hover {
    border-color: var(--tts-accent, #673ab7);
    background: #f5f3ff;
    box-shadow: 0 0.35rem 0.85rem rgba(15, 23, 42, 0.1);
}

.tournament-landing__card--create:focus-visible {
    box-shadow: 0 0 0 3px var(--tts-accent-outline-hover-bg, rgba(103, 58, 183, 0.2)), 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08);
}

.tournament-landing__card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    align-items: center;
}

.tournament-landing__registration-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s ease;
    color: #ffffff;
}

.tournament-landing__registration-btn:hover {
    opacity: 0.92;
}

.tournament-landing__card-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

.tournament-landing__card-meta {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.tournament-landing__card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tournament-landing__inactive-stamp {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tournament-landing__inactive-stamp-text {
    font-size: clamp(1rem, 4.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.45);
    transform: rotate(-26deg);
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.tournament-landing__card-menu-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06);
    color: #1f2937;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    pointer-events: auto;
}

.tournament-landing__card-menu-btn:hover,
.tournament-landing__card-menu-btn:focus-visible {
    background: rgba(0, 0, 0, 0.12);
    outline: none;
}

.tournament-landing__card--entity-access .tournament-landing__card-menu-btn {
    background: #dcfce7;
}

.tournament-landing__card--entity-access .tournament-landing__card-menu-btn:hover,
.tournament-landing__card--entity-access .tournament-landing__card-menu-btn:focus-visible {
    background: #bbf7d0;
}

.tournament-landing__card-menu-btn-dots {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

.tournament-landing__card-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10040;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: default;
}

.tournament-landing__card-menu {
    display: block;
    position: fixed;
    z-index: 10050;
    min-width: 12.5rem;
    max-width: min(18rem, calc(100vw - 1rem));
    max-height: min(
        calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem),
        calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1rem)
    );
    margin: 0;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    color: #1f2937;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
}

.tournament-landing__card-menu-list {
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
}

.tournament-landing__card-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tournament-landing__card-menu-item:hover:not(:disabled),
.tournament-landing__card-menu-item:focus-visible:not(:disabled) {
    background: rgba(0, 0, 0, 0.06);
}

.tournament-landing__card-menu-item:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.tournament-landing__card-menu-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tournament-landing__selected-label {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.tournament-landing__selected-label strong {
    color: #0f172a;
}

.tournament-landing__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tournament-landing__loading {
    padding: 1.5rem 0;
    color: #64748b;
}

.tournament-landing-dialog .list-group-item.active {
    font-weight: 600;
}

/* Syncfusion-knapper innenfor modulen */
.tournament-landing .e-btn.e-primary,
.tournament-landing-dialog .e-btn.e-primary {
    background: linear-gradient(135deg, var(--tts-btn-primary-start, #9575cd) 0%, var(--tts-btn-primary-end, #673ab7) 100%) !important;
    color: var(--tts-btn-primary-text, #fff) !important;
    border: none !important;
    box-shadow: 0 4px 14px var(--tts-btn-primary-shadow, rgba(103, 58, 183, 0.24));
}

.tournament-landing .e-btn.e-primary:hover,
.tournament-landing-dialog .e-btn.e-primary:hover {
    filter: brightness(1.06);
}

.tournament-landing .e-btn.e-outline,
.tournament-landing-dialog .e-btn.e-outline {
    background: var(--tts-btn-secondary-bg, #fff) !important;
    border-color: var(--tts-btn-secondary-border, #dadce0) !important;
    color: var(--tts-btn-secondary-text, #311b92) !important;
    box-shadow: none;
}

.tournament-landing .e-btn.e-outline:hover,
.tournament-landing-dialog .e-btn.e-outline:hover {
    background: var(--tts-btn-secondary-hover-bg, #f8f9fa) !important;
    border-color: var(--tts-btn-secondary-border-hover, var(--tts-btn-secondary-border, #dadce0)) !important;
    color: var(--tts-btn-secondary-text-hover, var(--tts-btn-secondary-text, #311b92)) !important;
}

.tournament-landing .btn-outline-secondary,
.tournament-landing .btn-outline-success {
    background: var(--tts-btn-secondary-bg, #fff);
    border-color: var(--tts-btn-secondary-border, #dadce0);
    color: var(--tts-btn-secondary-text, #334155);
}

.tournament-landing .btn-outline-secondary:hover,
.tournament-landing .btn-outline-success:hover {
    background: var(--tts-btn-secondary-hover-bg, #f8f9fa);
    border-color: var(--tts-btn-secondary-border-hover, var(--tts-btn-secondary-border, #dadce0));
    color: var(--tts-btn-secondary-text-hover, var(--tts-accent-deep, #311b92));
}

/* Dialog: header synlig, kun innhold scrollbart */
.tournament-landing-form-dialog.e-dialog {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 0.35rem 1.25rem rgba(15, 23, 42, 0.14);
}

.tournament-landing-form-dialog .e-dlg-header {
    flex-shrink: 0;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.tournament-landing-form-dialog .e-dlg-header-content {
    color: #0f172a;
    font-weight: 700;
}

.tournament-landing-form-dialog .e-dlg-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem;
    background: #e2e8f0;
    color: #202124;
}

.tournament-landing__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tournament-landing__form-fields {
    padding: 1.25rem 1rem;
    margin: 0;
}

.tournament-landing__form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.tournament-landing__form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.tournament-landing__form-field--checkbox {
    justify-content: flex-end;
}

.tournament-landing__form-checkbox-card {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 3.1rem;
    padding: 0.8rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-shadow: 0 0.1rem 0.45rem rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tournament-landing__form-checkbox-card:hover {
    border-color: #94a3b8;
}

.tournament-landing__form-checkbox-card:focus-within {
    border-color: var(--tts-accent, #673ab7);
    box-shadow: 0 0 0 3px var(--tts-accent-outline-hover-bg, rgba(103, 58, 183, 0.12));
}

.tournament-landing__form .tournament-landing__form-checkbox-card .e-checkbox-wrapper,
.tournament-landing__form .tournament-landing__form-checkbox-card .e-css.e-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
}

.tournament-landing__form .tournament-landing__form-checkbox-card .e-frame.e-icons,
.tournament-landing__form .tournament-landing__form-checkbox-card .e-css.e-checkbox-wrapper .e-frame.e-icons {
    width: 1.35rem;
    height: 1.35rem;
    border: 2px solid #64748b;
    background-color: #ffffff;
    border-radius: 0.3rem;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.tournament-landing__form .tournament-landing__form-checkbox-card .e-checkbox-wrapper:hover .e-frame.e-icons,
.tournament-landing__form .tournament-landing__form-checkbox-card .e-css.e-checkbox-wrapper:hover .e-frame.e-icons {
    border-color: #334155;
}

.tournament-landing__form .tournament-landing__form-checkbox-card .e-frame.e-icons.e-check,
.tournament-landing__form .tournament-landing__form-checkbox-card .e-css.e-checkbox-wrapper .e-frame.e-icons.e-check {
    border-color: var(--tts-accent, #673ab7);
    background-color: var(--tts-accent, #673ab7);
    color: #ffffff;
}

.tournament-landing__form .tournament-landing__form-checkbox-card .e-check {
    font-size: 0.9rem;
    font-weight: 700;
}

.tournament-landing__form-label {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.tournament-landing__form-input {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-sizing: border-box;
}

.tournament-landing__form-input:focus {
    outline: none;
    border-color: var(--tts-accent, #673ab7);
    box-shadow: 0 0 0 3px var(--tts-accent-outline-hover-bg, rgba(103, 58, 183, 0.12));
}

.tournament-landing__form-hint {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.tournament-landing__form-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.95rem;
}

.tournament-landing__form-actions {
    padding: 0 0.25rem 0.25rem;
}

.tournament-landing__form .e-input-group,
.tournament-landing__form .e-control-wrapper,
.tournament-landing__form .e-ddl,
.tournament-landing__form .e-datepicker,
.tournament-landing__form .e-numerictextbox {
    border-radius: 0.5rem !important;
}

.tournament-landing__form .e-input-group:not(.e-disabled),
.tournament-landing__form .e-control-wrapper:not(.e-disabled) {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.tournament-landing__form .e-input-group.e-input-focus:not(.e-disabled),
.tournament-landing__form .e-control-wrapper.e-input-focus:not(.e-disabled) {
    border-color: var(--tts-accent, #673ab7);
    box-shadow: 0 0 0 3px var(--tts-accent-outline-hover-bg, rgba(103, 58, 183, 0.12));
}

.tournament-landing__form .tournament-landing__form-checkbox-card .e-label {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.tournament-landing__feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    min-height: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 0.75rem rgba(15, 23, 42, 0.06);
    border-top: 4px solid hsl(var(--tournament-landing-feature-hue, 210), 70%, 45%);
}

.tournament-landing__feature-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

.tournament-landing__feature-card-text {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.tournament-landing__section--muted .tournament-landing__feature-card {
    background: #ffffff;
    box-shadow: 0 0.2rem 1rem rgba(15, 23, 42, 0.1);
}

@media (max-width: 575.98px) {
    .tournament-landing__form-grid {
        grid-template-columns: 1fr;
    }

    .tournament-landing-form-dialog .e-dlg-content {
        padding: 0.75rem;
    }

    .tournament-landing__form-fields {
        padding: 1rem 0.75rem;
    }

    .tts-module.tts-module--tournament-landing.tts-module--landing {
        padding: 0.75rem 0.75rem 1.25rem;
    }

    .tournament-landing__body {
        gap: 0.625rem;
    }

    .tournament-landing__section {
        padding: 1.5rem 0.75rem;
    }

    .tournament-landing__section--search {
        padding: 1rem 0.75rem;
    }

    .tournament-landing__card-grid {
        grid-template-columns: 1fr;
    }

    .tournament-landing__toolbar-actions {
        margin-left: 0;
        width: 100%;
    }
}
