/* Order page — Hometopup-aligned chrome (inputs, deskripsi, paket tabs, WA) */

.buy-order-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 11.5rem;
}

.buy-order-main,
.buy-order-aside {
    width: 100%;
    min-width: 0;
}

.buy-order-aside {
    display: none;
}

.buy-order-bar {
    display: block;
}

.ht-order-page {
    background: transparent;
}

.ht-order-hero {
    background: hsl(var(--background) / 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ht-order-identity {
    justify-content: center;
    text-align: center;
    width: 100%;
}

.ht-order-identity__thumb {
    width: 100%;
}

.ht-order-identity__img {
    margin-bottom: 0;
}

.ht-order-identity__text {
    width: 100%;
    max-width: min(100%, 20rem);
    min-width: 0;
    margin-top: -3.5rem;
    padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .ht-order-identity {
        justify-content: flex-start;
        text-align: left;
    }

    .ht-order-identity__thumb {
        width: auto;
    }

    .ht-order-identity__img {
        margin-bottom: -5rem;
    }

    .ht-order-identity__text {
        width: 100%;
        max-width: none;
        margin-top: 0;
        padding-bottom: 0;
    }
}

.ht-order-card {
    background: hsl(var(--background) / 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ht-order-card > .bg-muted,
.ht-order-card > [class*="rounded-t-xl"] {
    background-color: hsl(var(--muted) / 0.38) !important;
}

.ht-order-bar {
    background: hsl(var(--secondary) / 0.52);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid hsl(var(--border) / 0.45);
}

@media (min-width: 1024px) {
    .buy-order-layout {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
        gap: 2rem;
        align-items: start;
        padding-bottom: 0;
    }

    .buy-order-aside {
        display: block;
    }

    .buy-order-bar {
        display: none;
    }
}

.bg-my-color {
    background-color: hsl(var(--my-color, var(--primary)));
}

#orderQty::-webkit-outer-spin-button,
#orderQty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#orderQty {
    -moz-appearance: textfield;
}

main:has(.buy-order-layout) a[aria-label="Chat WhatsApp"] {
    bottom: 9.5rem;
}

@media (min-width: 1024px) {
    main:has(.buy-order-layout) a[aria-label="Chat WhatsApp"] {
        bottom: 1.5rem;
    }
}

.ht-order-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    border-radius: 9999px;
    border: 0;
    background: hsl(var(--muted) / 0.45);
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    color: hsl(var(--foreground));
}

.ht-order-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.ht-order-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--my-color, var(--primary)));
}

.ht-order-input:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

input.ht-order-input::-webkit-outer-spin-button,
input.ht-order-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input.ht-order-input[type='number'] {
    -moz-appearance: textfield;
}

select.ht-order-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.game-deskripsi__card {
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted));
    box-shadow: 0 1px 2px hsl(var(--foreground) / 0.04);
    overflow: hidden;
}

.game-deskripsi__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--card-foreground));
    background: transparent;
    cursor: pointer;
}

.game-deskripsi__toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.game-deskripsi__chevron {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: hsl(var(--muted-foreground));
    transition: transform 0.2s ease;
}

.game-deskripsi__toggle[aria-expanded='true'] .game-deskripsi__chevron {
    transform: rotate(180deg);
}

.game-deskripsi__body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
    max-height: 2000px;
    opacity: 1;
    padding: 0 1rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.625;
}

.game-deskripsi__body.is-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.buy-paket-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.35);
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.buy-paket-tab {
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 9999px;
    border: 0;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.buy-paket-tab:hover {
    background: hsl(var(--muted));
}

.buy-paket-tab.is-active {
    background: hsl(var(--my-color, var(--primary)));
    color: #fff;
    box-shadow: 0 1px 2px hsl(var(--foreground) / 0.12);
}

.buy-paket-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buy-paket-title__icon {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
}

.buy-paket-section.is-hidden {
    display: none !important;
}

.buy-paket-section + .buy-paket-section {
    margin-top: 1.5rem;
}

.legacy-phone-input {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 9999px;
    overflow: hidden;
    background: hsl(var(--muted));
}

.legacy-phone-input:focus-within {
    box-shadow: 0 0 0 2px hsl(var(--my-color, var(--primary)));
}

.legacy-phone-input__prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 0.75rem;
    background: transparent;
}

.legacy-phone-input__prefix .legacy-id-flag--rect {
    width: 1.25rem;
    height: auto;
    aspect-ratio: 3 / 2;
}

.legacy-phone-input__field {
    min-width: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.legacy-phone-input__field:focus {
    outline: none;
    box-shadow: none !important;
}

.account-target-history {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed hsl(var(--border) / 0.35);
}

.account-target-history__label {
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
}

.account-target-history__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-target-history__item {
    border: 1px solid hsl(var(--border) / 0.45);
    background: hsl(var(--muted) / 0.45);
    color: hsl(var(--foreground));
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    line-height: 1.3;
    cursor: pointer;
}

.ht-pay {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ht-pay-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.6rem;
    text-align: left;
    cursor: pointer;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border) / 0.45);
    background: hsl(var(--background) / 0.32);
    color: hsl(var(--card-foreground));
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ht-pay-card:hover {
    box-shadow: 0 0 0 2px hsl(var(--my-color, var(--primary)));
}

.ht-pay-card.is-selected {
    border-color: transparent;
    box-shadow: 0 0 0 2px hsl(var(--my-color, var(--primary)));
}

.ht-pay-card--wide {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    padding: 0.7rem 0.8rem;
}

.ht-pay-card__logo {
    max-height: 1.25rem;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ht-pay-card__logo--wide {
    max-height: 1.6rem;
    max-width: 4.75rem;
    flex-shrink: 0;
}

.ht-pay-card__copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.1rem;
}

.ht-pay-card__name {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
}

.ht-pay-card__price {
    font-size: 0.7rem;
    font-weight: 600;
    color: hsl(var(--my-color, var(--primary)));
    white-space: nowrap;
}

.ht-pay-card--wide .ht-pay-card__price {
    margin-left: auto;
    flex-shrink: 0;
}

.ht-pay-card__hint {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
    font-style: italic;
    color: hsl(var(--muted-foreground));
}

.ht-pay-group {
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border) / 0.5);
    background: hsl(var(--muted) / 0.32);
}

.ht-pay-group__head {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.5rem 0.7rem;
    text-align: left;
    cursor: pointer;
    background: transparent;
    color: hsl(var(--card-foreground));
}

.ht-pay-group__title {
    flex-shrink: 0;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
}

.ht-pay-group__logos {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, #000 78%, transparent);
}

.ht-pay-group__logo {
    height: 0.95rem;
    width: auto;
    max-width: 1.7rem;
    flex-shrink: 0;
    object-fit: contain;
}

.ht-pay-group__logo:nth-child(n + 5) {
    display: none;
}

.ht-pay-group__chevron {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: hsl(var(--muted-foreground));
    transition: transform 0.2s ease;
}

.ht-pay-group__head[aria-expanded='true'] .ht-pay-group__chevron {
    transform: rotate(180deg);
}

.ht-pay-group__body {
    padding: 0 0.55rem 0.55rem;
}

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

@media (min-width: 480px) {
    .ht-pay-card--wide .ht-pay-card__price {
        margin-left: auto;
    }

    .ht-pay-group__title {
        max-width: none;
        font-size: 0.8125rem;
    }

    .ht-pay-group__logo:nth-child(n + 5) {
        display: block;
    }
}

@media (min-width: 640px) {
    .ht-pay-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .ht-pay-card {
        padding: 0.7rem;
        gap: 0.3rem;
    }

    .ht-pay-card__logo {
        max-height: 1.5rem;
    }
}

.swal2-container {
    z-index: 80 !important;
}

.order-swal.swal2-popup {
    width: min(100% - 1.5rem, 22.5rem) !important;
    padding: 1.1rem 1.05rem 1rem !important;
    border-radius: 1rem !important;
    border: 1px solid hsl(var(--border)) !important;
    background: hsl(var(--card)) !important;
    color: hsl(var(--foreground)) !important;
    box-shadow: 0 24px 50px -18px hsl(var(--foreground) / 0.35) !important;
}

.order-swal .swal2-title,
.order-swal__title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: hsl(var(--foreground)) !important;
}

.order-swal .swal2-html-container,
.order-swal__html {
    margin: 0.55rem 0 0 !important;
    padding: 0 !important;
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
    color: hsl(var(--muted-foreground)) !important;
}

.order-swal__summary {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--border) / 0.5);
    background: hsl(var(--muted));
    text-align: left;
}

.order-swal__row {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.3rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.order-swal__label {
    color: hsl(var(--muted-foreground));
}

.order-swal__value {
    color: hsl(var(--foreground));
    font-weight: 600;
    word-break: break-word;
}

.order-swal .swal2-icon {
    margin: 0.1rem auto 0.4rem !important;
    transform: scale(0.82);
    transform-origin: center;
}

.order-swal .swal2-icon.swal2-success {
    border-color: hsl(var(--my-color, var(--primary))) !important;
    color: hsl(var(--my-color, var(--primary))) !important;
}

.order-swal .swal2-success-ring {
    border-color: hsl(var(--my-color, var(--primary)) / 0.35) !important;
}

.order-swal .swal2-success-line-tip,
.order-swal .swal2-success-line-long {
    background-color: hsl(var(--my-color, var(--primary))) !important;
}

.order-swal .swal2-success-fix,
.order-swal .swal2-success-circular-line-left,
.order-swal .swal2-success-circular-line-right {
    background-color: hsl(var(--card)) !important;
}

.order-swal .swal2-icon.swal2-error {
    border-color: hsl(var(--destructive, 0 84% 60%)) !important;
    color: hsl(var(--destructive, 0 84% 60%)) !important;
}

.order-swal .swal2-x-mark-line-left,
.order-swal .swal2-x-mark-line-right {
    background-color: hsl(var(--destructive, 0 84% 60%)) !important;
}

.order-swal .swal2-icon.swal2-warning {
    border-color: hsl(var(--my-color, var(--primary))) !important;
    color: hsl(var(--my-color, var(--primary))) !important;
}

.order-swal .swal2-icon.swal2-warning .swal2-icon-content {
    color: hsl(var(--my-color, var(--primary))) !important;
}

.order-swal .swal2-actions {
    width: 100% !important;
    margin: 0.9rem 0 0 !important;
    gap: 0.5rem !important;
}

.order-swal__btn {
    flex: 1;
    margin: 0 !important;
    min-height: 2.35rem;
    padding: 0.5rem 0.85rem !important;
    border: 0 !important;
    border-radius: 0.5rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.order-swal__btn--confirm {
    background: hsl(var(--my-color, var(--primary))) !important;
    color: #fff !important;
}

.order-swal__btn--cancel {
    background: hsl(var(--muted)) !important;
    color: hsl(var(--foreground)) !important;
    border: 1px solid hsl(var(--border)) !important;
}

.order-swal--loading .swal2-title {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

.order-swal--loading .swal2-loader {
    border-color: hsl(var(--my-color, var(--primary)) / 0.25) !important;
    border-right-color: hsl(var(--my-color, var(--primary))) !important;
}

.ht-reviews__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ht-reviews__score {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.ht-reviews__stars {
    display: flex;
}

.ht-reviews__meta,
.ht-reviews__empty,
.ht-reviews__when,
.ht-reviews__text {
    font-size: 0.72rem;
    color: hsl(var(--muted-foreground));
}

.ht-reviews__list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 16rem;
    overflow: auto;
}

.ht-reviews__item {
    border-radius: 0.65rem;
    border: 1px solid hsl(var(--border) / 0.4);
    background: hsl(var(--background) / 0.28);
    padding: 0.6rem 0.7rem;
}

.ht-reviews__item-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.ht-reviews__who {
    font-size: 0.72rem;
    font-weight: 600;
}

.ht-reviews__text {
    margin: 0.35rem 0 0;
    color: hsl(var(--foreground) / 0.9);
}
