:root {
    --pgs-public-bg: linear-gradient(180deg, #f4f7fb 0%, #eef2f7 100%);
    --pgs-public-accent: #0f766e;
    --pgs-public-accent-dark: #115e59;
    --pgs-public-text: #0f172a;
    --pgs-public-muted: #475569;
    --pgs-public-card: #ffffff;
    --pgs-public-border: rgba(15, 23, 42, 0.08);
    --pgs-public-soft: #f8fafc;
}

body.pgs-public-body {
    min-height: 100vh;
    background: var(--pgs-public-bg);
    color: var(--pgs-public-text);
}

@keyframes pgs-attention-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    50% {
        transform: translateX(4px);
    }
    75% {
        transform: translateX(-2px);
    }
}

.pgs-public-shell {
    max-width: 560px;
}

.pgs-public-shell--commerce {
    max-width: 1080px;
}

.pgs-public-kicker {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pgs-public-accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pgs-public-lead {
    max-width: 720px;
    margin: 0 auto;
    color: var(--pgs-public-muted);
}

.pgs-public-card {
    border: 1px solid var(--pgs-public-border);
    border-radius: 1.2rem;
    background: var(--pgs-public-card);
}

.pgs-pay-mobile-shell,
.pgs-invoice-shell {
    overflow: hidden;
}

.pgs-card-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pgs-public-accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pgs-mobile-search {
    display: grid;
    gap: 0.85rem;
}

.pgs-mobile-search__input {
    min-height: 3.5rem;
    border-radius: 999px;
    padding-inline: 1.15rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.pgs-mobile-search__button {
    min-height: 3rem;
    border-radius: 999px;
    font-weight: 700;
}

.pgs-payment-methods {
    display: grid;
    gap: 0.9rem;
}

.pgs-payment-methods.is-attention {
    animation: pgs-attention-shake 0.34s ease;
}

.pgs-payment-methods__list {
    display: grid;
    gap: 0.9rem;
}

.pgs-payment-method {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.95rem;
    background: #fff;
    font-weight: 600;
    color: var(--pgs-public-text);
}

.pgs-payment-method.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8fafc;
}

.pgs-payment-method input {
    margin: 0;
}

.pgs-payment-method input:disabled {
    cursor: not-allowed;
}

.pgs-payment-method__icon {
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 1.4rem;
    border-radius: 0.4rem;
    display: inline-block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70% 70%;
}

.pgs-payment-method__icon--qris {
    background-color: rgba(15, 118, 110, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6'/%3E%3Crect x='14' y='4' width='6' height='6'/%3E%3Crect x='4' y='14' width='6' height='6'/%3E%3Cpath d='M14 14h3v3'/%3E%3Cpath d='M20 14v6h-6'/%3E%3C/svg%3E");
}

.pgs-payment-method__icon--gopay {
    background-color: rgba(2, 132, 199, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10a3 3 0 0 1 3 3v1H4v-1a3 3 0 0 1 3-3Z'/%3E%3Cpath d='M4 11h16v3a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z'/%3E%3Cpath d='M16 17v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-2'/%3E%3C/svg%3E");
}

.pgs-payment-method__icon--va {
    background-color: rgba(217, 119, 6, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M7 15h4'/%3E%3C/svg%3E");
}

.pgs-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.pgs-summary-list {
    display: grid;
    gap: 0;
}

.pgs-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.pgs-summary-line:last-child {
    border-bottom: 0;
}

.pgs-summary-line span {
    color: var(--pgs-public-muted);
    font-size: 0.9rem;
}

.pgs-summary-line strong {
    font-size: 0.95rem;
    font-weight: 700;
    text-align: right;
}

.pgs-summary-pill,
.pgs-detail-tile {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: var(--pgs-public-soft);
    padding: 0.9rem 0.95rem;
}

.pgs-summary-pill span,
.pgs-detail-tile__label {
    display: block;
    font-size: 0.76rem;
    color: var(--pgs-public-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
}

.pgs-summary-pill strong,
.pgs-detail-tile__value {
    font-size: 0.98rem;
    font-weight: 700;
    word-break: break-word;
}

.pgs-invoice-list {
    display: grid;
    gap: 0.85rem;
}

.pgs-invoice-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.15rem;
    background: #fff;
    padding: 1rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pgs-invoice-card.is-active {
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

.pgs-invoice-card.is-settled {
    border-color: rgba(22, 163, 74, 0.22);
}

.pgs-invoice-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.pgs-invoice-card__ref {
    font-weight: 700;
    font-size: 1rem;
}

.pgs-invoice-card__period {
    color: var(--pgs-public-muted);
    font-size: 0.92rem;
}

.pgs-invoice-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.42rem 0;
    border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.pgs-invoice-card__meta:first-of-type {
    border-top: 0;
}

.pgs-invoice-card__hint {
    margin-top: 0.7rem;
    color: var(--pgs-public-accent-dark);
    font-size: 0.84rem;
}

.pgs-pay-btn {
    min-height: 3rem;
    border-radius: 0.9rem;
    font-weight: 700;
}

.pgs-inline-legal {
    color: var(--pgs-public-muted);
    font-size: 0.8rem;
    line-height: 1.65;
    text-align: center;
}

.pgs-inline-legal--compact {
    margin-top: 0.7rem;
}

.pgs-inline-legal a {
    color: var(--pgs-public-accent-dark);
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.pgs-payment-state {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: var(--pgs-public-soft);
}

.pgs-payment-state.is-pending {
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(245, 158, 11, 0.08);
}

.pgs-payment-state.is-paid {
    border-color: rgba(2, 132, 199, 0.18);
    background: rgba(14, 165, 233, 0.08);
}

.pgs-payment-state.is-success {
    border-color: rgba(22, 163, 74, 0.2);
    background: rgba(22, 163, 74, 0.08);
}

.pgs-payment-state.is-error {
    border-color: rgba(220, 38, 38, 0.16);
    background: rgba(239, 68, 68, 0.08);
}

.pgs-payment-state__badge {
    min-width: 76px;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--pgs-public-accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pgs-payment-state__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.3rem;
}

.pgs-payment-state__text {
    color: var(--pgs-public-muted);
}

.pgs-payment-state__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    margin-top: 0.8rem;
    font-size: 0.86rem;
    color: var(--pgs-public-muted);
}

.pgs-payment-state__summary strong {
    color: var(--pgs-public-text);
}

.pgs-qris-meta {
    margin-top: 1rem;
}

.pgs-snap-container {
    min-height: 360px;
    margin-top: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--pgs-public-soft);
    padding: 0.9rem;
}

.pgs-snap-container--standby {
    min-height: 320px;
}

.pgs-payment-modal {
    border: 1px solid var(--pgs-public-border);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.pgs-payment-modal .modal-body {
    padding: 1rem 1rem 1.25rem;
}

.pgs-payment-modal .pgs-snap-container {
    background: #fff;
}

.pgs-paid-info-modal {
    border: 1px solid var(--pgs-public-border);
    border-radius: 1.2rem;
}

.pgs-paid-info-modal__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.pgs-snap-embed-node {
    min-height: 320px;
}

.pgs-empty-state {
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: 1rem;
    background: var(--pgs-public-soft);
    padding: 1.35rem;
    text-align: center;
}

.pgs-empty-state--success {
    border-color: rgba(22, 163, 74, 0.18);
    background: rgba(22, 163, 74, 0.08);
}

.pgs-empty-state__title {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.pgs-empty-state__text {
    color: var(--pgs-public-muted);
}

.pgs-commerce-stack {
    display: grid;
    gap: 0.85rem;
}

.pgs-commerce-section {
    overflow: hidden;
}

.pgs-commerce-option-row {
    --pgs-option-columns: 1;
    --pgs-option-min: 180px;
    display: grid;
    grid-template-columns: repeat(var(--pgs-option-columns), minmax(var(--pgs-option-min), 1fr));
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.pgs-commerce-option-row--slot {
    --pgs-option-min: 126px;
}

.pgs-commerce-option-shell {
    position: relative;
    min-width: 0;
    height: 100%;
}

.pgs-commerce-option {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pgs-commerce-option:hover:not(:disabled) {
    border-color: rgba(15, 118, 110, 0.3);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.08);
    transform: translateY(-1px);
}

.pgs-commerce-option.is-active {
    border-color: rgba(15, 118, 110, 0.42);
    box-shadow: 0 16px 32px rgba(15, 118, 110, 0.1);
}

.pgs-commerce-option:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.pgs-commerce-option__head {
    display: grid;
    gap: 1rem;
    min-height: 100%;
    align-content: space-between;
}

.pgs-commerce-option__title {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.pgs-commerce-option__sub {
    margin-top: 0.35rem;
    color: var(--pgs-public-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.pgs-commerce-option__price {
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.98rem;
}

.pgs-commerce-option--product {
    display: flex;
    min-height: 138px;
    height: 100%;
    padding-top: 2rem;
}

.pgs-commerce-option--recommended {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, #fff 100%);
}

.pgs-commerce-option--unsupported {
    border-color: rgba(217, 119, 6, 0.2);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.pgs-commerce-option--product .pgs-commerce-option__head {
    width: 100%;
}

.pgs-commerce-option--product .pgs-commerce-option__sub {
    min-height: calc(1.45em * 3);
}

.pgs-commerce-option__status {
    margin-top: 0.65rem;
    color: #b45309;
    font-size: 0.78rem;
    line-height: 1.45;
}

.pgs-commerce-option__detail {
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    z-index: 2;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.55rem 0.55rem 0.3rem 0.55rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--pgs-public-accent-dark);
    padding: 0.18rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.pgs-commerce-option__detail:hover,
.pgs-commerce-option__detail:focus {
    border-color: rgba(15, 118, 110, 0.32);
    background: #fff;
}

.pgs-commerce-option__badge {
    position: absolute;
    top: 0.65rem;
    left: 0.75rem;
    z-index: 2;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    padding: 0.18rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.pgs-commerce-option--slot {
    padding: 0.9rem 0.85rem;
}

.pgs-commerce-option--slot .pgs-commerce-option__head {
    gap: 0.85rem;
}

.pgs-commerce-option--slot .pgs-commerce-option__title {
    font-size: 1rem;
}

.pgs-commerce-option__facts {
    display: grid;
    gap: 0.24rem;
    margin-top: 0.55rem;
}

.pgs-commerce-option__fact {
    color: var(--pgs-public-muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.pgs-commerce-option__fact--unavailable {
    color: #94a3b8;
}

.pgs-commerce-option__footer {
    display: grid;
    gap: 0.15rem;
    padding-top: 0.7rem;
    border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.pgs-commerce-option__label {
    color: var(--pgs-public-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pgs-commerce-form-grid {
    display: grid;
    gap: 1rem;
}

.pgs-commerce-field .form-label {
    font-weight: 600;
    color: var(--pgs-public-text);
}

.pgs-commerce-field .form-control {
    min-height: 3.2rem;
    border-radius: 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.pgs-commerce-field .form-control.is-attention {
    border-color: rgba(217, 119, 6, 0.55);
    box-shadow: 0 0 0 0.24rem rgba(245, 158, 11, 0.16);
    background: #fffdf7;
}

.pgs-commerce-summary-card {
    display: grid;
    gap: 0.4rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: #fff;
    padding: 0.2rem 1rem;
}

.pgs-commerce-summary-meta,
.pgs-commerce-meta-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pgs-commerce-detail-modal {
    border: 1px solid var(--pgs-public-border);
    border-radius: 1.25rem;
}

.pgs-commerce-detail-grid {
    display: grid;
    gap: 1rem;
}

.pgs-commerce-detail-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: var(--pgs-public-soft);
    padding: 1rem;
}

.pgs-commerce-detail-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
    color: var(--pgs-public-text);
}

.pgs-commerce-detail-feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.9rem;
    background: #fff;
}

.pgs-commerce-detail-feature.is-unavailable {
    color: #94a3b8;
    background: #f8fafc;
    border-style: dashed;
}

.pgs-commerce-detail-feature__icon {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 118, 110, 0.12);
    color: var(--pgs-public-accent-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pgs-commerce-detail-feature.is-unavailable .pgs-commerce-detail-feature__icon {
    background: rgba(148, 163, 184, 0.16);
    color: #94a3b8;
}

.pgs-commerce-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.pgs-commerce-chip {
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--pgs-public-accent-dark);
    padding: 0.42rem 0.75rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.pgs-commerce-recovery {
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 1rem;
    background: rgba(245, 158, 11, 0.08);
    padding: 1rem;
}

.pgs-commerce-recovery__title {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.pgs-commerce-recovery__text,
.pgs-commerce-recovery__meta {
    color: var(--pgs-public-muted);
    font-size: 0.92rem;
}

.pgs-commerce-recovery__meta strong {
    color: var(--pgs-public-text);
}

.pgs-commerce-recovery__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.pgs-result-card {
    max-width: 860px;
    margin: 0 auto;
}

.pgs-result-icon {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.pgs-result-icon.is-success {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.pgs-result-icon.is-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.btn-primary {
    background-color: var(--pgs-public-accent);
    border-color: var(--pgs-public-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--pgs-public-accent-dark);
    border-color: var(--pgs-public-accent-dark);
}

@media (max-width: 767.98px) {
    .pgs-payment-modal .modal-body {
        padding-inline: 0.85rem;
        padding-bottom: 1rem;
    }

    .pgs-public-shell {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    .pgs-public-shell {
        max-width: 100%;
    }

    .pgs-lookup-form .input-group {
        flex-direction: column;
    }

    .pgs-lookup-form .btn {
        width: 100%;
    }

    .pgs-payment-state {
        grid-template-columns: 1fr;
    }

    .pgs-payment-state__badge {
        min-width: 0;
        width: fit-content;
    }

    .pgs-snap-container {
        min-height: 300px;
    }

    .pgs-commerce-option-row {
        --pgs-option-min: 220px;
    }

    .pgs-commerce-option-row--slot {
        --pgs-option-min: 150px;
    }

    .pgs-commerce-summary-meta,
    .pgs-commerce-meta-grid {
        grid-template-columns: 1fr;
    }

}

@media (min-width: 768px) {
    .pgs-commerce-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pgs-commerce-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
