/**
 * Arrow Link Widget Styles
 * Animated arrow link component with multiple hover effects
 */

/* Base arrow link styles */
.arrow-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.arrow-link span {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.arrow-link svg {
    transition: all 0.3s ease;
    transform-origin: center;
    position: relative;
    z-index: 1;
}

.arrow-link .arrow,
.arrow-link .arrow-border {
    transition: all 0.3s ease;
}

/* CSS Custom Properties for colors */
.arrow-link {
    --bg-mobile: #ffffff;
    --arrow-color: #0520f5;
    --arrow-hover-color: #0520f5;
}

/* Default slide animation */
.arrow-link.arrow-animation-slide:hover svg {
    transform: translateX(8px);
}

.arrow-link.arrow-animation-slide:hover .arrow {
    transform: translateX(4px);
}

/* Bounce animation */
.arrow-link.arrow-animation-bounce:hover svg {
    animation: arrowBounce 0.6s ease-in-out;
}

@keyframes arrowBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateX(0);
    }
    40%, 43% {
        transform: translateX(8px);
    }
    70% {
        transform: translateX(4px);
    }
}

/* Pulse animation */
.arrow-link.arrow-animation-pulse:hover svg {
    animation: arrowPulse 0.8s ease-in-out;
}

.arrow-link.arrow-animation-pulse:hover .arrow {
    animation: arrowPulseInner 0.8s ease-in-out;
}

@keyframes arrowPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes arrowPulseInner {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Scale animation */
.arrow-link.arrow-animation-scale:hover svg {
    transform: scale(1.15);
}

.arrow-link.arrow-animation-scale:hover .arrow {
    transform: scale(1.1) translateX(2px);
}

/* Advanced hover effects */
.arrow-link:hover {
    transform: translateY(-1px);
}

/* Text animation */
.arrow-link:hover span {
    transform: translateX(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .arrow-link svg {
        width: 40px;
        height: auto;
    }
    
    .arrow-link span {
        margin-right: 12px;
    }
    
    /* Reduce animations on mobile for performance */
    .arrow-link:hover {
        transform: none;
    }
    
    .arrow-link.arrow-animation-slide:hover svg {
        transform: translateX(4px);
    }
    
    .arrow-link.arrow-animation-scale:hover svg {
        transform: scale(1.05);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .arrow-link .arrow,
    .arrow-link .arrow-border {
        fill: currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .arrow-link,
    .arrow-link svg,
    .arrow-link .arrow,
    .arrow-link .arrow-border,
    .arrow-link span {
        transition: none;
        animation: none;
    }
    
    .arrow-link:hover {
        transform: none;
    }
    
    .arrow-link:hover svg,
    .arrow-link:hover .arrow,
    .arrow-link:hover span {
        transform: none;
    }
}

/* Focus styles for accessibility */
.arrow-link:focus {
    outline: 2px solid var(--arrow-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.arrow-link:focus-visible {
    outline: 2px solid var(--arrow-color);
    outline-offset: 2px;
}

/* Additional utility classes */
.arrow-link.arrow-link-large svg {
    width: 60px;
}

.arrow-link.arrow-link-small svg {
    width: 35px;
}

/* Custom spacing variants */
.arrow-link.arrow-spacing-tight span {
    margin-right: 8px;
}

.arrow-link.arrow-spacing-wide span {
    margin-right: 24px;
}

/* Color variants */
.arrow-link.arrow-color-primary {
    --arrow-color: #0520f5;
}

.arrow-link.arrow-color-secondary {
    --arrow-color: #6c757d;
}

.arrow-link.arrow-color-success {
    --arrow-color: #28a745;
}

.arrow-link.arrow-color-danger {
    --arrow-color: #dc3545;
}

.arrow-link.arrow-color-warning {
    --arrow-color: #ffc107;
}

.arrow-link.arrow-color-info {
    --arrow-color: #17a2b8;
}

/* Apply color variants to SVG elements */
.arrow-link[class*="arrow-color-"] .arrow,
.arrow-link[class*="arrow-color-"] .arrow-border {
    fill: var(--arrow-color);
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .arrow-link {
        --bg-mobile: #1a1a1a;
    }
}

/* Print styles */
@media print {
    .arrow-link svg {
        width: 20px;
        height: auto;
    }
    
    .arrow-link:hover {
        transform: none;
    }
}
