/* Scout Footer Frontend Styles */

.scout-footer {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.6;
    word-wrap: break-word;
    transition: all 0.3s ease;
}

.scout-footer * {
    box-sizing: border-box;
}

/* Text Content */
.scout-footer-text {
    margin-bottom: 15px;
}

.scout-footer-text p {
    margin: 0 0 10px 0;
    padding: 0;
}

.scout-footer-text p:last-child {
    margin-bottom: 0;
}

.scout-footer-text h1,
.scout-footer-text h2,
.scout-footer-text h3,
.scout-footer-text h4,
.scout-footer-text h5,
.scout-footer-text h6 {
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.scout-footer-text ul,
.scout-footer-text ol {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.scout-footer-text li {
    margin-bottom: 5px;
}

/* Button Wrapper */
.scout-footer-button-wrapper {
    margin-top: 15px;
}

/* Button Base Styles */
.scout-footer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.scout-footer-button:hover,
.scout-footer-button:focus {
    text-decoration: none;
    outline: none;
    transform: translateY(-1px);
}

.scout-footer-button:active {
    transform: translateY(0);
}

.scout-footer-button:focus {
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

/* Button Sizes */
.scout-footer-button.size-small {
    font-size: 14px;
} 

.scout-footer-button.size-medium {
    font-size: 16px;
}

.scout-footer-button.size-large {
    font-size: 18px;
    font-weight: 700;
}

/* Button Text */
.scout-footer-button .button-text {
    position: relative;
    z-index: 2;
}

/* Button Icons */
.scout-footer-button .button-icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
    max-width: none;
    border: none;
    background: none;
    transition: transform 0.3s ease;
}

.scout-footer-button:hover .button-icon {
    transform: scale(1.1);
}

/* Button Animations */
.scout-footer-button.animation-hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scout-footer-button.animation-hover-scale:hover {
    transform: scale(1.05) translateY(-2px);
}

.scout-footer-button.animation-hover-bounce:hover {
    animation: scoutButtonBounce 0.6s ease;
}

.scout-footer-button.animation-hover-shake:hover {
    animation: scoutButtonShake 0.5s ease;
}

/* Button Ripple Effect */
.scout-footer-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: 1;
}

.scout-footer-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Social Share Section */
.scout-footer-social {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.social-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-button:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.social-icon {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.social-button:hover .social-icon {
    transform: rotate(5deg) scale(1.1);
}

.social-label {
    font-weight: 600;
}

/* Platform-specific hover colors */
.social-button.social-facebook:hover {
    background: #1877f2 !important;
    color: white !important;
}

.social-button.social-twitter:hover {
    background: #1da1f2 !important;
    color: white !important;
}

.social-button.social-whatsapp:hover {
    background: #25d366 !important;
    color: white !important;
}

.social-button.social-telegram:hover {
    background: #0088cc !important;
    color: white !important;
}

.social-button.social-linkedin:hover {
    background: #0077b5 !important;
    color: white !important;
}

.social-button.social-pinterest:hover {
    background: #bd081c !important;
    color: white !important;
}

/* Loading State */
.scout-footer.loading {
    opacity: 0.7;
    pointer-events: none;
}

.scout-footer.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    animation: scoutSpin 1s linear infinite;
    z-index: 10;
}

/* Animations */
@keyframes scoutButtonBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes scoutButtonShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-3px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(3px);
    }
}

@keyframes scoutSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Entrance Animations */
.scout-footer-animated {
    opacity: 0;
    animation-duration: 1s;
    animation-fill-mode: both;
}

.scout-footer-animated.scout-footer-fadeIn {
    animation-name: scoutFadeIn;
}

.scout-footer-animated.scout-footer-fadeInUp {
    animation-name: scoutFadeInUp;
}

.scout-footer-animated.scout-footer-slideInUp {
    animation-name: scoutSlideInUp;
}

.scout-footer-animated.scout-footer-bounceIn {
    animation-name: scoutBounceIn;
}

@keyframes scoutFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scoutFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scoutSlideInUp {
    from {
        transform: translate3d(0, 100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scoutBounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scout-footer {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .scout-footer-text {
        font-size: 14px !important;
        margin-bottom: 12px;
    }
    
    .scout-footer-button.size-large {
        font-size: 16px;
        padding: 12px 20px !important;
    }
    
    .scout-footer-button.size-medium {
        font-size: 14px;
        padding: 10px 16px !important;
    }
    
    .scout-footer-button.size-small {
        font-size: 12px;
        padding: 8px 12px !important;
    }
    
    .social-buttons {
        gap: 8px;
    }
    
    .social-button {
        font-size: 12px;
        padding: 6px 12px !important;
    }
    
    .social-button .social-icon {
        width: 14px !important;
        height: 14px !important;
        margin-right: 6px;
    }
}

@media (max-width: 480px) {
    .scout-footer {
        padding: 12px !important;
        margin: 12px 0 !important;
        text-align: center !important;
    }
    
    .scout-footer-button {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .social-button {
        justify-content: center;
        width: 100%;
        margin-bottom: 8px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .scout-footer {
        border: 2px solid currentColor !important;
    }
    
    .scout-footer-button {
        border: 2px solid currentColor !important;
    }
    
    .social-button {
        border: 1px solid currentColor !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .scout-footer-button,
    .social-button,
    .button-icon,
    .social-icon {
        transition: none !important;
        animation: none !important;
    }
    
    .scout-footer-animated {
        animation: none !important;
        opacity: 1 !important;
    }
    
    .scout-footer-button:hover,
    .social-button:hover {
        transform: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .scout-footer {
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .scout-footer-social {
        border-top-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .social-button {
        background: rgba(255, 255, 255, 0.1) !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Print Styles */
@media print {
    .scout-footer {
        background: transparent !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .scout-footer-button,
    .social-button {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    
    .scout-footer-button::before {
        display: none !important;
    }
}

/* RTL Support */
[dir="rtl"] .scout-footer-button .button-icon.icon-before {
    margin-right: 0;
    margin-left: var(--icon-spacing, 8px);
}

[dir="rtl"] .scout-footer-button .button-icon.icon-after {
    margin-left: 0;
    margin-right: var(--icon-spacing, 8px);
}

[dir="rtl"] .social-icon {
    margin-right: 0;
    margin-left: 8px;
}

/* Focus Indicators for Accessibility */
.scout-footer-button:focus-visible,
.social-button:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

/* Screen Reader Only Text */
.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;
}

/* Lazy Loading */
.scout-footer.lazy-loading {
    min-height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Custom Scrollbar for Long Content */
.scout-footer-text::-webkit-scrollbar {
    width: 6px;
}

.scout-footer-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.scout-footer-text::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.scout-footer-text::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Micro-interactions */
.scout-footer-button {
    background-size: 200% 100%;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.1) 50%);
    background-position: 100% 0;
    transition: background-position 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.scout-footer-button:hover {
    background-position: 0% 0;
}

/* Success/Error States */
.scout-footer.success {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.scout-footer.error {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Pulse Animation for Important CTAs */
.scout-footer-button.pulse {
    animation: scoutPulse 2s infinite;
}

@keyframes scoutPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 115, 170, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0);
    }
}