/*
 * Footer component styles extracted from templates/includes/footer.html
 * inline <style> block. Includes the WhatsApp FAB, newsletter form,
 * footer grid, social icons.
 */

/* WhatsApp Floating Button - Centered Icon */
#whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

#whatsapp-button a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

#whatsapp-button img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

#whatsapp-button:hover {
    transform: translateY(-5px);
    animation: none;
}

#whatsapp-button:hover a {
    background: #128C7E;
    box-shadow: 0 6px 25px rgba(18, 140, 126, 0.4);
}

#whatsapp-button:hover img {
    transform: scale(1.1);
}

#whatsapp-button:after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid #25D366;
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0;
    pointer-events: none;
}

#whatsapp-button:active a {
    transform: scale(0.95);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%     { transform: translateY(-10px); }
}

@keyframes pulse {
    0%   { transform: scale(0.8); opacity: 0.7; }
    70%  { transform: scale(1.2); opacity: 0; }
    100% { opacity: 0; }
}

@media (max-width: 768px) {
    #whatsapp-button {
        bottom: 20px;
        right: 20px;
    }

    #whatsapp-button a {
        width: 60px;
        height: 60px;
    }

    #whatsapp-button img {
        width: 35px;
        height: 35px;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50%     { transform: translateY(-15px); }
    }
}

/* WhatsApp tooltip */
#whatsapp-button a:before {
    content: "Chat with us on WhatsApp";
    position: absolute;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    background: #075E54;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

#whatsapp-button a:after {
    content: '';
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #075E54;
    opacity: 0;
    transition: all 0.3s ease;
}

#whatsapp-button:hover a:before,
#whatsapp-button:hover a:after {
    opacity: 1;
    right: 80px;
}

@media (max-width: 768px) {
    #whatsapp-button a:before {
        content: "WhatsApp us";
        right: 75px;
        padding: 6px 10px;
        font-size: 12px;
    }

    #whatsapp-button:hover a:before,
    #whatsapp-button:hover a:after {
        right: 65px;
    }

    #whatsapp-button a:after {
        right: 65px;
    }
}

/* Newsletter section */
.newsletter-container {
    background-color: rgba(223, 215, 249, 0.199);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    margin-top: 1.5rem;
    overflow: hidden;
}

.newsletter-position {
    position: absolute;
    z-index: -1;
}

.newsletter-success {
    display: none;
    text-align: center;
    padding: 1rem;
    background-color: rgba(223, 215, 249, 0.3);
    border-radius: 20px;
    margin-top: 1rem;
    color: #495057;
    font-weight: 500;
}

.input-group-icon {
    position: relative;
}

.input-box-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.5;
}

.form-control-newsletter {
    padding-left: 45px;
    border: 1px solid #ced4da;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s;
    width: 100%;
}

.form-control-newsletter:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.btn-newsletter {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    width: 100%;
}

.btn-newsletter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    background: linear-gradient(45deg, #c82333, #bd1e2d);
}

/* Footer grid */
@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr) 1.5fr !important;
    }
}

.newsletter-heading {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #f8f9fa;
}

.newsletter-description {
    color: #adb5bd;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Email icon in placeholder */
.email-icon-placeholder {
    position: relative;
    display: inline-block;
    width: 100%;
}

.email-icon-placeholder::before {
    content: '\f0e0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 1;
}

.email-input {
    padding-left: 40px !important;
}

/* Social icons */
.social-icon {
    position: relative;
    transition: all 0.3s ease;
}

.social-icon:hover .social-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.social-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1f2937;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.social-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}
