/* Custom CSS for SWIFT MT103 Simulator */

/* Avatar circles for account holders */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Transaction status badges with icons */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* MT103 message display */
.mt103-message {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    background: var(--bs-dark);
    color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

/* Account balance highlighting */
.balance-positive {
    color: var(--bs-success) !important;
    font-weight: bold;
}

.balance-warning {
    color: var(--bs-warning) !important;
    font-weight: bold;
}

.balance-negative {
    color: var(--bs-danger) !important;
    font-weight: bold;
}

/* Transaction amount styling */
.transaction-amount {
    font-size: 1.25rem;
    font-weight: bold;
}

/* Form enhancements */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-label i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

/* Account summary cards */
.account-summary-card {
    border-left: 4px solid var(--bs-primary);
    transition: border-color 0.3s ease;
}

.account-summary-card:hover {
    border-left-color: var(--bs-success);
}

/* Transaction reference styling */
.transaction-ref {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: var(--bs-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--bs-border-color);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Success animations */
.success-checkmark {
    display: inline-block;
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Currency symbols styling */
.currency-symbol {
    font-weight: bold;
    margin-right: 0.25rem;
}

.currency-usd { color: var(--bs-success); }
.currency-eur { color: var(--bs-primary); }
.currency-gbp { color: var(--bs-info); }
.currency-ngn { color: var(--bs-success); }
.currency-jpy { color: var(--bs-warning); }

/* SWIFT code styling */
.swift-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: var(--bs-secondary);
    color: var(--bs-light);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Transaction flow indicators */
.transaction-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.transaction-flow-arrow {
    color: var(--bs-primary);
    font-size: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .transaction-flow {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .transaction-flow-arrow {
        transform: rotate(90deg);
    }
    
    .mt103-message {
        font-size: 0.8rem;
        max-height: 300px;
    }
    
    .avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Print styles for MT103 messages */
@media print {
    .mt103-message {
        background: white !important;
        color: black !important;
        border: 2px solid black !important;
        page-break-inside: avoid;
    }
    
    .no-print {
        display: none !important;
    }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .transaction-ref {
    background: var(--bs-dark);
    color: var(--bs-light);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .swift-code {
    background: var(--bs-light);
    color: var(--bs-dark);
}

/* Focus states for accessibility */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Custom button styles */
.btn-financial {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    border: none;
    color: white;
    font-weight: 600;
}

.btn-financial:hover {
    background: linear-gradient(135deg, var(--bs-info), var(--bs-primary));
    color: white;
    transform: translateY(-1px);
}

/* Status indicator animations */
.status-pending {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Table enhancements */
.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.075);
}

/* Alert enhancements */
.alert {
    border-left: 4px solid;
    border-left-color: var(--bs-primary);
}

.alert-success { border-left-color: var(--bs-success); }
.alert-warning { border-left-color: var(--bs-warning); }
.alert-danger { border-left-color: var(--bs-danger); }
.alert-info { border-left-color: var(--bs-info); }
