/**
 * OZ Pathways TSG - Custom Styles
 * Additional styles to complement Tailwind CSS
 * Based on the new design system
 */

/* Hero background with architectural image effect */
.hero-bg {
    background: linear-gradient(135deg, rgba(37, 99, 145, 0.9), rgba(29, 78, 216, 0.8)),
                linear-gradient(45deg, #1e40af, #3730a3);
    background-attachment: fixed;
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px;
}

/* OZ Pathways brand colors */
:root {
    --oz-blue: #1e3a8a;
    --oz-blue-light: #3b82f6;
    --oz-yellow: #fbbf24;
    --oz-yellow-light: #fde047;
    --oz-gray: #6b7280;
}

/* Custom animations and transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@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(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Connection status indicators */
.status-indicator {
    position: relative;
}

.status-indicator.pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Custom form styles */
.form-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    transform: translateY(-1px);
}

/* Card hover effects */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Admin panel specific styles */
.admin-sidebar {
    transition: transform 0.3s ease;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

/* Database status colors */
.status-connected { color: #10B981; }
.status-failed { color: #EF4444; }
.status-testing { color: #F59E0B; }
.status-not-configured { color: #6B7280; }

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
    transition: opacity 0.2s ease;
}

/* Toast notifications */
.toast {
    z-index: 9999;
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.hide {
    transform: translateX(100%);
}

/* Navigation active states */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3B82F6;
}

/* Service card styles */
.service-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

/* Chat widget pulse effect */
.chat-widget {
    animation: chatPulse 2s infinite;
}

@keyframes chatPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-hover:hover {
        transform: none;
    }
    
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 2px;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode styles (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Selection styles */
::selection {
    background: rgba(59, 130, 246, 0.2);
    color: inherit;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.2);
    color: inherit;
}

/* Focus outline for accessibility */
*:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

*:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}