/*
 * Colour chooser on the homepage and favourites/palettes on /colors-lovers/
 * (assets/js/pon-palette.js, written into the pages by tools/build_home_palettes_2026.py).
 */

.pon-pick,
.pon-lib {
    --pon-ink: #1f2a44;
    --pon-line: #e2e5ec;
    color: var(--pon-ink);
    text-align: left;
}

.pon-pick {
    display: grid;
    gap: 18px;
    max-width: 1080px;
    margin: 18px auto 8px;
    padding: 22px;
    border: 1px solid var(--pon-line);
    border-radius: 20px;
    background: #fff;
}

.pon-pick__label,
.pon-lib h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pon-ink);
    text-transform: none;
}

.pon-pick__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.pon-pick__choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 16px 6px 6px;
    border: 2px solid var(--pon-line);
    border-radius: 999px;
    background: #fff;
    color: var(--pon-ink);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.pon-pick__choice[aria-pressed="true"] {
    border-color: var(--pon-ink);
    box-shadow: 0 0 0 2px var(--pon-ink) inset;
}

.pon-pick__dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--c);
}

.pon-pick__choice[aria-pressed="true"] .pon-pick__dot::after {
    content: "\2713";
    display: grid;
    place-items: center;
    height: 100%;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.pon-pick__result {
    display: grid;
    gap: 16px;
    align-items: start;
}

@media (min-width: 760px) {
    .pon-pick__result {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }
}

.pon-swatches {
    display: flex;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
}

.pon-swatches a,
.pon-swatches span {
    flex: 1;
}

.pon-codes {
    display: flex;
    margin-top: 8px;
}

.pon-codes span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font: 600 0.72rem/1.3 ui-monospace, Consolas, monospace;
    color: #4b5563;
    text-align: center;
    text-overflow: ellipsis;
}

.pon-codes small {
    display: block;
    font: 500 0.7rem/1.3 "Segoe UI", Arial, sans-serif;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pon-card-preview {
    position: relative;
    display: block;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3.5 / 2;
    padding: 16px 18px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(31, 42, 68, 0.14);
}

.pon-card-preview b {
    display: block;
    font: 700 1.15rem/1.2 Georgia, serif;
}

.pon-card-preview i {
    display: block;
    margin-top: 4px;
    font: 400 0.8rem/1.4 "Segoe UI", Arial, sans-serif;
    font-style: normal;
}

.pon-card-preview .pon-card-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 22%;
}

.pon-card-preview .pon-card-dot {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.pon-pick__actions,
.pon-lib__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pon-btn-dark,
.pon-btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid var(--pon-ink);
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.pon-btn-dark,
.pon-btn-dark:hover,
.pon-btn-dark:visited {
    background: var(--pon-ink);
    color: #fff;
}

.pon-btn-light {
    background: #fff;
    color: var(--pon-ink);
}

.pon-pick__hint,
.pon-lib__hint {
    margin: 0;
    color: #6b7280;
    font-size: 0.88rem;
}

/* ------------------------------------------------------------ /colors-lovers/ */

.pon-lib {
    display: grid;
    gap: 22px;
    max-width: 1080px;
    margin: 6px auto 26px;
}

.pon-lib__box {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--pon-line);
    border-radius: 18px;
    background: #fff;
}

.pon-lib__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pon-fav-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 4px;
    border: 2px solid var(--pon-line);
    border-radius: 999px;
    background: #fff;
    color: var(--pon-ink);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.pon-fav-chip[aria-pressed="true"] {
    border-color: var(--pon-ink);
}

.pon-fav-chip i {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.pon-fav-chip .pon-fav-remove {
    padding: 0 6px;
    color: #6b7280;
    font-weight: 700;
}

.color-box {
    position: relative;
}

.pon-fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.pon-fav-btn[aria-pressed="true"] {
    color: #e11d48;
}

.pon-toast {
    position: fixed;
    left: 50%;
    bottom: 110px;
    z-index: 9999;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--pon-ink, #1f2a44);
    color: #fff;
    font-size: 0.9rem;
    transform: translateX(-50%);
}

@media (max-width: 600px) {
    .pon-pick {
        padding: 16px;
    }

    .pon-pick__choice {
        padding-right: 12px;
        font-size: 0.85rem;
    }

    .pon-swatches {
        height: 74px;
    }

    .pon-codes span {
        font-size: 0.6rem;
    }
}

/* The theme (static/css/base-theme.css) turns hovered or focused buttons orange on a
   see-through background; keep the chooser's own colours. A [hidden] element stays hidden
   even when its class sets display. */
.pon-pick button:hover,
.pon-pick button:focus,
.pon-lib button:hover,
.pon-lib button:focus,
.color-box .pon-fav-btn:hover,
.color-box .pon-fav-btn:focus {
    color: var(--pon-ink);
}

.pon-pick .pon-pick__choice:hover,
.pon-pick .pon-pick__choice:focus,
.pon-pick .pon-btn-light:hover,
.pon-pick .pon-btn-light:focus,
.pon-lib .pon-btn-light:hover,
.pon-lib .pon-btn-light:focus,
.pon-lib .pon-fav-chip:hover,
.pon-lib .pon-fav-chip:focus {
    background: #f4f5f8;
}

.pon-pick .pon-btn-dark:hover,
.pon-pick .pon-btn-dark:focus,
.pon-lib .pon-btn-dark:hover,
.pon-lib .pon-btn-dark:focus {
    background: #374151;
    color: #fff;
}

.color-box .pon-fav-btn:hover,
.color-box .pon-fav-btn:focus {
    background: #fff;
}

.color-box .pon-fav-btn[aria-pressed="true"],
.color-box .pon-fav-btn[aria-pressed="true"]:hover {
    color: #e11d48;
}

.pon-pick [hidden],
.pon-lib [hidden] {
    display: none !important;
}

