:root {
    --seg-minute: #4cc9f0;
    --seg-hour: #f4a261;
    --seg-dom: #90be6d;
    --seg-month: #e76f51;
    --seg-dow: #b197fc;
}

body {
    background: #0e1117;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#cronInput {
    font-size: 1.35rem;
    letter-spacing: 0.15em;
}

.seg-badge {
    color: #0e1117;
    font-weight: 600;
    cursor: pointer;
}

.seg-minute { background: var(--seg-minute); }
.seg-hour { background: var(--seg-hour); }
.seg-dom { background: var(--seg-dom); }
.seg-month { background: var(--seg-month); }
.seg-dow { background: var(--seg-dow); }

.tab-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.4rem;
}

.val-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
    gap: 0.3rem;

    .btn {
        padding: 0.15rem 0;
        font-size: 0.8rem;
    }
}

.mode-row {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition:
        border-color 0.12s ease,
        background-color 0.12s ease;

    &.active {
        border-color: var(--bs-primary);
        background: rgba(13, 110, 253, 0.08);
    }

    &:not(.active):hover {
        border-color: var(--bs-secondary-color);
        background: rgba(255, 255, 255, 0.03);
    }

    .form-control,
    .form-select {
        cursor: auto;
    }
}

.mainLogo {
    height: 3rem;
    width: auto;
}


/* ---------- footer ---------- */
.app-footer {
    background: #0a0d12;
    border-top: 1px solid rgba(255, 255, 255, 0.07);

    a:focus-visible {
        outline: 2px solid var(--seg-minute);
        outline-offset: 3px;
        border-radius: 2px;
    }
}

.footer-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #5c6672;
    margin-bottom: 1rem;
}

.footer-prose {
    color: #868e96;
    line-height: 1.6;

    a {
        color: #adb5bd;
        text-decoration: underline;
        text-decoration-color: rgba(255, 255, 255, 0.2);
        text-underline-offset: 0.2em;
        transition:
            color 0.15s ease,
            text-decoration-color 0.15s ease;

        &:hover {
            color: #e9ecef;
            text-decoration-color: var(--seg-minute);
        }
    }
}

/* field-order legend: five fields, five colors */
.cron-legend {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 21rem;
    margin: 0 auto;
}

.leg-star {
    font-size: 1.5rem;
    line-height: 1.1;
    color: currentColor;
    transition: opacity 0.15s ease;
}

.leg-drop {
    width: 1px;
    height: 1.1rem;
    margin: 0.1rem auto 0.3rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
}

.leg-name {
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #5c6672;
    transition: color 0.15s ease;
}

.leg-field {
    &:hover .leg-name {
        color: #ced4da;
    }
}

.leg-minute { color: var(--seg-minute); }
.leg-hour { color: var(--seg-hour); }
.leg-dom { color: var(--seg-dom); }
.leg-month { color: var(--seg-month); }
.leg-dow { color: var(--seg-dow); }

/* project list */
.othersProjects {
    ul {
        display: inline-block;
        text-align: left;
    }

    a {
        display: inline-flex;
        gap: 0.5rem;
        padding: 0.12rem 0;
        font-size: 0.85rem;
        color: #ced4da;
        text-decoration: none;
        transition:
            color 0.15s ease,
            transform 0.15s ease;

        &::before {
            content: "*";
            color: #3d4650;
            transition: color 0.15s ease;
        }

        &:hover {
            color: #fff;
            transform: translateX(3px);

            &::before {
                color: var(--seg-minute);
            }
        }

        &[aria-current] {
            color: #fff;

            &::before {
                color: var(--seg-minute);
            }
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-footer a,
    .app-footer a::before,
    .leg-name {
        transition: none;
    }
    
    .othersProjects a:hover {
        transform: none;
    }
}
