/* "Buy us a coffee" donation prompts (resources/views/front/partials/donate.blade.php).
   Standalone file, not part of the Mix build: the Tailwind in public/css/app.css is purged, so
   these components carry their own styles. Linked from layouts/app.blade.php with a filemtime
   cache-buster, only when DONATE_URL is set.
   The site has no dark theme, so the prompts follow the page (always light). Colours are tokens
   so a future site-wide dark theme only has to redefine them. */

:root {
    --donate-ink: #2b1d14;          /* espresso: headings, button text */
    --donate-text: #57463a;         /* body copy */
    --donate-muted: #76624f;        /* fine print */
    --donate-cream: #fff8e1;        /* soft coffee-cream panel */
    --donate-line: #f0dfae;         /* panel border */
    --donate-yellow: #ffc600;       /* the site's own yellow (home search button) */
    --donate-yellow-hover: #ffb400;
    --donate-ring: rgba(255, 198, 0, 0.22);
}

/* ---- Shared pieces -------------------------------------------------------------------- */

.donate-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--donate-yellow);
    color: var(--donate-ink);
    font-size: 18px;
    line-height: 1;
}

/* a.donate-btn:* beats the theme's a:link / a:visited (black) and a:hover (red) colours */
a.donate-btn,
a.donate-btn:link,
a.donate-btn:visited,
a.donate-btn:hover,
a.donate-btn:focus {
    color: var(--donate-ink);
    text-decoration: none;
}
.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 6px;
    background: var(--donate-yellow);
    box-shadow: 0 1px 0 rgba(43, 29, 20, 0.18);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.donate-btn:hover {
    background: var(--donate-yellow-hover);
    box-shadow: 0 4px 12px rgba(43, 29, 20, 0.16);
    transform: translateY(-1px);
}
.donate-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(43, 29, 20, 0.18);
}
.donate-btn:focus-visible,
.donate-close:focus-visible {
    outline: 3px solid var(--donate-ink);
    outline-offset: 2px;
}
.donate-btn i {
    font-size: 16px;
}

.donate-title {
    margin: 0 0 4px;
    color: var(--donate-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}
.donate-copy {
    margin: 0;
    padding: 0;
    color: var(--donate-text);
    font-size: 14px;
    line-height: 1.55;
}
.donate-fine {
    margin-top: 6px;
    color: var(--donate-muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}

/* ---- Strip: above the dxf4free banner, every page, dismissible ---------------------- */

.donate-strip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 10px;
    padding: 12px 56px 12px 14px;
    border: 1px solid var(--donate-line);
    border-radius: 8px;
    background: var(--donate-cream);
    color: var(--donate-text);
}
.donate-strip-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}
.donate-strip-text strong {
    margin-right: 4px;
    color: var(--donate-ink);
    font-weight: 700;
}
.donate-strip .donate-short {
    display: none;
}
.donate-close {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--donate-muted);
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
}
.donate-close:hover {
    background: rgba(43, 29, 20, 0.08);
    color: var(--donate-ink);
}
/* hidden for 30 days by the close button (class set in <head> before first paint) */
.donate-strip-off .donate-strip {
    display: none;
}

@media only screen and (max-width: 760px) {
    .donate-strip {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 44px 12px 12px;
    }
    .donate-strip-text {
        flex: 1 1 0;
        font-size: 14px;
        line-height: 1.4;
    }
    .donate-strip-text strong {
        display: block;
        margin: 0;
    }
    .donate-strip .donate-long {
        display: none;
    }
    .donate-strip .donate-short {
        display: inline;
    }
    .donate-strip .donate-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .donate-strip .donate-btn {
        flex: 1 1 100%;
        margin-right: -32px; /* use the width under the close button too */
    }
    .donate-close {
        top: 4px;
        right: 4px;
        margin-top: 0;
    }
}

/* ---- Tile: one item in the ul.manslist design grid ---------------------------------- */
/* The li already gets the white card + shadow and the column width from the theme. */

ul.manslist li.donate-tile {
    overflow: hidden;
    border-radius: 2px;
}
.donate-tile-art {
    padding: 30px 16px 26px;
    border-bottom: 1px solid var(--donate-line);
    background: var(--donate-cream);
    text-align: center;
}
.donate-tile-art .donate-icon {
    width: 78px;
    height: 78px;
    font-size: 34px;
    box-shadow: 0 0 0 10px var(--donate-ring);
}
.donate-tile-body {
    padding: 16px 16px 18px;
}
.donate-tile .donate-title {
    margin: 0 0 6px;
    font-size: 17px;
}
.donate-tile .donate-copy {
    margin: 0 0 16px;
    padding: 0;
    color: var(--donate-text);
    font-size: 13px;
    line-height: 1.55;
}
.donate-tile .donate-btn {
    display: flex;
    width: 100%;
}
.donate-tile .donate-fine {
    white-space: normal;
}

/* ---- Card: in-page box (design page under the downloads, download page, about) ------ */

.donate-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 24px 0;
    padding: 18px 20px;
    border: 1px solid var(--donate-line);
    border-radius: 8px;
    background: var(--donate-cream);
    color: var(--donate-text);
    text-align: left;
}
/* download page: centred between the file details and the Download button (the template's mt-8
   margins are purged from app.css, so the card supplies the space on both sides) */
.donate-card--center {
    max-width: 640px;
    margin: 28px auto;
}
.donate-card .donate-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
}
.donate-card-body {
    flex: 1 1 auto;
    min-width: 0;
}
.donate-card-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 14px;
}
.donate-card .donate-fine {
    margin: 0;
    text-align: left;
    white-space: normal;
}

/* phones: smaller icon, full-width button with the fine print centred under it */
@media only screen and (max-width: 579px) {
    .donate-card {
        gap: 12px;
        padding: 16px 14px;
    }
    .donate-card .donate-icon {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }
    .donate-card-action .donate-btn,
    .donate-card .donate-fine {
        flex: 1 1 100%;
    }
    .donate-card .donate-fine {
        text-align: center;
    }
}

/* ---- /support page (front.pages.support) ------------------------------------------- */

.support-page {
    display: grid;
    gap: 24px;
    max-width: 1000px;
    margin: 30px auto 50px;
    padding: 0 16px;
}
.support-hero,
.support-option,
.support-section {
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.support-hero {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 36px 24px 32px;
    text-align: center;
}
.support-hero .donate-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    font-size: 28px;
    box-shadow: 0 0 0 10px var(--donate-ring);
}
.support-hero h1 {
    margin: 0;
    color: var(--donate-ink);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    text-wrap: balance;
}
.support-hero h1 span {
    white-space: nowrap;
}
.support-hero p {
    max-width: 640px;
    margin: 0;
    color: var(--donate-text);
    font-size: 16px;
    line-height: 1.6;
}
.support-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.support-options--single {
    grid-template-columns: minmax(0, 480px);
    justify-content: center;
}
.support-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 26px 24px 22px;
    border: 1px solid #ece6d8;
}
.support-option--monthly {
    border-color: var(--donate-line);
    background: var(--donate-cream);
}
.support-option .donate-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
}
.support-option .donate-title {
    margin: 4px 0 0;
    font-size: 20px;
}
.support-price {
    margin: 0;
    color: var(--donate-ink);
    font-size: 15px;
}
.support-price strong {
    font-size: 22px;
    font-weight: 700;
}
.support-option .donate-copy {
    flex: 1 1 auto;
    margin: 0 0 8px;
}
.support-option .donate-btn {
    display: flex;
    width: 100%;
}
.support-option .donate-fine {
    align-self: stretch;
    margin: 0;
    white-space: normal;
}
.support-tag {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--donate-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}
.support-section {
    padding: 26px 24px;
}
.support-section h2 {
    margin: 0 0 16px;
    color: var(--donate-ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.support-uses {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.support-uses li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.support-uses i {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--donate-cream);
    color: var(--donate-ink);
    font-size: 15px;
}
.support-uses strong {
    display: block;
    margin-bottom: 2px;
    color: var(--donate-ink);
    font-size: 15px;
}
.support-uses span,
.support-faq dd,
.support-other p {
    color: var(--donate-text);
    font-size: 14px;
    line-height: 1.55;
}
.support-faq {
    display: grid;
    gap: 14px;
    margin: 0;
}
.support-faq dt {
    color: var(--donate-ink);
    font-size: 15px;
    font-weight: 700;
}
.support-faq dd {
    margin: 2px 0 0;
}
.support-other p {
    margin: 0;
}
.support-other a {
    text-decoration: underline;
    text-decoration-color: var(--donate-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
@media only screen and (max-width: 760px) {
    .support-page {
        gap: 16px;
        margin-top: 16px;
        padding: 0 12px;
    }
    .support-options,
    .support-uses {
        grid-template-columns: minmax(0, 1fr);
    }
    .support-hero {
        padding: 28px 18px 24px;
    }
    .support-hero h1 {
        font-size: 28px;
    }
    .support-option,
    .support-section {
        padding: 22px 18px;
    }
}

/* desktop header menu entry */
.jquerycssmenu ul li.menu-support > a i {
    color: var(--donate-yellow);
}

/* ---- Accessibility and print -------------------------------------------------------- */

/* Browsers that force-darken light pages (Chrome/Samsung "dark theme for sites") would turn the
   espresso text light on the yellow; keep the yellow pieces as designed, the panels still darken. */
.donate-btn,
.donate-icon,
.support-tag {
    color-scheme: only light;
}

@media (prefers-reduced-motion: reduce) {
    .donate-btn {
        transition: none;
    }
    .donate-btn:hover {
        transform: none;
    }
}
@media (forced-colors: active) {
    .donate-btn,
    .donate-strip,
    .donate-card,
    .donate-icon {
        border: 1px solid CanvasText;
    }
}
@media print {
    .donate-strip,
    .donate-tile,
    .donate-card,
    .support-options {
        display: none !important;
    }
}
