/**
 * Footer Styles - glovemfg
 * 
 * Design tokens from DNA.md:
 * - Primary: #0C2340
 * - Primary Light: #1A3A5C
 * - Primary 950: #061525
 * - CTA: #0077B6
 * - Neutral scale for text
 * - Font: Space Grotesk (headings), Inter (body)
 */

/* ==========================================================================
   Footer Main Structure
   ========================================================================== */

.footer-main {
    background-color: #0C2340;
    color: #ffffff;
    font-family: 'Inter', system-ui, sans-serif;
}

.footer-container {
    max-width: 90rem;
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 1.5rem 2rem;
}

@media (min-width: 640px) {
    .footer-container {
        padding: 5rem 1.5rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .footer-container {
        padding: 6rem 1.5rem 3rem;
    }
}

/* ==========================================================================
   Footer Grid Layout
   ========================================================================== */

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem;
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 4rem;
    }
}

/* ==========================================================================
   Brand Column
   ========================================================================== */

.footer-brand-col {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .footer-brand-col {
        grid-column: auto;
    }
}

.footer-logo-link {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.footer-logo-link:hover {
    opacity: 0.8;
}

.footer-logo {
    height: 2rem;
    width: auto;
}

@media (min-width: 640px) {
    .footer-logo {
        height: 2.25rem;
    }
}

.footer-tagline {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: rgba(255, 255, 255, 0.7);
    max-width: 20rem;
}

.footer-contact {
    margin-top: 1.5rem;
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-link:hover {
    color: #00B4D8;
}

.footer-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Navigation Columns
   ========================================================================== */

.footer-nav-col {
    min-width: 0;
}

.footer-nav-title {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.25rem;
}

.footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav-list a {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav-list a:hover {
    color: #00B4D8;
}

/* ==========================================================================
   Footer Bottom Bar
   ========================================================================== */

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1024px) {
    .footer-bottom {
        margin-top: 5rem;
    }
}

.footer-copyright {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

@media (min-width: 640px) {
    .footer-copyright {
        text-align: left;
    }
}

/* ==========================================================================
   Floating Action Buttons
   ========================================================================== */

.footer-fab-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

@media (min-width: 640px) {
    .footer-fab-container {
        bottom: 2rem;
        right: 2rem;
    }
}

.footer-fab {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.footer-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.footer-fab:active {
    transform: translateY(0);
}

.footer-fab svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Back to Top Button */
.footer-fab-secondary {
    background-color: #1A3A5C;
    color: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
}

.footer-fab-secondary.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.footer-fab-secondary:hover {
    background-color: #0C2340;
}

/* WhatsApp Button */
.footer-fab-whatsapp {
    background-color: #25D366;
    color: #ffffff;
}

.footer-fab-whatsapp:hover {
    background-color: #20c35e;
}

/* ==========================================================================
   WhatsApp Chat Panel
   ========================================================================== */

.wa-panel {
    position: fixed;
    bottom: 6.5rem;
    right: 1.5rem;
    width: 22rem;
    max-width: calc(100vw - 3rem);
    background-color: #f0ebe3;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem) scale(0.95);
    transform-origin: bottom right;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

@media (min-width: 640px) {
    .wa-panel {
        bottom: 7rem;
        right: 2rem;
    }
}

.wa-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Panel Header */
.wa-panel-header {
    background-color: #075e54;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wa-panel-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wa-panel-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-panel-avatar svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #ffffff;
}

.wa-panel-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wa-panel-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
}

.wa-panel-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.wa-online-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #25D366;
    border-radius: 50%;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

.wa-panel-close {
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wa-panel-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.wa-panel-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Panel Body */
.wa-panel-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Bubbles */
.wa-message {
    max-width: 90%;
    padding: 0.875rem 1rem;
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-message-incoming {
    background-color: #ffffff;
    color: #1f2937;
    align-self: flex-start;
}

.wa-message p {
    margin: 0;
}

.wa-message p + p {
    margin-top: 0.5rem;
}

/* Lead Form */
.wa-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wa-form-field {
    width: 100%;
}

.wa-form input,
.wa-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    background-color: #ffffff;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.wa-form input::placeholder,
.wa-form textarea::placeholder {
    color: #9ca3af;
}

.wa-form input:focus,
.wa-form textarea:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.wa-form textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.wa-form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background-color: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.wa-form-submit:hover {
    background-color: #20c35e;
}

.wa-form-submit:active {
    transform: scale(0.98);
}

.wa-form-submit svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Panel Footer */
.wa-panel-footer {
    padding: 0.75rem 1.25rem;
    background-color: #e8e3db;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-panel-footer-logo {
    height: 1rem;
    width: auto;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.wa-panel-footer-logo:hover {
    opacity: 0.7;
}
