/* ==========================================================================
   Footer Module Styles — Wfaucet
   Design tokens: DNA.md (primary, cta, accent, neutral palette)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Footer Logo Sizing
   -------------------------------------------------------------------------- */
.footer-logo {
    width: clamp(132px, 14vw, 188px);
    height: auto;
}

/* --------------------------------------------------------------------------
   Floating Action Buttons (FAB)
   -------------------------------------------------------------------------- */
.footer-fab {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

.footer-fab:hover {
    transform: scale(1.08);
}

.footer-fab--secondary {
    width: 44px;
    height: 44px;
    background-color: #1A1A1A;
}

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

.footer-fab--whatsapp {
    width: 56px;
    height: 56px;
    background-color: #25D366;
}

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

.footer-fab--hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
}

.footer-fab--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* --------------------------------------------------------------------------
   WhatsApp Chat Panel
   -------------------------------------------------------------------------- */
.wa-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 140px);
}

.wa-panel[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Panel Header */
.wa-panel__header {
    background-color: #075e54;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.wa-panel__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-panel__avatar {
    width: 40px;
    height: 40px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-panel__title {
    display: block;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
}

.wa-panel__subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.4;
}

.wa-panel__close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.wa-panel__close:hover {
    opacity: 1;
}

/* Panel Body */
.wa-panel__body {
    background-color: #ece5dd;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.wa-panel__bubble {
    background-color: #ffffff;
    padding: 12px 16px;
    border-radius: 0 12px 12px 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-panel__bubble p {
    color: #333333;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Panel Form */
.wa-panel__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wa-panel__field input,
.wa-panel__field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

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

.wa-panel__field textarea {
    min-height: 72px;
    resize: vertical;
}

.wa-panel__field input.is-invalid,
.wa-panel__field textarea.is-invalid {
    border-color: #e53e3e;
}

.wa-panel__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background-color: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 4px;
}

.wa-panel__submit:hover {
    background-color: #20b858;
}

.wa-panel__submit:active {
    transform: scale(0.97);
}

/* Panel Footer */
.wa-panel__footer {
    background-color: #f7f7f7;
    border-top: 1px solid #e8e8e8;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.wa-panel__online-dot {
    width: 8px;
    height: 8px;
    background-color: #25D366;
    border-radius: 50%;
    animation: wa-pulse 2s infinite ease-in-out;
}

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

.wa-panel__online-text {
    color: #25D366;
    font-weight: 600;
    font-size: 11px;
}

.wa-panel__divider {
    color: #cccccc;
    margin: 0 2px;
    font-size: 11px;
}

.wa-panel__powered {
    color: #999999;
    font-size: 11px;
}

.wa-panel__mini-logo {
    width: clamp(72px, 9vw, 96px);
    height: auto;
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .wa-panel {
        bottom: 80px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 120px);
    }

    .footer-fab--whatsapp {
        width: 52px;
        height: 52px;
    }

    .footer-fab--secondary {
        width: 40px;
        height: 40px;
    }
}

/* --------------------------------------------------------------------------
   Utility: marble-pattern (subtle texture for dark footer)
   -------------------------------------------------------------------------- */
.marble-pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 0l20 20M20 0l-20 20' stroke='%23ffffff' stroke-width='0.4' opacity='0.025'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Color Tokens (mapped from DNA.md palette)
   -------------------------------------------------------------------------- */
.bg-primary {
    background-color: #1A1A1A;
}

.bg-primary-950 {
    background-color: #111111;
}

.text-cta {
    color: #C8A96B;
}
