/* Visit payment gateway — Tajawal · RTL */

.pay-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px;
    padding-top: calc(16px + var(--pld-nav-h, 76px));
    background: #050505;
}

.pay-page__back {
    width: 100%;
    max-width: 430px;
    margin-bottom: 8px;
}

.pay-page__back .pld-back-wrap {
    padding: 0;
    margin-bottom: 20px;
}

.payment-wrapper {
    width: 100%;
    max-width: 430px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 38px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    font-family: "Tajawal", system-ui, sans-serif;
}

/* Hero */
.pay-hero {
    padding: 28px 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to bottom, #101010, #0a0a0a);
    text-align: right;
}

.pay-mini {
    color: #b48a4a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 12px;
}

.pay-hero h1 {
    font-size: 36px;
    line-height: 1.1;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.pay-hero__desc {
    color: #9c9c9c;
    line-height: 1.75;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 18px;
}

.pay-hero__desc strong {
    color: #d9b26c;
    font-weight: 700;
}

/* Dog chip */
.pay-dog {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 164, 92, 0.2);
    border-radius: 18px;
    text-align: right;
}

.pay-dog img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(201, 164, 92, 0.3);
}

.pay-dog__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pay-dog__info strong {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.pay-dog__info span {
    font-size: 12px;
    font-weight: 500;
    color: #b48a4a;
    line-height: 1.5;
}

/* Card preview */
.card-preview {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 28px;
    overflow: hidden;
    padding: 24px;
    transition: background 0.35s ease;
    background: linear-gradient(135deg, #191919, #090909);
    border: 1px solid rgba(255, 255, 255, 0.08);
    direction: ltr;
    text-align: left;
}

.card-preview--unknown,
.card-preview.card-preview--unknown {
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
}

.card-preview.visa {
    background: linear-gradient(135deg, #12203b, #07101f);
}

.card-preview.mastercard {
    background: linear-gradient(135deg, #2d1810, #110807);
}

.card-preview.amex {
    background: linear-gradient(135deg, #0e3138, #07191d);
}

.card-preview__glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -70px;
    right: -70px;
    filter: blur(5px);
    pointer-events: none;
}

.card-preview__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 2;
}

.card-preview__chip {
    width: 48px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f2d28a, #b48a4a);
}

.card-preview__brand {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

.card-preview__number {
    position: relative;
    z-index: 2;
    font-size: clamp(20px, 5vw, 28px);
    letter-spacing: 2px;
    margin-bottom: 32px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.card-preview__bottom {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-preview__label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-preview__value {
    font-size: 13px;
    font-weight: 600;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Form */
.pay-form {
    padding: 24px 24px 32px;
}

.pay-section {
    margin-bottom: 22px;
}

.pay-section--card .pay-section__title {
    margin-bottom: 16px;
}

.pay-card-panel {
    background: #0c0c0c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 18px;
    overflow: hidden;
}

.pay-card-panel .card-preview {
    height: 200px;
    margin-bottom: 20px;
    border-radius: 20px;
}

.pay-card-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pay-input--notes {
    min-height: 72px;
    resize: vertical;
}

.pay-section__title {
    font-size: 15px;
    font-weight: 700;
    color: #d9b26c;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pay-field {
    margin-bottom: 16px;
}

.pay-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #d4d4d4;
    display: block;
}

.pay-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pay-input {
    width: 100%;
    height: 56px;
    border-radius: 18px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0 16px;
    color: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    font-family: "Tajawal", sans-serif;
    font-size: 16px;
    font-weight: 500;
}

.pay-input::placeholder {
    color: #666;
}

.pay-input:focus {
    border-color: #b48a4a;
    box-shadow: 0 0 0 4px rgba(180, 138, 74, 0.12);
}

.pay-input.input-validation-error,
.pay-input.pay-invalid {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12) !important;
}

.pay-input.pay-invalid.valid,
.pay-input.pay-invalid.input-validation-valid {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12) !important;
}

.pay-input--expiry {
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.pay-err,
.field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #f87171;
    font-weight: 500;
}

.pay-errors {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
    font-size: 13px;
}

.pay-errors ul {
    margin: 0;
    padding-right: 1.1rem;
}

.validation-summary-valid {
    display: none;
}

.pay-row {
    display: flex;
    gap: 12px;
}

.pay-row .pay-field {
    flex: 1;
    margin-bottom: 0;
}

/* Card number — smart brand detection */
.pay-field--card {
    margin-bottom: 20px;
}

.pay-card-input-wrap {
    position: relative;
    display: block;
    direction: ltr;
    border-radius: 18px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.25s, box-shadow 0.25s;
    overflow: hidden;
}

.pay-card-input-wrap:focus-within {
    border-color: #b48a4a;
    box-shadow: 0 0 0 4px rgba(180, 138, 74, 0.12);
}

.pay-card-input-wrap:has(.pay-invalid) {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.pay-card-input-wrap.has-brand[data-brand="visa"]:focus-within {
    border-color: #4a7ec7;
    box-shadow: 0 0 0 4px rgba(74, 126, 199, 0.15);
}

.pay-card-input-wrap.has-brand[data-brand="mastercard"]:focus-within {
    border-color: #e87b35;
    box-shadow: 0 0 0 4px rgba(232, 123, 53, 0.12);
}

.pay-card-input-wrap.has-brand[data-brand="amex"]:focus-within {
    border-color: #4aa3b5;
    box-shadow: 0 0 0 4px rgba(74, 163, 181, 0.12);
}

.pay-input--card {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 56px;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 16px;
    direction: ltr;
    text-align: left;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.pay-card-input-wrap.has-brand .pay-input--card {
    padding-right: 52px;
}

.pay-input--card:focus {
    border: none;
    box-shadow: none;
}

.pay-card-brands {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.pay-card-brand {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 28px;
}

.pay-card-brand.is-active {
    display: flex;
}

.pay-card-brand iconify-icon {
    display: block;
    line-height: 0;
}

.pay-field-hint {
    margin: 6px 2px 0;
    font-size: 12px;
    font-weight: 500;
    color: #f87171;
    line-height: 1.45;
}

.pay-field-hint[hidden] {
    display: none;
}

.pay-row--card-meta .pay-field {
    margin-bottom: 0;
}

.pay-row--card-meta .pay-field-hint {
    min-height: 16px;
    margin-top: 6px;
}

/* Price */
.price-box {
    margin-top: 8px;
    background: #101010;
    border-radius: 22px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: right;
}

.price-box__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.price-box__title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

.price-box__amount {
    font-size: 28px;
    font-weight: 800;
    color: #d7a45c;
    flex-shrink: 0;
}

.price-box__desc {
    color: #999;
    line-height: 1.75;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

/* Buttons */
.pay-btn {
    width: 100%;
    height: 60px;
    margin-top: 22px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #d7a45c, #b88945);
    color: #000;
    font-family: "Tajawal", sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(183, 137, 69, 0.25);
}

.pay-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pay-btn--ghost {
    margin-top: 16px;
    background: transparent;
    border: 1px solid #b48a4a;
    color: #d7a45c;
}

.pay-btn--ghost:hover {
    background: rgba(180, 138, 74, 0.1);
    box-shadow: none;
}

.pay-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    margin-top: 14px;
    color: #8a8a8a;
    font-size: 12px;
    font-weight: 600;
}

.pay-secure iconify-icon {
    color: #b48a4a;
    flex-shrink: 0;
}

/* Success */
.pay-success {
    padding: 72px 28px 48px;
    text-align: center;
}

.pay-success__icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(183, 137, 69, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 22px;
    font-size: 40px;
    color: #d7a45c;
    font-weight: 700;
}

.pay-success h2 {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 14px;
}

.pay-success p {
    color: #999;
    line-height: 1.85;
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px;
}

.pay-success strong {
    color: #d9b26c;
}

/* Payment failed (temporary issue) */
.pay-failed {
    padding: 72px 28px 48px;
    text-align: center;
}

.pay-failed__icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(220, 80, 70, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 22px;
    font-size: 40px;
    color: #e07068;
    font-weight: 700;
}

.pay-failed h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 14px;
    color: #f0e6dc;
}

.pay-failed p {
    color: #999;
    line-height: 1.85;
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 24px;
}

.pay-failed strong {
    color: #e8a090;
}

.pay-failed .pay-btn {
    margin-bottom: 12px;
}

@media (max-width: 380px) {
    .pay-hero h1 {
        font-size: 30px;
    }

    .card-preview {
        height: 200px;
        padding: 20px;
    }

    .pay-row {
        flex-direction: column;
        gap: 0;
    }

    .pay-row .pay-field {
        margin-bottom: 16px;
    }
}
