/* Custom styles for ScoutBank */

:root {
    --primary-blue: #1e40af;
    --primary-green: #059669;
    --accent-yellow: #fbbf24;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s, color 0.2s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Rotating safety tips animation */
@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

.safety-tip {
    animation: fadeInOut 6s infinite;
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Card hover effect */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Badge pulse animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.badge-new {
    animation: pulse 2s infinite;
}

/* Transaction row hover */
.transaction-row:hover {
    background-color: #f9fafb;
}

/* Form input focus */
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-blue);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification/Toast styles */
#notification-container {
    pointer-events: none;
}

#notification-container > div {
    pointer-events: auto;
}

/* Button loading state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loading {
    position: relative;
    color: transparent !important;
}

.button-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Confirmation dialog animations */
#confirm-dialog-overlay {
    backdrop-filter: blur(2px);
}

/* Responsive notifications */
@media (max-width: 640px) {
    #notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
        width: calc(100% - 2rem);
    }
}