/* ============================================================
   PrimWash DEMO - Zahlungsseite
   Design basierend auf prim-wash.de + Demo-Banner
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #007cfb;
    --primary-dark: #006edc;
    --primary-light: #e8f4ff;
    --navy: #031246;
    --text: #3a4268;
    --text-light: #6b7280;
    --bg: #f3f4f8;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --success-dark: #059669;
    --error: #ef4444;
    --demo-orange: #f59e0b;
    --demo-orange-dark: #d97706;
    --demo-bg: #fffbeb;
    --shadow: 0 4px 24px rgba(0, 124, 251, 0.10);
    --shadow-lg: 0 8px 40px rgba(0, 124, 251, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- SVG Global Fix (iOS) ---------- */
svg {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: 'Montserrat', 'Lato', sans-serif;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

/* ---------- Layout ---------- */
.page-wrapper {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}

/* ---------- DEMO Banner ---------- */
.demo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 12px 0 0;
    background: linear-gradient(135deg, var(--demo-orange), var(--demo-orange-dark));
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    animation: demoPulse 3s ease-in-out infinite;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

.demo-banner__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.demo-banner__text {
    font-weight: 600;
}

@keyframes demoPulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3); }
    50%      { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5); }
}

/* ---------- Header ---------- */
.header {
    text-align: center;
    padding: 24px 0;
}

/* ---------- Dual Logo Layout ---------- */
.header__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.header__logo {
    height: 44px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.header__box-badge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #e91e9a, #00d26a, #007cfb, #e91e9a);
    background-size: 400% 400%;
    animation: powerschaum 4s ease infinite;
    box-shadow:
        0 0 20px rgba(233, 30, 154, 0.3),
        0 0 40px rgba(0, 210, 106, 0.15),
        0 0 60px rgba(0, 124, 251, 0.1);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
}

/* Staubsauger-Variante: andere Gradient-Farben */
.header__box-badge--sauger {
    background: linear-gradient(135deg, #007cfb, #6366f1, #a855f7, #007cfb);
    background-size: 400% 400%;
    box-shadow:
        0 0 20px rgba(0, 124, 251, 0.3),
        0 0 40px rgba(99, 102, 241, 0.15),
        0 0 60px rgba(168, 85, 247, 0.1);
}

.header__box-badge--sauger::before {
    background: linear-gradient(135deg, #007cfb, #6366f1, #a855f7, #007cfb) !important;
}

.header__box-badge::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e91e9a, #00d26a, #007cfb, #e91e9a);
    background-size: 400% 400%;
    animation: powerschaum 4s ease infinite;
    z-index: -1;
    filter: blur(12px);
    opacity: 0.6;
}

.header__box-badge svg {
    display: none;
}

.header__box-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.header__box-number {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: boxPulse 2s ease-in-out infinite;
}

@keyframes powerschaum {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 50% 100%; }
    50%  { background-position: 100% 50%; }
    75%  { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

@keyframes boxPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

/* duplicate removed */

/* ---------- Main Card ---------- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-bottom: 16px;
}

.card__title {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.card__subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ---------- Amount Selection ---------- */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.amount-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.amount-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.amount-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 124, 251, 0.15);
}

.amount-btn__value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.amount-btn__currency {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.amount-btn__check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    display: none;
    align-items: center;
    justify-content: center;
}

.amount-btn.selected .amount-btn__check {
    display: flex;
}

.amount-btn__check svg {
    width: 14px !important;
    height: 14px !important;
    color: white;
}

/* ---------- Notice (Hinweis) ---------- */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.notice--demo {
    background: #fef3cd;
    border: 2px solid var(--demo-orange);
}

.notice__icon {
    flex-shrink: 0;
    color: #f59e0b;
    margin-top: 1px;
}

.notice__icon svg {
    width: 22px !important;
    height: 22px !important;
}

.notice__text {
    font-size: 0.84rem;
    line-height: 1.5;
    color: #92400e;
}

.notice__text strong {
    color: #78350f;
}

/* ---------- Opt-In Checkbox ---------- */
.opt-in {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease;
}

.opt-in:hover {
    border-color: var(--primary);
}

.opt-in.checked {
    border-color: var(--primary);
    background: var(--primary-light);
}

.opt-in__checkbox {
    display: none;
}

.opt-in__checkmark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.opt-in__checkmark svg {
    width: 16px !important;
    height: 16px !important;
    color: white;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.opt-in__checkbox:checked ~ .opt-in__checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.opt-in__checkbox:checked ~ .opt-in__checkmark svg {
    opacity: 1;
}

.opt-in__label {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text);
}

/* ---------- Pay Button ---------- */
.pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.pay-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.pay-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pay-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pay-btn svg {
    width: 22px;
    height: 22px;
}

.pay-btn__spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.pay-btn.loading .pay-btn__text { display: none; }
.pay-btn.loading svg { display: none; }
.pay-btn.loading .pay-btn__spinner { display: block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Info Section ---------- */
.info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.info-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-item__icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.info-item__text {
    font-size: 0.85rem;
    line-height: 1.4;
}

.info-item__text strong {
    color: var(--navy);
}

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    padding: 20px 0 32px;
    margin-top: auto;
}

.footer__powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.footer__powered svg {
    width: 14px;
    height: 14px;
}

.footer__links {
    margin-top: 8px;
    font-size: 0.75rem;
}

.footer__links a {
    color: var(--text-light);
    text-decoration: none;
}

.footer__links a:hover {
    color: var(--primary);
}

/* ---------- Success Page ---------- */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--success);
}

.success-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-message {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 24px;
}

.success-details {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.success-details__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.success-details__row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: var(--navy);
}

/* ---------- Cancel Page ---------- */
.cancel-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.cancel-icon svg {
    width: 40px;
    height: 40px;
    color: var(--error);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ---------- Error State ---------- */
.error-card {
    text-align: center;
    padding: 48px 24px;
}

.error-card h2 {
    color: var(--error);
    margin-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 360px) {
    .amount-btn__value {
        font-size: 1.3rem;
    }

    .card {
        padding: 20px 16px;
    }

    .pay-btn {
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) {
    .page-wrapper {
        padding: 0;
    }
}
