/* ============================================================
   PrimWash Bochum - Zahlungsseite
   Design basierend auf prim-wash.de
   ============================================================ */

/* ---------- 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;
    --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;
}

/* ---------- 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;
}

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

.header__logo {
    width: 180px;
    height: auto;
    margin-bottom: 16px;
}

.header__box-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.header__box-badge svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- 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;
    height: 14px;
    color: white;
}

/* ---------- 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: 1.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;
    flex-shrink: 0;
}

.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;
    }
}

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