/* GroupBuya rebate redirect portal — warm gateway aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Noto+Sans+HK:wght@400;500;600;700&display=swap');

.gba-rebate-portal {
    --gba-rp-coral: #e85d2c;
    --gba-rp-coral-deep: #c94e22;
    --gba-rp-amber: #f4a261;
    --gba-rp-cream: #fff8f2;
    --gba-rp-ink: #1a1e28;
    --gba-rp-muted: #5c6478;
    --gba-rp-line: rgba(26, 30, 40, 0.08);
    --gba-rp-card: rgba(255, 255, 255, 0.92);
    --gba-rp-shadow: 0 24px 60px rgba(26, 30, 40, 0.12);
    --gba-rp-radius: 1.25rem;
    font-family: 'Noto Sans HK', system-ui, sans-serif;
    color: var(--gba-rp-ink);
    position: relative;
    margin: 0 auto 2.5rem;
    max-width: 44rem;
    animation: gba-rp-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gba-rebate-portal::before {
    content: '';
    position: absolute;
    inset: -2.5rem -1rem auto;
    height: 14rem;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(232, 93, 44, 0.18), transparent 70%),
        radial-gradient(ellipse 70% 50% at 80% 20%, rgba(244, 162, 97, 0.22), transparent 65%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 248, 242, 0.9), transparent);
    pointer-events: none;
    z-index: 0;
}

.gba-rebate-portal > * {
    position: relative;
    z-index: 1;
}

@keyframes gba-rp-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.gba-rebate-portal__debug {
    margin-bottom: 1rem;
    border: 1px dashed rgba(232, 93, 44, 0.45);
    border-radius: 0.75rem;
    background: #fff;
    font-size: 0.75rem;
}

.gba-rebate-portal__debug summary {
    cursor: pointer;
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    color: var(--gba-rp-coral-deep);
    list-style: none;
}

.gba-rebate-portal__debug summary::-webkit-details-marker { display: none; }

.gba-rebate-portal__debug pre {
    margin: 0;
    padding: 0 0.9rem 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--gba-rp-muted);
    font-family: ui-monospace, Consolas, monospace;
}

.gba-rebate-portal__shell {
    background: var(--gba-rp-card);
    border: 1px solid var(--gba-rp-line);
    border-radius: var(--gba-rp-radius);
    box-shadow: var(--gba-rp-shadow);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.gba-rebate-portal__ribbon {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(90deg, rgba(232, 93, 44, 0.12), rgba(244, 162, 97, 0.08));
    border-bottom: 1px solid var(--gba-rp-line);
    font-size: 0.95rem;
    font-weight: 500;
}

.gba-rebate-portal__ribbon-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--gba-rp-coral);
    box-shadow: 0 0 0 4px rgba(232, 93, 44, 0.2);
    animation: gba-rp-pulse 1.4s ease-in-out infinite;
}

@keyframes gba-rp-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.75; }
}

.gba-rebate-portal__body {
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
}

.gba-rebate-portal__merchant {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.gba-rebate-portal__logo {
    width: 5.5rem;
    height: 5.5rem;
    object-fit: contain;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--gba-rp-line);
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(26, 30, 40, 0.08);
}

.gba-rebate-portal__name {
    margin: 0;
    font-family: 'Fraunces', 'Noto Serif TC', serif;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--gba-rp-ink);
}

.gba-rebate-portal__loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin: 0.5rem 0 1rem;
}

.gba-rebate-portal__ring {
    --gba-rp-progress: 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background:
        conic-gradient(var(--gba-rp-coral) calc(var(--gba-rp-progress) * 1%), rgba(232, 93, 44, 0.12) 0);
    display: grid;
    place-items: center;
    animation: gba-rp-spin 1.2s linear infinite;
}

.gba-rebate-portal__ring::after {
    content: '';
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: var(--gba-rp-cream);
}

.gba-rebate-portal__count {
    position: absolute;
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gba-rp-coral-deep);
    line-height: 1;
}

.gba-rebate-portal__ring-wrap {
    position: relative;
    display: grid;
    place-items: center;
}

@keyframes gba-rp-spin {
    to { transform: rotate(360deg); }
}

.gba-rebate-portal__hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gba-rp-muted);
}

.gba-rebate-portal__hint a {
    color: var(--gba-rp-coral-deep);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 78, 34, 0.35);
}

.gba-rebate-portal__hint a:hover {
    color: var(--gba-rp-coral);
}

.gba-rebate-portal__panel {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fff 0%, var(--gba-rp-cream) 100%);
    border: 1px solid var(--gba-rp-line);
    text-align: left;
}

.gba-rebate-portal__panel--warn {
    background: linear-gradient(180deg, #fff9f0 0%, #fff3e6 100%);
    border-color: rgba(244, 162, 97, 0.35);
}

.gba-rebate-portal__panel-title {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.gba-rebate-portal__panel-title i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.gba-rebate-portal__reward {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(232, 93, 44, 0.1);
    color: var(--gba-rp-coral-deep);
    font-weight: 700;
    font-size: 0.95rem;
}

.gba-rebate-portal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.gba-rebate-portal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gba-rebate-portal__btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.gba-rebate-portal__btn--primary {
    background: linear-gradient(135deg, var(--gba-rp-coral), var(--gba-rp-coral-deep));
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(232, 93, 44, 0.28);
}

.gba-rebate-portal__btn--ghost {
    background: #fff;
    color: var(--gba-rp-ink) !important;
    border: 1px solid var(--gba-rp-line);
}

.gba-rebate-portal__btn--soft {
    background: rgba(232, 93, 44, 0.08);
    color: var(--gba-rp-coral-deep) !important;
}

.gba-rebate-portal__steps {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .gba-rebate-portal__steps {
        grid-template-columns: 1fr 1fr;
    }
}

.gba-rebate-portal__step {
    background: #fff;
    border: 1px solid var(--gba-rp-line);
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gba-rebate-portal__step-head {
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, rgba(232, 93, 44, 0.1), transparent);
    border-bottom: 1px solid var(--gba-rp-line);
    font-weight: 700;
    font-size: 0.9rem;
}

.gba-rebate-portal__step-head em {
    font-style: normal;
    color: var(--gba-rp-coral-deep);
}

.gba-rebate-portal__step-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gba-rebate-portal__step-body .btn-primary {
    margin-top: auto;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--gba-rp-coral), var(--gba-rp-coral-deep));
    border: none;
    font-weight: 600;
}

.gba-rebate-portal__terms {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.gba-rebate-portal__terms li {
    position: relative;
    padding: 0.55rem 0 0.55rem 1.5rem;
    border-bottom: 1px solid var(--gba-rp-line);
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--gba-rp-muted);
}

.gba-rebate-portal__terms li:last-child {
    border-bottom: none;
}

.gba-rebate-portal__terms li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: rgba(232, 93, 44, 0.12);
    color: var(--gba-rp-coral-deep);
    font-size: 0.65rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.gba-rebate-portal .alert-danger {
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.gba-rebate-portal .tbluserpointtrx-form .btn-success {
    border-radius: 999px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-weight: 600;
}
