/* Shared rules for the smaller pages: about / privacy / terms (marketing) and
   library / support / billing / survey / account / voices (app shell).

   Each of those templates keeps its own `page-*` component classes from
   main.css and app-shell.css; this file only carries what used to be Tailwind
   utilities on them.

   Borders are `border-width` + `border-color` with no `border-style`, which is
   what the `border-*` utilities did. That means they paint on the app pages
   (where app-shell.css's scoped mini-preflight supplies `solid`) and stay
   inert on the marketing pages — matching current behaviour on both. */

/* ---------- shared layout ---------- */

.pg-prose {
    margin-left: auto;
    margin-right: auto;
    max-width: 48rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 640px) {
    .pg-prose {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.pg-mt5 { margin-top: 1.25rem; }

.pg-strong { font-weight: 600; }

.pg-min60 { min-height: 60vh; }

/* Was Tailwind's `hidden` on the signed-out placeholder card. */
.pg-hidden { display: none; }

/* ---------- support form ---------- */

.pg-form > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.pg-label {
    margin-bottom: .375rem;
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgb(63 63 70);
}

.pg-input {
    width: 100%;
    border-radius: 1rem;
    border-width: 1px;
    border-color: rgb(228 228 231);
    padding: .75rem 1rem;
    font-size: 14px;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: .15s;
}

.pg-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 0 #fff, 0 0 0 2px rgb(24 24 27);
}

.pg-textarea {
    min-height: 150px;
    resize: vertical;
}

.pg-submit {
    height: 2.75rem;
    width: 100%;
    border-radius: 1rem;
    background-color: rgb(24 24 27);
    font-size: 14px;
    font-weight: 600;
    color: rgb(255 255 255);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: .15s;
}

.pg-submit:hover { background-color: rgb(0 0 0); }

.pg-submit:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.pg-alert-ok {
    margin-top: 1rem;
    display: none;
    border-radius: 1rem;
    border-width: 1px;
    border-color: rgb(209 250 229);
    background-color: rgb(236 253 245);
    padding: 1rem 1.25rem;
}

.pg-alert-ok.pg-is-shown { display: block; }

.pg-alert-ok-title {
    font-size: 14px;
    font-weight: 600;
    color: rgb(6 95 70);
}

.pg-alert-ok-text {
    margin-top: .25rem;
    font-size: 13px;
    color: rgb(4 120 87);
}

.pg-alert-err {
    margin-top: 1rem;
    display: none;
    border-radius: 1rem;
    border-width: 1px;
    border-color: rgb(254 226 226);
    background-color: rgb(254 242 242);
    padding: 1rem 1.25rem;
    font-size: 13px;
    color: rgb(220 38 38);
}

.pg-alert-err.pg-is-shown { display: block; }

/* ---------- billing ---------- */

.pg-stack > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.pg-card-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.025em;
}

.pg-notice {
    display: flex;
    gap: .75rem;
    border-radius: 1rem;
    border-width: 1px;
    border-color: rgb(254 243 199);
    background-color: rgb(255 251 235);
    padding: .875rem 1rem;
}

.pg-notice-icon {
    margin-top: .125rem;
    flex-shrink: 0;
    color: rgb(217 119 6);
}

.pg-notice-text {
    font-size: 13px;
    color: rgb(146 64 14);
}

.pg-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .pg-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pg-fact {
    display: flex;
    flex-direction: column;
}

.pg-fact-label {
    margin-bottom: .25rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgb(113 113 122);
}

.pg-fact-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: .5rem;
    background-color: rgb(24 24 27);
    padding: .25rem .75rem;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .025em;
    color: rgb(255 255 255);
}

.pg-fact-value {
    font-size: 15px;
    font-weight: 600;
}

.pg-pt2 { padding-top: .5rem; }

.pg-btn-block { width: 100%; }

@media (min-width: 640px) {
    .pg-btn-block { width: auto; }
}

/* Subscription status, coloured by state. */
.pg-status {
    font-size: 15px;
    font-weight: 600;
    text-transform: capitalize;
}

.pg-status--active    { color: rgb(5 150 105); }
.pg-status--cancelled { color: rgb(217 119 6); }
.pg-status--ended     { color: rgb(220 38 38); }

/* ---------- library ---------- */

.pg-skeleton {
    animation: pg-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes pg-pulse {
    50% { opacity: .5; }
}

.pg-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, .4);
    padding: 1rem;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.pg-modal.pg-is-open { display: flex; }

.pg-modal-dialog {
    width: 100%;
    max-width: 24rem;
    border-radius: 1rem;
    background-color: rgb(255 255 255);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}

.pg-mt4 { margin-top: 1rem; }

.pg-flex1 { flex: 1 1 0%; }

/* ---------- voices ---------- */

.pg-voice-filters {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

@media (min-width: 640px) {
    .pg-voice-filters { flex-direction: row; }
}

.pg-lang-trigger {
    display: flex;
    height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-radius: .75rem;
    border-width: 1px;
    border-color: rgb(228 228 231);
    background-color: rgb(255 255 255);
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: left;
    font-size: 14px;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: .15s;
}

.pg-lang-trigger:hover { border-color: rgb(212 212 216); }

@media (min-width: 640px) {
    .pg-lang-trigger { width: 220px; }
}

.pg-icon-muted { color: rgb(161 161 170); }

.pg-search-wrap {
    position: relative;
    flex: 1 1 0%;
}

.pg-search-icon {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translate(0, -50%);
    color: rgb(161 161 170);
}

.pg-search-input {
    height: 2.75rem;
    width: 100%;
    border-radius: .75rem;
    background-color: rgb(244 244 245);
    padding-left: 2.5rem;
    padding-right: .75rem;
    font-size: 14px;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.pg-search-input:focus {
    box-shadow: 0 0 0 0 #fff, 0 0 0 2px rgba(24, 24, 27, .1);
}

.pg-gender-row {
    display: flex;
    gap: .25rem;
}

/* `voice-gender-btn` is also the script's hook; `is-on` marks the active one. */
.pg-gender-btn {
    height: 2.75rem;
    border-radius: .75rem;
    background-color: rgb(244 244 245);
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 13px;
    font-weight: 500;
    color: rgb(82 82 91);
}

.pg-gender-btn:hover { background-color: rgb(228 228 231); }

.pg-voice-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: .75rem;
}

@media (min-width: 640px) {
    .pg-voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .pg-voice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pg-voice-empty {
    display: none;
    padding-top: 5rem;
    padding-bottom: 5rem;
    text-align: center;
    font-size: 14px;
    color: rgb(113 113 122);
}

.pg-voice-empty.pg-is-shown { display: block; }

.pg-pop-head {
    border-bottom-width: 1px;
    border-color: rgb(244 244 245);
    padding: .5rem;
}

.pg-pop-search {
    height: 2.25rem;
    width: 100%;
    border-radius: .5rem;
    background-color: rgb(244 244 245);
    padding-left: .75rem;
    padding-right: .75rem;
    font-size: 13px;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.pg-pop-list {
    max-height: 320px;
    overflow-y: auto;
    padding-top: .25rem;
    padding-bottom: .25rem;
    font-size: 13px;
}

.pg-spinner-tiny {
    display: block;
    height: .875rem;
    width: .875rem;
    animation: pg-spin 1s linear infinite;
    border-radius: 9999px;
    border-width: 2px;
    border-color: rgb(161 161 170);
    border-top-color: rgb(39 39 42);
}

@keyframes pg-spin {
    to { transform: rotate(1turn); }
}

/* `lang-opt` is also the script's hook. */
.lang-opt {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    text-align: left;
    color: rgb(63 63 70);
}

.lang-opt:hover { background-color: rgb(250 250 250); }

.lang-opt--selected {
    font-weight: 600;
    color: rgb(24 24 27);
}

.pg-voice-none {
    grid-column: 1/-1;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
    font-size: 13px;
    color: rgb(161 161 170);
}

.pg-voice-play {
    display: grid;
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    place-items: center;
    border-radius: 9999px;
    background-color: rgb(24 24 27);
    color: rgb(255 255 255);
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: .15s;
}

.pg-voice-play:hover { background-color: rgb(0 0 0); }

.pg-voice-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    background-color: rgb(255 255 255);
    padding: 1rem;
}

.pg-voice-body {
    min-width: 0;
    flex: 1 1 0%;
}

.pg-voice-headline {
    display: flex;
    align-items: center;
    gap: .375rem;
}

.pg-voice-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.pg-voice-meta {
    margin-top: .125rem;
    font-size: 12px;
    color: rgb(113 113 122);
}
