/* Custom CSS for Ultrasound Screening System */

/* Smooth transitions for all elements */
* {
    transition: all 0.3s ease;
}

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

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

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

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

/* Form styling */
.form-step {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Custom radio and checkbox styling */
input[type="radio"]:checked,
input[type="checkbox"]:checked {
    background-color: #ec4899;
    border-color: #ec4899;
}

input[type="radio"]:focus,
input[type="checkbox"]:focus {
    ring-color: #ec4899;
    border-color: #ec4899;
}

/* Button hover effects */
.btn-hover {
    position: relative;
    overflow: hidden;
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-hover:hover::before {
    left: 100%;
}

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

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

/* Alert animations */
.alert-slide-in {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ec4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sticky header */
.sticky-header {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Mobile menu animation */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.open {
    max-height: 300px;
}

/* Form validation styles */
.form-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.form-success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Risk level colors */
.risk-low {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.risk-medium {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.risk-high {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.risk-emergency {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
    animation: pulse 2s infinite;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .card-hover {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-hidden {
        display: none;
    }
    
    .form-step {
        padding: 1rem;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-pink-600 {
        background-color: #000;
    }
    
    .text-pink-600 {
        color: #000;
    }
    
    .border-pink-600 {
        border-color: #000;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-bg {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #374151;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Custom scrolling for modal */
.modal-scroll {
    max-height: 80vh;
    overflow-y: auto;
}

/* Gradient backgrounds */
.gradient-pink {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Icon animations */
.icon-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-30px,0);
    }
    70% {
        transform: translate3d(0,-15px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Pulse animation for emergency alerts */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Focus indicators for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

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

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