/* eMobile Radiology Payment System - Styles */

/* CSS Variables */
:root {
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f8f9fa;
    --white: #fff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.card-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px;
    text-align: center;
}

.card-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
}

.card-header p {
    opacity: 0.9;
    margin-top: 5px;
}

.card-body {
    padding: 30px;
}

.card-footer {
    background: var(--bg-light);
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.card-footer a {
    color: var(--secondary-color);
}

/* Login Card */
.login-card {
    max-width: 450px;
    margin: 50px auto;
}

.welcome-text {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Inline Form */
.inline-form {
    display: flex;
    gap: 10px;
}

.inline-form input {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn-pay {
    background: var(--success-color);
    font-size: 18px;
    padding: 15px 30px;
}

.btn-pay:hover {
    background: #219a52;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin: 15px 0;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.transaction-table,
.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.transaction-table th,
.transaction-table td,
.summary-table th,
.summary-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.transaction-table th,
.summary-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-color);
}

.transaction-table tbody tr:hover {
    background: #f5f5f5;
}

.transaction-table .amount,
.summary-table .amount {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.total-row {
    background: var(--bg-light) !important;
}

.total-row td {
    font-weight: 600;
    font-size: 16px;
    border-top: 2px solid var(--primary-color);
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Payment Form */
.payment-card {
    max-width: 700px;
    margin: 20px auto;
}

.payment-summary {
    margin-bottom: 30px;
}

.payment-form-container {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.payment-form-container h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

#card-container {
    min-height: 50px;
    padding: 15px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
}

.security-notice {
    margin-top: 25px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

/* Confirmation Card */
.confirmation-card {
    max-width: 700px;
    margin: 20px auto;
}

.success-header {
    background: var(--success-color);
}

.success-icon {
    font-size: 60px;
    margin-bottom: 10px;
}

.confirmation-details {
    margin-bottom: 30px;
}

.confirmation-details h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dotted var(--border-color);
}

.detail-row .label {
    font-weight: 600;
    color: var(--text-light);
}

.detail-row.total {
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-top: 10px;
    font-size: 18px;
}

.detail-row.total .value {
    color: var(--success-color);
}

.studies-paid {
    margin-top: 30px;
}

.studies-paid h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.email-receipt-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.email-receipt-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.email-form {
    display: flex;
    gap: 10px;
}

.email-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-header h1 {
        font-size: 22px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .email-form {
        flex-direction: column;
    }
    
    .inline-form {
        flex-direction: column;
    }
    
    .transaction-table th,
    .transaction-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
    }
    
    .btn,
    .button-group,
    .email-receipt-section {
        display: none;
    }
}
