/* Divine Energy chat widget — self-contained (loaded on pages with and without styles.css) */

.de-chat * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.de-chat {
    --dec-primary: #2b2b2b;
    --dec-accent: #c2876b;
    --dec-card: #faf9f7;
    --dec-text: #1a1a1a;
    --dec-text-light: #555555;
    --dec-border: #e8e5e0;
    --dec-radius: 14px;
    --dec-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 95;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--dec-text);
}

.de-chat-bubble {
    height: 56px;
    padding: 0 22px 0 18px;
    border: none;
    border-radius: 999px;
    background: var(--dec-primary);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-left: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
}

.de-chat-bubble-label {
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    animation: de-chat-label-flash 1.6s ease-in-out infinite;
}

.de-chat--open .de-chat-bubble-label {
    animation: none;
}

@keyframes de-chat-label-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
    .de-chat-bubble-label {
        animation: none;
    }
}

.de-chat-bubble:hover {
    transform: scale(1.06);
    background: #404040;
}

.de-chat-bubble svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.de-chat-panel {
    display: none;
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 400px;
    height: min(704px, calc(100vh - 120px));
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--dec-border);
    border-radius: var(--dec-radius);
    box-shadow: var(--dec-shadow);
    overflow: hidden;
}

.de-chat.de-chat--open .de-chat-panel {
    display: flex;
}

.de-chat-header {
    background: var(--dec-primary);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.de-chat-header h3 {
    font-family: 'HB Set', Georgia, serif;
    font-weight: 450;
    font-size: 17px;
    letter-spacing: 0.01em;
}

.de-chat-header p {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 2px;
}

.de-chat-close {
    background: none;
    border: none;
    color: #ffffff;
    opacity: 0.8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.de-chat-close:hover {
    opacity: 1;
}

.de-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--dec-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 220px;
}

.de-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--dec-radius);
    word-wrap: break-word;
}

.de-chat-msg--bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid var(--dec-border);
    border-bottom-left-radius: 4px;
    color: var(--dec-text);
}

.de-chat-msg--user {
    align-self: flex-end;
    background: var(--dec-primary);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.de-chat-msg a {
    color: var(--dec-accent);
    font-weight: 600;
    text-decoration: underline;
}

.de-chat-msg--quote {
    font-style: italic;
    font-size: 13.5px;
    color: var(--dec-text-light);
    border-left: 3px solid var(--dec-accent);
}

.de-chat-copy {
    display: block;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 11px;
    font-style: normal;
    color: var(--dec-text-light);
    opacity: 0.7;
    cursor: pointer;
    text-decoration: underline;
}

.de-chat-copy:hover {
    opacity: 1;
    color: var(--dec-accent);
}

.de-chat-msg--typing {
    color: var(--dec-text-light);
    font-style: italic;
}

.de-chat-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.de-chat-option {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    color: var(--dec-accent);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.de-chat-option:hover {
    color: #a06a50;
}

.de-chat-option--wa {
    color: #128c7e;
}

.de-chat-option--wa:hover {
    color: #0d6e63;
}

.de-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--dec-border);
    background: #ffffff;
}

.de-chat-input {
    flex: 1;
    border: 1px solid var(--dec-border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--dec-text);
    outline: none;
}

.de-chat-input:focus {
    border-color: var(--dec-accent);
}

.de-chat-send {
    border: none;
    border-radius: 10px;
    background: var(--dec-primary);
    color: #ffffff;
    padding: 0 16px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.de-chat-send:hover {
    background: #404040;
}

.de-chat-send:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Honeypot — visually hidden, not display:none (some bots skip hidden fields) */
.de-chat-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@media (max-width: 640px) {
    .de-chat {
        bottom: 16px;
        right: 16px;
    }

    .de-chat-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 80vh;
        border-radius: var(--dec-radius) var(--dec-radius) 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}
