/* PayRes CSS Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h2 {
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.help-text {
    display: block;
    margin-top: 5px;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.qr-container {
    text-align: center;
    margin: 30px 0;
}

.qr-container img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 3px solid var(--border-color);
    border-radius: 15px;
    margin-bottom: 20px;
}

.payment-details {
    background: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.payment-details .label {
    font-weight: 600;
    color: var(--secondary-color);
}

.amount-display {
    margin-bottom: 10px;
}

.amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.order-id {
    font-family: monospace;
    word-break: break-all;
}

.payment-instructions {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.payment-instructions h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-instructions ol {
    margin-left: 20px;
}

.payment-instructions li {
    margin-bottom: 8px;
}

.payment-status {
    text-align: center;
    margin: 20px 0;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
}

.status-indicator.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-indicator.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.card.success {
    border-top: 5px solid var(--success-color);
}

.card.error {
    border-top: 5px solid var(--error-color);
}

.success-icon,
.error-icon {
    text-align: center;
    margin-bottom: 20px;
}

.success-icon i {
    font-size: 4rem;
    color: var(--success-color);
}

.error-icon i {
    font-size: 4rem;
    color: var(--error-color);
}

.success-details {
    background: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-row .label {
    font-weight: 600;
    color: var(--secondary-color);
}

.detail-row .value {
    font-weight: 600;
    color: var(--dark-color);
}

.success-status {
    color: var(--success-color) !important;
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: white;
    opacity: 0.8;
    margin-top: auto;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .detail-row {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-row .label {
        margin-bottom: 5px;
    }
}

/* Animation for QR code loading */
.qr-container img {
    transition: opacity 0.3s ease;
}

.qr-container img.loading {
    opacity: 0.5;
}

/* Pulse animation for pending status */
.status-indicator.pending i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}