/* Enhanced Custom CSS for IRCUWU 2025 Payment System */

/* Root Variables for Consistent Theming */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Header Styling */
.header-banner {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-sm);
}

header {
    background: var(--bg-primary);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

/* Main Container */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced Form Styling */
.payment-form {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.payment-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Payment Summary Section */
.payment-summary {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.summary-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.summary-amount {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* Radio Button Styling */
.radio-group {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
}

.radio-option:hover {
    background: rgba(59, 130, 246, 0.05);
}

.radio-option:last-child {
    margin-bottom: 0;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    accent-color: var(--secondary-color);
    cursor: pointer;
}

.radio-label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

/* Button Styling */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-success {
    background: var(--success-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
}

/* Loading Animation */
.loading-container {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

.cls_loding {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Receipt Styling */
.receipt-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.receipt-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.receipt-content {
    padding: 2rem;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.receipt-table th,
.receipt-table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.receipt-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.receipt-table .amount-cell {
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.footer-banner {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

/* Alert/Message Styling */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border-left-color: var(--error-color);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-left-color: var(--warning-color);
    color: #92400e;
}

/* Print Button */
.print-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 1000;
}

.print-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Error Page Styling */
.error-container {
    max-width: 500px;
    margin: 3rem auto;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.error-container h1 {
    color: var(--error-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.error-container .message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .main-container {
        padding: 0 0.5rem;
    }
    
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
    }
    
    .print-btn {
        position: static;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .receipt-container {
        margin: 1rem;
    }
    
    .receipt-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .payment-form {
        padding: 1rem;
    }
    
    .receipt-table th,
    .receipt-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
input[type="radio"]:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}