/**
 * Inbox Marketing KFT - Custom CSS
 * Minimal custom styles that complement Tailwind CSS
 */

/* Custom animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* Custom selection colors */
::selection {
    background-color: #2563EB;
    color: white;
}

::-moz-selection {
    background-color: #2563EB;
    color: white;
}

/* Image aspect ratio preservation */
.aspect-ratio-container {
    position: relative;
    overflow: hidden;
}

.aspect-ratio-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000;
    }
    
    .border-gray-300 {
        border-color: #000;
    }
}

/* 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;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (basic foundation) */
@media (prefers-color-scheme: dark) {
    /* Note: Full dark mode would require extensive Tailwind customization */
    /* This is just a foundation for future implementation */
    
    .dark-mode-text {
        color: #f8fafc;
    }
    
    .dark-mode-bg {
        background-color: #0f172a;
    }
}

/* Custom button hover effects */
.btn-hover-scale {
    transition: transform 0.2s ease-in-out;
}

.btn-hover-scale:hover {
    transform: scale(1.05);
}

/* Form input focus ring */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

/* Utility classes for common patterns */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift during image loading */
img[src*="bundle_1_aszf_inbox_marketing"],
img[src*="bundle_2_foldal_inbox_marketi"] {
    background-color: #f1f5f9;
    background-size: 40px 40px;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23cbd5e1' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Mobile menu specific styles */
#mobile-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Form validation styles */
.field-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2563EB;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Ensure proper contrast ratios */
.bg-primary-blue {
    background-color: #2563EB;
}

.bg-success-green {
    background-color: #10B981;
}

.text-primary-blue {
    color: #2563EB;
}

.text-success-green {
    color: #10B981;
}

.text-dark-gray {
    color: #1F2937;
}