/* =====================================================
   BASE
   ===================================================== */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    min-height: calc(100vh - 110px);
    background: linear-gradient(160deg, #0b1929 0%, #0f2744 50%, #132f4c 100%);
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
}

h1:focus {
    outline: none;
}

h1, h2, h3 {
    margin: .67em 0 .3em;
    font-weight: normal;
}

h1 {
    font-size: 42px;
}

h2 {
    font-size: 32px;
}

h3 {
    font-size: 24px;
}

a {
    color: var(--kendo-color-on-app-surface);
}

    a:hover {
        color: var(--kendo-color-primary);
        text-decoration: none;
    }

main {
    padding: 0 2em 2em;
}

/* =====================================================
   BLAZOR ERROR UI
   ===================================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2L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zkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* =====================================================
   TOP APP BAR — Dark theme, beats Telerik defaults
   ===================================================== */

div.appbar-top {
    position: relative;
    z-index: 100;
}

/* Target both the wrapper div and the Telerik k-appbar element */
.appbar-top,
.appbar-top.k-appbar {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
    background: linear-gradient(90deg, #0a1628 0%, #0f2744 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
}

    .appbar-top .k-appbar-section,
    .appbar-top.k-appbar-section {
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .appbar-top .k-appbar-spacer,
    .appbar-top.k-appbar-spacer {
        min-width: 8px;
    }

    /* Second section min-width for brand area */
    .appbar-top .k-appbar-section:nth-child(2) {
        min-width: 500px;
        flex-shrink: 0;
    }

/* =====================================================
   BOTTOM APP BAR — Dark theme to match top bar
   ===================================================== */

div.appbar-bottom,
.appbar-bottom.k-appbar {
    z-index: 1;
    background: linear-gradient(90deg, #0a1628 0%, #0f2744 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #475569 !important;
}

#copyright {
    padding: .5em 0;
}

/* =====================================================
   DRAWER — Dark theme, beats Telerik defaults
   ===================================================== */

.mainlayout-drawer {
    flex: 1;
    align-items: stretch;
    overflow: hidden;
}

    .mainlayout-drawer > .k-drawer .k-drawer-items {
        margin-top: 1em;
    }

    /* Drawer container and wrapper backgrounds */
    .mainlayout-drawer.k-drawer-container,
    .mainlayout-drawer .k-drawer,
    .mainlayout-drawer .k-drawer-wrapper {
        background: linear-gradient(180deg, #0a1628 0%, #0d1f35 100%) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    }

    /* Drawer items */
    .mainlayout-drawer .k-drawer-item {
        color: #8899aa !important;
        padding: 12px 16px !important;
        margin: 2px 8px !important;
        border-radius: 10px !important;
        transition: all 0.2s ease;
    }

        .mainlayout-drawer .k-drawer-item:hover {
            background: rgba(255, 255, 255, 0.05) !important;
            color: #ffffff !important;
        }

        .mainlayout-drawer .k-drawer-item.k-selected {
            background: rgba(52, 152, 219, 0.12) !important;
            color: #3498db !important;
            font-weight: 600;
        }

            .mainlayout-drawer .k-drawer-item.k-selected:hover {
                background: rgba(52, 152, 219, 0.18) !important;
            }

        .mainlayout-drawer .k-drawer-item .k-icon,
        .mainlayout-drawer .k-drawer-item .k-svg-icon {
            color: inherit !important;
        }

/* Menu toggle button */
.menu-toggle.k-button {
    color: #94a3b8 !important;
    border-radius: 8px !important;
    width: 34px !important;
    height: 34px !important;
    background: transparent !important;
    border: none !important;
}

    .menu-toggle.k-button:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        color: #ffffff !important;
    }

/* Logout button */
.logout-btn.k-button {
    color: #64748b !important;
    border-radius: 8px !important;
    width: 30px !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
}

    .logout-btn.k-button:hover {
        color: #e74c3c !important;
        background: rgba(231, 76, 60, 0.1) !important;
    }

/* =====================================================
   LAYOUT HELPERS
   ===================================================== */

.appbar-top > div {
    line-height: 2.4;
}

#app-title {
    display: flex;
    gap: .2em;
    align-items: center;
    margin: 0;
    padding: 0;
    font-size: 1.2em;
}

    #app-title strong {
        font-weight: 500;
    }

    #app-title sup {
        font-size: .4em;
    }

    #app-title a,
    #app-title a:hover {
        text-decoration: none;
        color: inherit;
    }

#product-page-link {
    display: block;
    width: 42px;
    margin-right: var(--kendo-spacing-2);
    background: url(devcraft-ninja-small.svg) center no-repeat;
    background-size: contain;
    font-size: var(--kendo-font-size-lg);
    text-decoration: none;
    text-indent: -9999px;
}

/* =====================================================
   MATCH / GAME STYLES
   ===================================================== */

.match-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.team-info h3 {
    margin: 0;
}

.match-clock {
    font-size: 1.6rem;
    font-weight: bold;
    margin-top: 4px;
}

.half-controls {
    display: flex;
    gap: 10px;
}

.match-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =====================================================
   FLEX BUTTON (Shot/Event buttons)
   ===================================================== */

.flex-button.k-button {
    flex: 1;
    max-width: 64px;
    height: 64px;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    border: none !important;
    background: none !important;
    box-sizing: border-box !important;
    line-height: 0 !important;
    overflow: hidden;
}

    .flex-button.k-button.k-button-text,
    .flex-button.k-button.k-button-content,
    .flex-button.k-button > span,
    .flex-button.k-button > * {
        padding: 0 !important;
        margin: 0 !important;
        line-height: 0 !important;
        display: flex !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        width: 100% !important;
        height: 100% !important;
    }

    .flex-button.k-button img {
        width: 100% !important;
        height: 100% !important;
        object-fit: fill !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

.shot-button {
    border: none;
    background: none;
    padding: 0;
    min-width: auto;
}

    .shot-button img {
        display: block;
    }

/* =====================================================
   PLAYER COLUMNS / EVENTS LAYOUT
   ===================================================== */

.players-two-column {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 30px;
}

.players-panel {
    width: 50%;
}

.events-panel-bottom {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

.event-item {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.events-and-pitch {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    height: 50vh;
    overflow: hidden;
}

.events-panel-left {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.pitch-panel-right {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pitch-and-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 10px;
}

.event-button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

    .event-button-grid .break {
        flex-basis: 100%;
        height: 0;
    }

/* =====================================================
   MISC UTILITY
   ===================================================== */

.empty-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.title-white {
    font-size: 20px;
    color: #ffffff;
}

.title-accent {
    font-size: 20px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
