/*
 * Fortune IIS Supplemental Styles
 * https://assets.mn-cdn.com/assets/css/apps/ext/iis-best/fortune/add-style.css
 *
 * Load after the shared IIS stylesheets.
 */

:root {
    color-scheme: light;
    --fortune-plum: #28183e;
    --fortune-purple: #6a0dad;
    --fortune-violet: #9b59b6;
    --fortune-gold: #c89b3c;
    --fortune-paper: #fffdf7;
    --fortune-white: #ffffff;
    --fortune-ink: #241d2b;
    --fortune-muted: #746b7c;
    --fortune-border: rgba(200, 155, 60, 0.72);
    --fortune-shadow: 0 2rem 5rem rgba(10, 4, 18, 0.42);
}

html {
    min-width: 320px;
    background: var(--fortune-plum);
}

body.fortune-page,
body.fortune-page *,
body.fortune-page *::before,
body.fortune-page *::after {
    box-sizing: border-box;
}

body.fortune-page {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--fortune-ink);
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(155, 89, 182, 0.35),
            transparent 34rem
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(106, 13, 173, 0.28),
            transparent 32rem
        ),
        var(--fortune-plum);
    font-family: Arial, "Segoe UI", Helvetica, sans-serif;
}

body.fortune-page a {
    text-underline-offset: 0.2em;
}

body.fortune-page a:focus-visible,
body.fortune-page button:focus-visible,
body.fortune-page input:focus-visible {
    outline: 3px solid var(--fortune-gold);
    outline-offset: 3px;
}

/*
|--------------------------------------------------------------------------
| Main Layout
|--------------------------------------------------------------------------
*/

body.fortune-page .fortune-shell {
    width: min(100%, 76rem);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3rem);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 2rem;
}

body.fortune-page .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0;
    color: var(--fortune-white);
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.fortune-page .site-name {
    margin: 0;
    color: var(--fortune-white);
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

body.fortune-page .site-name:hover {
    color: var(--fortune-white);
    text-decoration: underline;
}

body.fortune-page .site-navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

body.fortune-page .site-navigation a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

body.fortune-page .site-navigation a:hover,
body.fortune-page .site-navigation a:focus-visible {
    color: var(--fortune-white);
}

body.fortune-page .fortune-main {
    display: grid;
    place-items: center;
    margin: 0;
    padding: 1rem 0;
}

body.fortune-page .content-stack {
    width: min(100%, 48rem);
    display: grid;
    gap: 1rem;
}

/*
|--------------------------------------------------------------------------
| Fortune Card
|--------------------------------------------------------------------------
*/

body.fortune-page .fortune-card,
body.fortune-page .archive-card {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--fortune-ink);
    background: var(--fortune-paper);
    border: 1px solid var(--fortune-border);
    border-radius: 0.75rem;
    box-shadow: var(--fortune-shadow);
}

body.fortune-page .fortune-card {
    padding:
        clamp(2.5rem, 7vw, 5rem)
        clamp(1.5rem, 7vw, 5rem);
    text-align: center;
}

body.fortune-page .fortune-card::before,
body.fortune-page .fortune-card::after {
    content: "";
    position: absolute;
    width: 7rem;
    height: 7rem;
    pointer-events: none;
    border: 1px solid rgba(200, 155, 60, 0.38);
    transform: rotate(45deg);
}

body.fortune-page .fortune-card::before {
    top: -5.25rem;
    left: -5.25rem;
}

body.fortune-page .fortune-card::after {
    right: -5.25rem;
    bottom: -5.25rem;
}

body.fortune-page .fortune-kicker {
    position: relative;
    z-index: 1;
    margin: 0 0 1.5rem;
    color: var(--fortune-purple);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.5;
    text-transform: uppercase;
}

body.fortune-page .fortune-text {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    color: var(--fortune-ink);
    background: transparent;
    border: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5.4vw, 3.5rem);
    font-style: normal;
    font-weight: 400;
    line-height: 1.22;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

body.fortune-page .fortune-mark {
    position: relative;
    z-index: 1;
    display: block;
    width: 2.75rem;
    height: 2px;
    margin: 2rem auto 1.25rem;
    background: var(--fortune-gold);
}

body.fortune-page .fortune-week {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--fortune-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

body.fortune-page .fortune-actions {
    position: relative;
    z-index: 1;
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
}

body.fortune-page .fortune-actions a {
    color: var(--fortune-purple);
    font-weight: 700;
}

body.fortune-page .fortune-actions a:hover {
    color: var(--fortune-plum);
}

/*
|--------------------------------------------------------------------------
| Past Fortune Archive
|--------------------------------------------------------------------------
*/

body.fortune-page .archive-card {
    padding: clamp(1.5rem, 5vw, 3rem);
    text-align: left;
}

body.fortune-page .archive-title {
    margin: 0 0 1.25rem;
    color: var(--fortune-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.2;
}

body.fortune-page .archive-search {
    margin: 0 0 1.5rem;
}

body.fortune-page .archive-search label {
    display: block;
    margin: 0 0 0.5rem;
    color: var(--fortune-ink);
    font-weight: 700;
}

body.fortune-page .archive-search-row {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
}

body.fortune-page .archive-search input,
body.fortune-page .archive-search button {
    min-height: 2.75rem;
    border-radius: 0.45rem;
    font: inherit;
}

body.fortune-page .archive-search input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    color: var(--fortune-ink);
    background: var(--fortune-white);
    border: 1px solid #d9d2e0;
}

body.fortune-page .archive-search input:hover {
    border-color: var(--fortune-violet);
}

body.fortune-page .archive-search button {
    padding: 0.65rem 1rem;
    color: var(--fortune-white);
    background: var(--fortune-purple);
    border: 1px solid var(--fortune-purple);
    cursor: pointer;
    font-weight: 700;
    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        transform 150ms ease;
}

body.fortune-page .archive-search button:hover {
    background: var(--fortune-plum);
    border-color: var(--fortune-plum);
    transform: translateY(-1px);
}

body.fortune-page .archive-list {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    list-style: none;
}

body.fortune-page .archive-list li {
    margin: 0;
    padding: 0;
}

body.fortune-page .archive-list a {
    display: block;
    padding: 1rem;
    color: var(--fortune-ink);
    background: var(--fortune-white);
    border: 1px solid #e4ddea;
    border-radius: 0.5rem;
    text-decoration: none;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

body.fortune-page .archive-list a:hover,
body.fortune-page .archive-list a:focus-visible {
    border-color: var(--fortune-purple);
    box-shadow: 0 0.5rem 1.5rem rgba(40, 24, 62, 0.1);
    transform: translateY(-1px);
}

body.fortune-page .archive-list time {
    display: block;
    margin: 0 0 0.4rem;
    color: var(--fortune-purple);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.5;
}

body.fortune-page .archive-list q {
    display: block;
    color: var(--fortune-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body.fortune-page .empty-message,
body.fortune-page .archive-card > p {
    color: var(--fortune-muted);
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

body.fortune-page .site-footer {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    border: 0;
    box-shadow: none;
    font-size: 0.8rem;
    line-height: 1.75;
    text-align: center;
}

body.fortune-page .site-footer a {
    color: var(--fortune-white);
    text-decoration-color: rgba(255, 255, 255, 0.38);
}

body.fortune-page .site-footer a:hover,
body.fortune-page .site-footer a:focus-visible {
    color: var(--fortune-white);
    text-decoration-color: var(--fortune-white);
}

/*
|--------------------------------------------------------------------------
| Responsive Layout
|--------------------------------------------------------------------------
*/

@media (max-width: 42rem) {
    body.fortune-page .fortune-shell {
        gap: 1.25rem;
    }

    body.fortune-page .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    body.fortune-page .site-navigation {
        gap: 0.75rem 1rem;
    }

    body.fortune-page .fortune-card {
        padding-block: 3.25rem;
    }

    body.fortune-page .archive-search-row {
        flex-direction: column;
    }

    body.fortune-page .archive-search button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.fortune-page .fortune-card,
    body.fortune-page .archive-card {
        animation: fortune-arrival 500ms ease-out both;
    }

    @keyframes fortune-arrival {
        from {
            opacity: 0;
            transform: translateY(0.75rem);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/*
|--------------------------------------------------------------------------
| Past Fortune Search Bar Fix
|--------------------------------------------------------------------------
*/

body.fortune-page .archive-search {
    width: 100%;
    margin: 0 0 1.75rem;
    padding: 1rem;
    background: #f8f5fb;
    border: 1px solid #e4ddea;
    border-radius: 0.65rem;
}

body.fortune-page .archive-search label {
    display: block;
    width: 100%;
    margin: 0 0 0.6rem;
    padding: 0;
    color: var(--fortune-ink);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
}

body.fortune-page .archive-search-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
}

body.fortune-page .archive-search input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    height: 3rem;
    margin: 0;
    padding: 0.65rem 0.85rem;
    color: var(--fortune-ink);
    background-color: #ffffff;
    border: 1px solid #cfc5d8;
    border-radius: 0.45rem;
    box-shadow: none;
    font-family: Arial, "Segoe UI", Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
}

body.fortune-page .archive-search input[type="date"]:hover {
    border-color: var(--fortune-violet);
}

body.fortune-page .archive-search input[type="date"]:focus {
    border-color: var(--fortune-purple);
    outline: 3px solid rgba(106, 13, 173, 0.18);
    outline-offset: 1px;
}

body.fortune-page
.archive-search
input[type="date"]::-webkit-calendar-picker-indicator {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0.15rem;
    cursor: pointer;
    opacity: 0.72;
}

body.fortune-page
.archive-search
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

body.fortune-page .archive-search button[type="submit"] {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    min-width: 9rem;
    height: 3rem;
    margin: 0;
    padding: 0.65rem 1.15rem;
    color: #ffffff;
    background: var(--fortune-purple);
    border: 1px solid var(--fortune-purple);
    border-radius: 0.45rem;
    box-shadow: none;
    font-family: Arial, "Segoe UI", Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

body.fortune-page .archive-search button[type="submit"]:hover {
    color: #ffffff;
    background: var(--fortune-plum);
    border-color: var(--fortune-plum);
}

body.fortune-page .archive-search button[type="submit"]:active {
    transform: translateY(1px);
}

body.fortune-page .archive-search button[type="submit"]:focus-visible {
    outline: 3px solid rgba(106, 13, 173, 0.28);
    outline-offset: 2px;
}

@media (max-width: 36rem) {
    body.fortune-page .archive-search-row {
        grid-template-columns: 1fr;
    }

    body.fortune-page .archive-search button[type="submit"] {
        width: 100%;
        min-width: 0;
    }
}