/* Pizzafredag Chat Widget Styles */

#pf-chat-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 2147483647;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Floating Action Button ── */
#pf-chat-fab {
    width: 60px;
    height: 60px;
    background: #6F6E6A;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background 0.2s ease;
    border: none;
    outline: none;
}

#pf-chat-fab:hover {
    transform: scale(1.06);
    background: #5a5956;
}

#pf-chat-fab svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* ── FAB dot animation ── */
#pf-chat-fab svg circle:nth-child(1) { animation: pfFabDot 1.4s infinite ease-in-out 0s; }
#pf-chat-fab svg circle:nth-child(2) { animation: pfFabDot 1.4s infinite ease-in-out 0.2s; }
#pf-chat-fab svg circle:nth-child(3) { animation: pfFabDot 1.4s infinite ease-in-out 0.4s; }

@keyframes pfFabDot {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-2px); }
}

/* ── Chat Window ── */
#pf-chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 500px;
    height: 1020px;
    max-height: calc(100vh - 120px);
    background: #F4F3EA;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#pf-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Header ── */
.pf-chat-header {
    padding: 22px 12px 18px 16px;
    background: #6F6E6A;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
}

.pf-logo-img {
    height: 60px;
    width: auto;
    display: block;
}

.pf-logo {
    color: white;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.pf-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-top: -18px;
    margin-right: -4px;
}

/* all: unset makes these immune to any WP theme button styles */
.pf-header-btn {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.pf-header-btn:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.pf-header-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    display: block;
}

/* ── Disclaimer Banner ── */
.pf-disclaimer {
    padding: 10px 16px;
    background: #F4F3EA;
    font-size: 12px;
    color: #6b6a65;
    text-align: center;
    border-bottom: 1px solid #e0dfd8;
    flex-shrink: 0;
    line-height: 1.45;
}

/* ── Messages Area ── */
#pf-chat-messages {
    flex: 1;
    padding: 18px 16px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F4F3EA;
}

#pf-chat-messages::-webkit-scrollbar {
    width: 4px;
}
#pf-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#pf-chat-messages::-webkit-scrollbar-thumb {
    background: #d0cfc8;
    border-radius: 4px;
}

/* ── Message Bubbles ── */
.pf-message {
    max-width: 86%;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    text-align: left;
}

.pf-message.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.pf-message.user {
    align-self: flex-end;
    background: #6F6E6A;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.pf-message a {
    color: #6F6E6A;
    text-decoration: underline;
}

.pf-message ul {
    margin: 6px 0;
    padding-left: 18px;
}

.pf-message strong {
    font-weight: 600;
}

/* ── Suggestion Chips ── */
.pf-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 14px 10px;
    background: #F4F3EA;
    flex-shrink: 0;
}

.pf-suggestion-chip {
    all: unset;
    box-sizing: border-box;
    display: block;
    padding: 9px 14px;
    background: #ffffff;
    border: 1px solid #dddcd6;
    border-radius: 20px;
    font-size: 13px;
    color: #3a3a35;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.pf-suggestion-chip:hover {
    background: #eeeee6;
    border-color: #6F6E6A;
}

/* ── Privacy Note ── */
.pf-privacy {
    padding: 6px 16px;
    background: #F4F3EA;
    font-size: 11px;
    color: #9e9d96;
    text-align: center;
    flex-shrink: 0;
}

/* ── Input Area ── */
.pf-chat-input-container {
    padding: 10px 14px 14px;
    background: #F4F3EA;
    border-top: 1px solid #e0dfd8;
    flex-shrink: 0;
}

.pf-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#pf-chat-input {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #dddcd6;
    border-radius: 10px;
    padding: 10px 42px 10px 16px;
    color: #1a1a1a;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

#pf-chat-input::placeholder {
    color: #9e9d96;
}

#pf-chat-input:focus {
    border-color: #6F6E6A;
}

#pf-chat-send {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    cursor: pointer;
    color: #6F6E6A;
    transition: color 0.15s;
}

#pf-chat-send:hover {
    color: #2F3834;
}

#pf-chat-send:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

#pf-chat-send svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ── Typing Indicator ── */
.pf-typing {
    display: flex;
    gap: 5px;
    padding: 4px 2px;
    align-items: center;
}

.pf-typing-dot {
    width: 7px;
    height: 7px;
    background: #aaa9a0;
    border-radius: 50%;
    animation: pfTyping 1.4s infinite ease-in-out;
}

.pf-typing-dot:nth-child(1) { animation-delay: 0s; }
.pf-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.pf-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pfTyping {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    #pf-chat-window {
        width: calc(100vw - 24px);
        right: -4px;
        height: calc(100vh - 110px);
    }
}
