/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Required field indicator */
.required {
    color: #fa755a;
    font-weight: bold;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* Payment Card */
.payment-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    color: #1a202c;
    margin-bottom: 8px;
}

.header p {
    color: #718096;
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control[readonly] {
    background-color: #f7fafc;
    color: #4a5568;
    cursor: not-allowed;
    border-color: #cbd5e0;
}

.form-control[readonly]:focus {
    border-color: #cbd5e0;
    box-shadow: none;
}

select.form-control {
    cursor: pointer;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6c757d;
}

.text-muted {
    color: #6c757d !important;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    color: #718096;
    font-weight: 600;
    font-size: 16px;
}

.input-group .form-control {
    padding-left: 36px;
}

/* Stripe Element */
.stripe-element {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.stripe-element:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.text-danger {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* Payment Info */
.payment-info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.payment-info p {
    margin: 8px 0;
    color: #2d3748;
}

/* Secure Badge */
.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #718096;
    font-size: 13px;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Success Page */
.success-card {
    text-align: center;
}

.success-icon {
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 28px;
    color: #10b981;
    margin-bottom: 12px;
}

.success-message {
    color: #718096;
    margin-bottom: 32px;
    font-size: 16px;
}

.payment-details {
    background: #f7fafc;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #718096;
    font-weight: 500;
}

.detail-value {
    color: #2d3748;
    font-weight: 600;
}

.transaction-id {
    font-family: monospace;
    font-size: 12px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Error Page */
.error-card {
    text-align: center;
}

.error-icon {
    margin: 0 auto 24px;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-title {
    font-size: 28px;
    color: #ef4444;
    margin-bottom: 12px;
}

.error-message {
    color: #718096;
    margin-bottom: 24px;
    font-size: 16px;
}

.error-details {
    margin-bottom: 24px;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Info Box */
.info-box {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 24px;
    text-align: left;
}

.info-box p {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-box ul {
    margin-left: 20px;
    color: #718096;
    font-size: 14px;
}

.info-box li {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .payment-card {
        padding: 24px;
    }

    .header h1 {
        font-size: 24px;
    }

    .success-title,
    .error-title {
        font-size: 24px;
    }
}

