/* AkiVote - template overrides and page components.
   Template: Bootstrap 5 "Fitness" layout. Colours: logo violet (--bs-dark) and logo cyan (--bs-primary). */

/* Sticky footer: the page is a full-height column, <main> takes the free space */
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > * { flex-shrink: 0; }
body > main { flex-shrink: 0; }
body > script { display: none; }
.back-to-top { display: none; }

.hero-bg-half-2 { background-image: url(../img/hero-org.jpg); }
@media (max-width: 991px) { .hero-bg-half-2 { background-image: url(../img/hero-org.jpg); } }
.hero-bg-half-1 { background-position: 30% center; }

/* icon panels used where the template shows a photo */
.feature-icon-panel {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; color: #fff;
    background: linear-gradient(rgba(75,34,168,.78), rgba(75,34,168,.78)), url(../img/pattern.jpg) center/cover;
}
.feature-icon-panel .fas { color: var(--bs-primary); }
.step-panel { min-height: 150px; }
.ev-logo-box { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; color: #fff; font-weight: 700; font-size: 1.5rem; overflow: hidden; }
.ev-logo-box img { width: 100%; height: 100%; object-fit: cover; }

/* readable text on violet */
.footer .footer-item p, .footer .footer-item .text-body, .copyright .text-body, .about .about-content p { color: rgba(255,255,255,.78); }
.topbar a.text-muted, .topbar .text-body { color: rgba(255,255,255,.85) !important; }
.navbar .navbar-nav .nav-link { padding-left: 4px; }
@media (min-width: 992px) { .navbar .navbar-nav { padding-left: 24px; justify-content: flex-start; } }

/* long-form text (terms, privacy) */
.prose-tpl { max-width: 860px; margin: 0 auto; }
.prose-tpl h2 { font-size: 1.6rem; margin: 2rem 0 .8rem; color: var(--bs-dark); }
.prose-tpl h2:first-child { margin-top: 0; }
.prose-tpl p, .prose-tpl li { line-height: 1.8; }
.prose-tpl a { color: var(--bs-primary); text-decoration: underline; }

/* events list */
.ak-list-section .courses-item { margin-bottom: 0; }
.ev-cover-tpl { height: 150px; overflow: hidden; }
.ev-cover-tpl img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-card[hidden], .nom-item[hidden] { display: none !important; }
.seg-tpl .btn[aria-pressed="true"] { background: var(--bs-primary); color: #fff; }
.courses-item .btn.disabled { opacity: .6; pointer-events: none; }

/* ---------- shared bits for the voting / donation pages ---------- */
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.ak-page { max-width: 1140px; }
.hint { font-size: .9rem; color: #6c757d; }
.opt { color: #6c757d; font-weight: 400; font-size: .85em; }
.ak-notice { display: flex; align-items: center; justify-content: center; background: var(--bs-light); border: 1px solid var(--bs-primary); color: var(--bs-dark); padding: 14px 20px; margin-bottom: 24px; font-weight: 500; }
.ak-notice.info { border-color: var(--bs-dark); }
.notice { display: flex; align-items: center; gap: 10px; background: var(--bs-light); border: 1px solid var(--bs-primary); color: var(--bs-dark); padding: 14px 20px; margin: 20px 0; font-weight: 500; }
.notice.info { border-color: var(--bs-dark); }
.empty { text-align: center; padding: 48px 12px; }
.empty .ic { width: 2.5rem; height: 2.5rem; color: var(--bs-primary); margin-bottom: 12px; }

/* state badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .8rem; font-weight: 700; color: #fff; background: var(--bs-dark); border-radius: 0; }
.badge .ic { width: .95em; height: .95em; }
.badge-ongoing { background: var(--bs-primary); }
.badge-upcoming { background: var(--bs-dark); }
.badge-paused, .badge-ended { background: #6c757d; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* nominee cards */
.nom-photo-tpl { aspect-ratio: 1 / 1; }
.nom-photo-tpl img { height: 100%; object-fit: cover; }
a.team-item, a.team-item:hover { text-decoration: none; color: inherit; }
.team .team-item:hover .team-content p { color: #fff; }
.team .team-item .team-content .btn { margin-top: 6px; }

/* event page */
.ev-hero { position: relative; overflow: hidden; min-height: 260px; background: var(--bs-dark); }
.ev-hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-hero .badge { position: absolute; top: 16px; left: 16px; z-index: 2; }
.ev-hero .on-hero { position: relative; z-index: 1; padding: 150px 24px 20px; color: #fff; background: linear-gradient(transparent, rgba(75,34,168,.85)); }
.ev-hero h1 { color: #fff; margin: 8px 0 0; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.ev-code-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bs-primary); color: #fff; padding: 4px 12px; font-weight: 700; font-size: .85rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 24px 0; }
.fact { background: var(--bs-light); border-bottom: 3px solid var(--bs-primary); padding: 16px 18px; }
.fact .k { font-size: .85rem; color: #6c757d; display: flex; align-items: center; gap: 6px; }
.fact .v { font-size: 1.1rem; font-weight: 700; color: var(--bs-dark); margin-top: 4px; }
.ev-about { line-height: 1.8; max-width: 860px; }
.section-tight { padding: 40px 0 0; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-title { color: var(--bs-dark); margin: 0; }
.section-lead { color: #6c757d; }
.grid.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cat-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--bs-primary); padding: 18px; color: inherit; text-decoration: none; transition: .5s; }
a.cat-card:hover { background: var(--bs-dark); color: #fff; }
a.cat-card:hover .cat-name { color: #fff; }
a.cat-card:hover .cat-sub { color: rgba(255,255,255,.8); }
.cat-ico { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; background: var(--bs-primary); color: #fff; flex: none; }
.cat-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cat-name { font-weight: 700; color: var(--bs-dark); font-size: 1.1rem; }
.cat-sub { font-size: .9rem; color: #6c757d; }
.cat-go { color: var(--bs-primary); }
.tk-card { flex-direction: column; align-items: stretch; }
.tk-card .cat-info { width: 100%; }
.tk-fields .input { min-width: 0; }
.tk-card .btn { align-self: flex-start; }
.head-row .btn { margin-right: 14px; }
.tk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
@media (max-width: 575px) { .tk-fields { grid-template-columns: 1fr; } }

/* form controls */
.input, .field input.input { display: block; width: 100%; padding: .8rem 1rem; border: 1px solid #ced4da; background: #fff; color: #212529; font: inherit; }
.input:focus { outline: 0; border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(0,163,196,.2); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--bs-primary); }
.input-icon .input, .field.input-icon input.input { padding-left: 42px; }
.input-group > .pre { display: inline-flex; align-items: center; padding: 0 16px; background: var(--bs-dark); color: #fff; font-weight: 700; }
.input-group > .input { flex: 1 1 auto; width: 1%; }

/* checkout layout */
.checkout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
@media (max-width: 991px) { .checkout { grid-template-columns: 1fr; } }
.aside, .form-card { background: #fff; border: 1px solid var(--bs-primary); }
.form-card { padding: 28px; }
.who { display: flex; gap: 18px; align-items: center; padding: 22px; background: var(--bs-dark); color: #fff; }
.who-photo { width: 110px; height: 110px; flex: none; overflow: hidden; border: 3px solid var(--bs-primary); }
.who-photo img { width: 100%; height: 100%; object-fit: cover; }
.who .kicker, .about-box .kicker { color: var(--bs-primary); text-transform: uppercase; font-weight: 700; font-size: .8rem; letter-spacing: .06em; }
.who h1 { color: #fff; font-size: 1.7rem; margin: 4px 0; }
.who .meta { color: rgba(255,255,255,.85); }
.ctx { display: flex; align-items: center; gap: 12px; padding: 16px 22px; }
.ctx-logo { width: 48px; height: 48px; flex: none; overflow: hidden; background: var(--bs-light); }
.ctx-logo img { width: 100%; height: 100%; object-fit: cover; }
.ctx b { display: block; color: var(--bs-dark); }
.ctx span { font-size: .85rem; color: #6c757d; }
.ctx .share-btn { margin-left: auto; }
.cover-strip { height: 180px; overflow: hidden; }
.cover-strip img { width: 100%; height: 100%; object-fit: cover; }
.about-box { padding: 22px; }
.about-box h1 { font-size: 1.7rem; color: var(--bs-dark); }
.form-block { margin-bottom: 26px; }
.form-block h2 { font-size: 1.25rem; color: var(--bs-dark); margin-bottom: 12px; }
.stepper { display: flex; gap: 8px; margin-bottom: 12px; }
.stepper button { width: 52px; border: 0; background: var(--bs-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.stepper .input { text-align: center; font-size: 1.3rem; font-weight: 700; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick button { border: 1px solid var(--bs-primary); background: #fff; color: var(--bs-dark); padding: 8px 16px; font-weight: 600; transition: .3s; }
.quick button:hover, .quick button[aria-pressed="true"] { background: var(--bs-primary); color: #fff; }
.more summary { cursor: pointer; font-weight: 600; color: var(--bs-dark); list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more-body { padding-top: 14px; }
.sum { background: var(--bs-light); padding: 16px 18px; margin-bottom: 20px; }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; }
.sum-row[hidden] { display: none; }
.sum-row.total { border-top: 1px solid rgba(75,34,168,.25); margin-top: 6px; padding-top: 10px; font-size: 1.2rem; color: var(--bs-dark); font-weight: 700; }
.paybar { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.paybar .btn { width: 100%; }
.paybar .btn:disabled { opacity: .6; }
.secure { font-size: .85rem; color: #6c757d; text-align: center; }

/* contestant (private results) */
.cv-card { background: var(--bs-dark); color: #fff; padding: 32px; text-align: center; max-width: 520px; margin: 0 auto 32px; }
.cv-label { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--bs-primary); font-weight: 700; }
.cv-total { font-size: 4rem; font-weight: 700; line-height: 1.1; }
.cv-rank { color: rgba(255,255,255,.85); }
.cv-h { font-size: 1.4rem; color: var(--bs-dark); text-align: center; }
.cv-table { width: 100%; max-width: 520px; margin: 12px auto 20px; border-collapse: collapse; }
.cv-table th, .cv-table td { padding: 10px 14px; border-bottom: 1px solid #e3d9f7; }
.cv-table th { background: var(--bs-light); color: var(--bs-dark); text-align: left; }
.cv-table td:last-child, .cv-table th:last-child { text-align: right; }
.cv-muted { text-align: center; color: #6c757d; }
.status-ref-tpl { display: inline-block; background: var(--bs-light); padding: 6px 14px; font-weight: 600; color: var(--bs-dark); }
.seg-tpl .btn-dark { background: #fff; color: var(--bs-dark); }
.seg-tpl .btn-dark:hover { background: var(--bs-primary); color: #fff; }

/* phones: keep hero text readable over the photo */
@media (max-width: 991px) {
    .hero-bg-half-1::after, .hero-bg-half-2::after { content: ""; position: absolute; inset: 0; background: rgba(75, 34, 168, .62); }
}

/* =====================================================================
   Third colour: midnight ink, so violet is used for accents, not everywhere
   ===================================================================== */
:root { --ak-ink: #1b1747; --ak-ink-2: #121030; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ak-ink); }

/* header */
.header-top::before, .header-top::after, .nav-shaps-1, .nav-shaps-2,
.navbar-brand::before, .navbar-brand-2::before { background: var(--ak-ink); }

/* footer, copyright and the call-to-action band */
.footer { background: linear-gradient(rgba(27,23,71,.93), rgba(18,16,48,.98)), url(../img/pattern.jpg) center/cover no-repeat; }
.copyright { background: var(--ak-ink-2); }
.explore { background: linear-gradient(rgba(27,23,71,.9), rgba(27,23,71,.9)), url(../img/pattern.jpg) center/cover no-repeat; }

/* panels in the checkout / private pages */
.who, .cv-card { background: var(--ak-ink); }
.stepper button, .input-group > .pre { background: var(--ak-ink); }
.ev-hero { background: var(--ak-ink); }
.ev-hero .on-hero { background: linear-gradient(transparent, rgba(27,23,71,.92)); }
.cv-h, .section-title, .form-block h2, .about-box h1, .ctx b, .fact .v, .cat-name, .cv-table th { color: var(--ak-ink); }
.sum-row.total { color: var(--ak-ink); }
.quick button, .more summary { color: var(--ak-ink); }

/* ---------- cards (same look as the "How voting works" cards) ---------- */
.blog .blog-item { display: flex; flex-direction: column; background: #fff; height: 100%; }
.blog .blog-item .blog-content { flex: 1; display: flex; flex-direction: column; }
.blog .blog-item .blog-content .btn { margin-top: auto; align-self: flex-start; }
.blog .blog-item .blog-content .h4, .blog .blog-item .blog-content h4 { color: var(--ak-ink); }
.blog .blog-item a.h4:hover { color: var(--bs-primary); }
.ak-panel { height: 190px; padding: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(rgba(75,34,168,.78), rgba(75,34,168,.78)), url(../img/pattern.jpg) center/cover; }
.ak-panel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ak-panel.tall { height: 250px; }
.ak-panel.tall img { object-position: center top; }
.blog .blog-item:hover .blog-img img { transform: none; }
.blog .blog-item .blog-comment .small { color: #fff; }

/* ---------- flat buttons on the inner pages ---------- */
.ak-flat, body.ak-inner main .btn.btn-primary, body.ak-inner main .btn.btn-dark, body.ak-inner main .btn.btn-light { transform: none !important; border-radius: 6px; }
.ak-flat span, .ak-flat i, body.ak-inner main .btn.btn-primary span, body.ak-inner main .btn.btn-primary i,
body.ak-inner main .btn.btn-dark span, body.ak-inner main .btn.btn-dark i,
body.ak-inner main .btn.btn-light span, body.ak-inner main .btn.btn-light i { transform: none !important; }
.btn.btn-primary.ak-flat:hover, body.ak-inner main .btn.btn-primary:hover { background: var(--ak-ink); color: #fff; }
body.ak-inner main .btn.btn-dark { background: var(--ak-ink); color: #fff; }
body.ak-inner main .btn.btn-dark:hover { background: var(--bs-primary); color: #fff; }
.seg-tpl .btn-dark, body.ak-inner main .seg-tpl .btn.btn-dark { background: var(--bs-light); color: var(--ak-ink); }
.seg-tpl .btn-dark:hover, body.ak-inner main .seg-tpl .btn.btn-dark:hover { background: var(--bs-primary); color: #fff; }
.seg-tpl .btn[aria-pressed="true"], body.ak-inner main .seg-tpl .btn.btn-dark[aria-pressed="true"] { background: var(--bs-primary); color: #fff; }
a.cat-card:hover { background: var(--ak-ink); }

/* =====================================================================
   Colour balance: milk / smoke white carries most of the page.
   Violet = hero and small accents. Midnight ink = footer only.
   ===================================================================== */
:root { --bs-light: #f6f5fa; --ak-smoke: #f6f5fa; --ak-milk: #fcfbf8; --ak-tint: #eeeaf8; }
.bg-light { background-color: var(--ak-smoke) !important; }
body { background: #fff; }

/* header: light */
.header-top { background: #fff; box-shadow: 0 2px 16px rgba(27,23,71,.07); position: relative; z-index: 50; }
.header-top::after, .nav-shaps-1, .nav-shaps-2, .navbar-brand::before, .navbar-brand-2::before { display: none !important; }
.header-top::before { background: var(--ak-smoke); }
.topbar a, .topbar a.text-muted, .topbar .text-body { color: #3d3b57 !important; }
.topbar .login-btn::after { background: var(--bs-primary); }
.navbar .navbar-nav .nav-link, .navbar-light .navbar-nav .nav-link { color: var(--ak-ink); font-weight: 500; }
.navbar-light .navbar-nav .nav-item:hover .nav-link, .navbar-light .navbar-nav .nav-item.active .nav-link { color: var(--bs-primary); }
.navbar-light .navbar-brand img, .navbar-brand img, .navbar-brand-2 img { max-height: 58px; width: auto; }
@media (min-width: 992px) { .navbar .navbar-nav { padding-left: 8px; } }
@media (max-width: 991px) { .navbar .navbar-nav { background: var(--ak-smoke); margin-left: 0; } }

/* page title band: smoke white with a faint pattern */
.bg-breadcrumb { background: linear-gradient(rgba(246,245,250,.93), rgba(246,245,250,.93)), url(../img/pattern.jpg) center/cover no-repeat; border-bottom: 1px solid #e9e6f3; }
.bg-breadcrumb h4 { color: var(--ak-ink) !important; }
.bg-breadcrumb .breadcrumb .breadcrumb-item a { color: var(--ak-ink); }
.bg-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #8f8da6; }

/* about block */
.about { background: var(--ak-smoke); }
@media (min-width: 992px) { .about::before { background: rgba(0,163,196,.10); } }
@media (max-width: 991px) { .about::after { background: rgba(0,163,196,.10); } }
.about .about-content p, .about .about-content .d-flex span { color: #55536e; }
.about .tab-class .nav .nav-item a { box-shadow: 0 2px 10px rgba(27,23,71,.08); }
.about .tab-class .nav .nav-item a.active { color: #fff; }
.about .btn.btn-light { background: #fff; box-shadow: 0 2px 10px rgba(27,23,71,.1); }

/* goal block */
.goal { background: linear-gradient(#f6f5fa, #ffffff); }
.goal::after { background: rgba(0,163,196,.07); }
.goal .goal-item { transform: none; background: #fff; border: 1px solid #e8e4f3; box-shadow: 0 8px 28px rgba(27,23,71,.07); margin: 0 0 16px 0; }
.goal .goal-item h4 { color: var(--ak-ink); }

/* call-to-action band */
.explore { background: linear-gradient(135deg, #e7f6fa, #f1eefb); }
.explore h1 { color: var(--ak-ink); }

/* panels and card bars: soft tint instead of solid violet */
.feature-icon-panel, .ak-panel { background: var(--ak-tint); color: var(--bs-dark); }
.feature-icon-panel .fas { color: var(--bs-dark); }
.blog .blog-item .blog-img::before { background: #e6e0f6; }
.blog .blog-item .blog-img::after { background: rgba(0,163,196,.22); }
.blog-content .blog-comment { background: var(--ak-tint); }
.blog-content .blog-comment div.small, .blog-content .blog-comment span, .blog .blog-item .blog-comment .small { color: var(--ak-ink); }
.ev-logo-box { background: var(--ak-tint); color: var(--bs-dark); }

/* checkout / private page blocks */
.who { background: var(--ak-tint); color: var(--ak-ink); }
.who h1 { color: var(--ak-ink); }
.who .meta { color: #55536e; }
.who-photo { border-color: var(--bs-primary); }
.cv-card { background: var(--ak-tint); color: var(--ak-ink); }
.cv-total { color: var(--ak-ink); }
.cv-rank { color: #55536e; }
.stepper button, .input-group > .pre { background: var(--bs-dark); }

/* contact panel */
.form-section.bg-dark { background: var(--ak-smoke) !important; border: 1px solid #e6e2f1; }
.form-section h1, .form-section p { color: var(--ak-ink); }
.form-section .btn.btn-light { background: #fff; box-shadow: 0 2px 10px rgba(27,23,71,.1); }
.about .tab-class .nav .nav-item a.active span { color: #fff; }

/* ---------- Cookie notice + install prompt ---------- */
.ak-cookie, .ak-install {
  position: fixed; z-index: 1080; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid #e3def2; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(27, 23, 71, .22); padding: 16px 18px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  opacity: 0; transform: translateY(24px); transition: opacity .3s ease, transform .3s ease;
}
.ak-cookie.show, .ak-install.show { opacity: 1; transform: none; }
.ak-cookie-text, .ak-install-text { flex: 1 1 260px; min-width: 0; font-size: 14px; line-height: 1.5; color: #4a4670; }
.ak-cookie-text strong, .ak-install-text strong { display: block; color: #1b1747; font-size: 15px; margin-bottom: 2px; }
.ak-cookie-text span, .ak-install-text span { display: block; }
.ak-cookie-text a { color: #4b22a8; text-decoration: underline; }
.ak-cookie-btns, .ak-install-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.ak-install img { border-radius: 12px; flex: 0 0 48px; }
.ak-install { z-index: 1070; }
.ak-btn { border: 1px solid transparent; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; font-family: inherit; }
.ak-btn-solid { background: #4b22a8; color: #fff; }
.ak-btn-solid:hover { background: #1b1747; }
.ak-btn-ghost { background: #fff; color: #4b22a8; border-color: #d9cbf1; }
.ak-btn-ghost:hover { background: #f3eeff; }
@media (max-width: 575px) {
  .ak-cookie, .ak-install { left: 10px; right: 10px; padding: 14px; gap: 12px; }
  .ak-cookie-btns, .ak-install-btns { width: 100%; }
  .ak-cookie-btns .ak-btn, .ak-install-btns .ak-btn { flex: 1; }
  .ak-install img { flex-basis: 40px; width: 40px; height: 40px; }
  .ak-install-text { flex-basis: calc(100% - 60px); }
}
@media (prefers-reduced-motion: reduce) { .ak-cookie, .ak-install { transition: none; } }
.back-to-top { z-index: 1000; }
