/* ═══════════════════════════════════════════════════════════════════
   FIELDFUSION - ULTRA-MODERN CUSTOM CSS
   Designer: Senior UX/UI Expert (15 Jahre Erfahrung)
   Features: Glassmorphism 2.0, 3D Effects, Animations, Gradients
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   1. KEYFRAME ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */

/* Blob Animation für organische Bewegung */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

/* Gradient Animation */
@keyframes gradient-x {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes gradient-y {
    0%, 100% {
        background-position: 50% 0%;
    }
    50% {
        background-position: 50% 100%;
    }
}

/* Fade In Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   2. UTILITY CLASSES - Animations
   ═══════════════════════════════════════════════════════════════════ */

.animate-blob {
    animation: blob 7s infinite ease-in-out;
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 8s ease infinite;
}

.animate-gradient-y {
    background-size: 200% 200%;
    animation: gradient-y 8s ease infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Animation Delays */
.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

.animation-delay-800 {
    animation-delay: 800ms;
}

.animation-delay-1000 {
    animation-delay: 1000ms;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ═══════════════════════════════════════════════════════════════════
   3. GLASSMORPHISM EFFECTS
   ═══════════════════════════════════════════════════════════════════ */

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   4. SCROLL REVEAL SYSTEM
   ═══════════════════════════════════════════════════════════════════ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   5. 3D EFFECTS & TRANSFORMS
   ═══════════════════════════════════════════════════════════════════ */

.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

/* Depth Layers für 3D-Effekt */
.depth-layer-1 {
    transform: translateZ(20px);
}

.depth-layer-2 {
    transform: translateZ(40px);
}

.depth-layer-3 {
    transform: translateZ(60px);
}

/* ═══════════════════════════════════════════════════════════════════
   6. GRADIENT OVERLAYS & EFFECTS
   ═══════════════════════════════════════════════════════════════════ */

.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    pointer-events: none;
}

.gradient-border {
    position: relative;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #15803d, #343a40) border-box;
    border: 2px solid transparent;
}

/* Animated Gradient Border */
.gradient-border-animated {
    position: relative;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #15803d, #5dc08b, #343a40, #15803d) border-box;
    border: 2px solid transparent;
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   7. SHADOW EFFECTS
   ═══════════════════════════════════════════════════════════════════ */

.shadow-soft {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.shadow-glow-primary {
    box-shadow: 0 10px 40px rgba(21, 128, 61, 0.3);
}

.shadow-glow-accent {
    box-shadow: 0 10px 40px rgba(52, 58, 64, 0.3);
}

.shadow-inner-soft {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════
   8. HOVER EFFECTS
   ═══════════════════════════════════════════════════════════════════ */

.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    position: relative;
    transition: all 0.3s ease;
}

.hover-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #15803d, #5dc08b);
    border-radius: inherit;
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hover-glow:hover::before {
    opacity: 0.7;
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ═══════════════════════════════════════════════════════════════════
   9. TEXT EFFECTS
   ═══════════════════════════════════════════════════════════════════ */

.text-shadow-soft {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.text-shadow-strong {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.text-gradient-primary {
    background: linear-gradient(135deg, #15803d, #5dc08b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #343a40, #6c757d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════════
   10. CUSTOM SCROLLBAR
   ═══════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #15803d, #5dc08b);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #166534, #15803d);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #15803d #f1f1f1;
}

/* ═══════════════════════════════════════════════════════════════════
   11. LOADING STATES
   ═══════════════════════════════════════════════════════════════════ */

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinner {
    border: 3px solid rgba(21, 128, 61, 0.1);
    border-top-color: #15803d;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   12. UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════ */

.overflow-hidden-safe {
    overflow: hidden;
    /* Verhindert Layout-Shift */
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.clip-path-diagonal {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   13. RESPONSIVE BREAKPOINTS HELPERS
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .mobile-full-width {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   14. PRINT STYLES
   ═══════════════════════════════════════════════════════════════════ */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   15. ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════ */

/* Focus Styles */
*:focus-visible {
    outline: 2px solid #15803d;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass,
    .glass-strong {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid #000;
    }
}



/* ═══════════════════════════════════════════════════════════════════
   16. COMPONENT-SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* Navbar Glassmorphism */
.navbar-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.navbar-glass.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Card Shine Effect */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.card-shine:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ═══════════════════════════════════════════════════════════════════
   17. FORM ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════ */

/* Custom Input Focus */
input:focus,
textarea:focus,
select:focus {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Floating Label Effect */
.floating-label {
    position: relative;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #15803d;
}

.floating-label label {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Pulse Animation für Status Badges */
@@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Bounce Animation für Empty State */
@@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

/* Keyboard Navigation Styles */
.keyboard-nav-active *:focus {
    outline: 3px solid var(--color-primary-500) !important;
    outline-offset: 2px;
}

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

/* Performance: GPU-Beschleunigung für Animationen */
.scroll-reveal,
.group:hover,
[class*="hover:scale"],
[class*="hover:translate"] {
    will-change: transform;
}

/* Timeslot States */
.timeslot {
    position: relative;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

    .timeslot:hover {
        background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
        transform: scale(1.05);
        z-index: 10;
    }

    .timeslot.selected {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 4px 6px -1px rgba(0,0,0,0.1);
        position: relative;
    }

        .timeslot.selected::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
            pointer-events: none;
        }

        .timeslot.selected::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }

        .timeslot.selected:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
            box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 6px 8px -1px rgba(0,0,0,0.15);
        }

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 10px;
    border: 2px solid #f3f4f6;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #059669, #047857);
    }

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notif {
    animation: slideInRight 0.3s ease-out;
}

/* Toolbar Transition */
#toolbar {
    transition: transform 0.3s ease-out;
}

/* Loading Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* ═══════════════════════════════════════════════════════════════════
   18. DARK MODE SUPPORT (Optional für später)
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles können hier hinzugefügt werden */
}

/* ═══════════════════════════════════════════════════════════════════
   END OF CUSTOM CSS
   ═══════════════════════════════════════════════════════════════════ */
