﻿/* Monthly earnings calendar */
.calmonth-page {
    max-width: 100%;
}

.calmonth-head {
    margin-bottom: 16px;
}

    .calmonth-head h1 {
        font-size: 24px;
        font-weight: 800;
        color: var(--text);
        margin: 0 0 6px;
    }

.calmonth-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.calmonth-loading {
    color: var(--text-muted);
    padding: 40px;
    text-align: center;
}

/* grid with ONE watermark behind everything */
.calmonth-grid {
    position: relative;
    margin-top: 8px;
    overflow-x: auto;
}

    .calmonth-grid::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('/logo.svg');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 90% auto;
        opacity: .10; /* light mode */
        pointer-events: none;
        z-index: 0;
    }

[data-theme="dark"] .calmonth-grid::before {
    opacity: .25;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .calmonth-grid::before {
        opacity: .25;
    }
}

.cm-table {
    position: relative;
    z-index: 1;
    min-width: 720px;
    background: transparent;
}

.cm-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

/* weekday header */
.cm-hdr .cm-hdrcell {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

/* day cells */
.cm-day {
    position: relative;
    min-height: 150px;
    padding: 6px 8px 10px;
    border-right: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
    cursor: pointer;
    background: transparent;
    transition: background 160ms ease;
}

.cm-week .cm-day:first-child {
    border-left: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.cm-day:hover {
    background: color-mix(in srgb, var(--ew-color) 16%, transparent);
}

.cm-daynum {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.cm-logos {
    display: block;
    width: 100%;
    height: 150px;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
    /* protection: no right-click "Save image", no drag/select */
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.cm-day {
    -webkit-user-select: none;
    user-select: none;
}

@media (max-width: 760px) {
    .cm-hdrcell {
        font-size: 12px;
    }

    .cm-day {
        min-height: 110px;
    }

    .cm-daynum {
        font-size: 14px;
    }
}
