/* ===================================================
   T12: CashPay 收银台样式
   1:1 复刻 cashapp-send.one Cash App 绿色主题
   =================================================== */

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

body {
    background: #0a0a0a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

/* Wrapper */
.cashier-wrapper {
    width: 100%;
    max-width: 460px;
}

/* Card */
.cashier-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 32px 32px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

/* Logo */
.cashier-logo {
    text-align: center;
    margin-bottom: 24px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #00D54B;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    border-radius: 16px;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(0, 213, 75, 0.3);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #00D54B;
    letter-spacing: -0.3px;
}

/* Agent Badge */
.agent-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f0fff4;
    color: #00D54B;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #00D54B33;
}

/* Title */
.cashier-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.cashier-subtitle {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-bottom: 28px;
}

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

.amount-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    font-family: inherit;
}

.amount-btn:hover {
    background: #e8fbe8;
    border-color: #00D54B;
}

.amount-btn.active {
    background: #00D54B;
    border-color: #00D54B;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 213, 75, 0.35);
    transform: scale(1.02);
}

.amount-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.amount-btn.active .amount-value {
    color: #fff;
}

/* Custom Amount */
.custom-section {
    margin-bottom: 28px;
}

.custom-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    transition: border-color 0.2s ease;
}

.custom-wrapper:focus-within {
    border-color: #00D54B;
    box-shadow: 0 0 0 3px rgba(0, 213, 75, 0.15);
}

.custom-wrapper.has-value {
    border-color: #00D54B;
}

.currency-prefix {
    padding-left: 18px;
    font-size: 20px;
    font-weight: 700;
    color: #555;
}

#custom-amount {
    width: 100%;
    padding: 10px 18px 10px 6px;
    border: none;
    background: transparent;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    outline: none;
    font-family: inherit;
    -moz-appearance: textfield;
}

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

#custom-amount::placeholder {
    color: #bbb;
    font-weight: 400;
}

.amount-range {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Pay Button */
.pay-btn {
    width: 100%;
    height: 80px;
    background: #00D54B;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    font-family: inherit;
    box-shadow: 0 8px 28px rgba(0, 213, 75, 0.35);
}

.pay-btn:hover:not(:disabled) {
    background: #00c043;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 213, 75, 0.45);
}

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

.pay-btn:disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading Overlay (fixed fullscreen) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #555;
    font-size: 15px;
    font-weight: 500;
}

.loading-overlay .spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top-color: #00D54B;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 16px;
}

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

/* Error */
.error-msg {
    text-align: center;
    padding: 12px;
    background: #fff5f5;
    color: #e53e3e;
    font-size: 14px;
    border-radius: 12px;
    margin-top: 16px;
    border: 1px solid #feb2b2;
}

/* Footer */
.cashier-footer {
    text-align: center;
    margin-top: 20px;
    color: #555;
    font-size: 12px;
}

/* ── Mobile Responsive ── */
@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: flex-start;
        padding-top: 24px;
    }

    .cashier-card {
        border-radius: 16px 16px 0 0;
        padding: 32px 20px 24px;
        min-height: calc(100vh - 80px);
        box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.3);
    }

    .cashier-title {
        font-size: 20px;
    }

    .amount-grid {
        gap: 8px;
    }

    .amount-btn {
        min-height: 50px;
        padding: 12px 6px;
    }

    .amount-value {
        font-size: 16px;
    }

    .pay-btn {
        height: 68px;
        font-size: 20px;
    }
}

@media (max-width: 340px) {
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
