/* Ripieno demo: the bar at the bottom, the style picker, the mailbox and the pretend folder. */
:root { --demo-ink: #15171C; --demo-line: rgba(255, 255, 255, .14); }
body.has-demo-bar, body:has(.demo-bar) { padding-bottom: 72px; }

.demo-bar { position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: 12px; font: 500 14px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff; }
.demo-bar__inner {
    max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--demo-ink); border-radius: 16px; padding: 8px 8px 8px 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}
.demo-bar__badge { background: #F5C451; color: var(--demo-ink); font-weight: 800; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.demo-bar__text { flex: 1 1 auto; min-width: 0; color: #D9DBE1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar__text strong { color: #fff; }
.demo-bar__short { display: none; }
.demo-bar__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-bar__btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px;
    background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid var(--demo-line); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.demo-bar__btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.demo-bar__btn--main { background: #F5C451; color: var(--demo-ink); border-color: #F5C451; }
.demo-bar__btn--main:hover { background: #FFD677; color: var(--demo-ink); }
.demo-bar__btn--ghost { background: transparent; }
.demo-bar__btn[aria-expanded="true"] { background: #fff; color: var(--demo-ink); }
.demo-bar__count { background: #F07A5A; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
    .demo-bar__long { display: none; }
    .demo-bar__short { display: inline; }
}
@media (max-width: 640px) {
    body.has-demo-bar, body:has(.demo-bar) { padding-bottom: 128px; }
    .demo-bar { left: 8px; right: 8px; bottom: 8px; }
    .demo-bar__inner { padding: 8px; gap: 8px; }
    .demo-bar__actions { width: 100%; }
    .demo-bar__btn { flex: 1 1 auto; justify-content: center; padding: 0 10px; }
}

.demo-style {
    position: absolute; right: max(0px, calc((100% - 1100px) / 2)); bottom: calc(100% + 10px); width: min(380px, 100%);
    background: #fff; color: var(--demo-ink); border-radius: 16px; padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
    display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 120px); overflow: auto;
}
.demo-style[hidden] { display: none; }
.demo-style__head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.demo-style__close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #F1F2F4; font-size: 22px; line-height: 1; cursor: pointer; }
.demo-style__hint { margin: 0; color: #5A5F6B; font-size: 13px; }
.demo-style__presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-preset { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 12px; border: 2px solid #E4E6EA; background: var(--b); cursor: pointer; font: inherit; text-align: left; color: var(--demo-ink); }
.demo-preset[aria-pressed="true"] { border-color: var(--demo-ink); }
.demo-preset__swatch { display: flex; gap: 4px; }
.demo-preset__swatch span { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.demo-preset__swatch span:nth-child(1) { background: var(--p); }
.demo-preset__swatch span:nth-child(2) { background: var(--a); }
.demo-preset__swatch span:nth-child(3) { background: var(--b); }
.demo-preset__label { font-size: 13px; font-weight: 600; }
.demo-style__custom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 8px; border-top: 1px solid #E4E6EA; }
.demo-style__custom label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #5A5F6B; }
.demo-style__custom input[type="color"] { width: 100%; height: 40px; padding: 2px; border: 1px solid #D5D8DE; border-radius: 10px; background: #fff; cursor: pointer; }
.demo-style__custom select { height: 40px; border: 1px solid #D5D8DE; border-radius: 10px; padding: 0 8px; font: inherit; font-size: 14px; color: var(--demo-ink); background: #fff; }
.demo-style__wide { grid-column: 1 / -1; }
.demo-style__reset { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; color: var(--demo-ink); }

/* Login buttons on the portal page */
.demo-login { border: 2px solid var(--t-accent, #E2B04A); }
.demo-login__choices { display: grid; gap: 12px; }
.demo-login__choice {
    display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--t-radius-s, 12px);
    background: var(--t-primary, #5B1A2B); color: #fff; text-decoration: none; transition: transform .15s ease;
}
.demo-login__choice:hover { color: #fff; transform: translateY(-2px); }
.demo-login__choice strong { font-size: 18px; }
.demo-login__choice span { font-size: 14px; opacity: .85; }

.demo-tip { margin: 32px 0 -48px; padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, var(--t-accent, #E2B04A) 22%, #fff); color: var(--t-ink, #1B1E27); font-size: 15px; display: flex; gap: 12px; align-items: baseline; }
.demo-tip__label { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--t-ink, #1B1E27); color: #fff; padding: 3px 8px; border-radius: 999px; }

/* Mailbox and folder */
.demo-mails, .demo-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.demo-mail { background: var(--t-surface, #fff); border-radius: var(--t-radius-m, 16px); }
.demo-mail summary { cursor: pointer; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; list-style: none; }
.demo-mail summary::-webkit-details-marker { display: none; }
.demo-mail__subject { font-family: var(--t-font-heading); font-size: 22px; color: var(--t-primary); }
.demo-mail__meta { font-size: 14px; color: var(--t-muted); }
.demo-mail__body { margin: 0; padding: 0 22px 22px; white-space: pre-wrap; font: 15px/1.6 var(--t-font-body); color: var(--t-ink-soft); }
.demo-file { background: var(--t-surface, #fff); border-radius: var(--t-radius-s, 12px); padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.demo-file__icon { width: 42px; height: 42px; border-radius: 8px; background: #C8443A; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.demo-file__name { flex: 1; font-weight: 600; color: var(--t-primary); min-width: 0; overflow-wrap: anywhere; }
.demo-file__date { color: var(--t-muted); font-size: 14px; }
.hero__content .eyebrow + .hero__title em { color: var(--t-accent); }
