/* Smart Publish AI - Chatbot Stílusok */

#spc-chat-widget,
#spc-chat-widget * {
    box-sizing: border-box;
}

#spc-chat-widget {
    position: fixed;
    bottom: 40px;
    right: 20px;
    z-index: 999999;
}

#spc-chat-toggle {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: none !important;
    color: white !important;
    font-size: 24px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: transform 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background-image: none !important;
}

#spc-chat-toggle:hover {
    transform: scale(1.05) !important;
}

#spc-chat-toggle svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
}

#spc-chat-toggle img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

#spc-chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 370px;
    /* 580 px (2026-09-24): a kisero mondat + az urlap egyutt elferjen; kis kepernyon
       a max-height fogja. Korabban 500 px volt, es a mondat kigorgott a kartya fole. */
    height: 580px;
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

#spc-chat-container.spc-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.spc-chat-header {
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    width: 100%;
}

.spc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spc-avatar {
    background: rgba(255,255,255,0.2) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.spc-avatar svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
}

.spc-avatar img {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.spc-title {
    display: flex;
    flex-direction: column;
}

.spc-title strong {
    font-size: 15px;
    line-height: 1.2;
}

.spc-status {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.spc-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.spc-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spc-minup-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.spc-minup-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

.spc-icon-btn {
    background: transparent !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    padding: 4px !important;
    opacity: 0.8 !important;
    transition: opacity 0.2s, transform 0.2s, background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    box-shadow: none !important;
}

.spc-icon-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.spc-icon-btn svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: currentColor !important;
}

/* Céges Info Panel Lenyíló Stílusa */
#spc-company-info-panel {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 200px;
    opacity: 1;
    position: relative;
    z-index: 5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#spc-company-info-panel.spc-info-hidden {
    max-height: 0;
    opacity: 0;
    border-bottom: none;
}

.spc-info-content {
    padding: 15px 20px;
}

.spc-info-content h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

.spc-info-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spc-info-content li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #475569;
}

.spc-info-content li:last-child {
    margin-bottom: 0;
}

.spc-info-content li svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.spc-info-content li a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.spc-info-content li a:hover {
    text-decoration: underline;
    color: #2563eb;
}

/* Chat üzenetek területe */
#spc-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.spc-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.spc-message p {
    margin: 0 0 8px 0;
}
.spc-message p:last-child {
    margin-bottom: 0;
}
.spc-message ul, .spc-message ol {
    margin: 0 0 10px 20px;
    padding: 0;
}

.spc-message.spc-bot {
    background: #f1f5f9;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.spc-message.spc-user {
    background: #e2e8f0;
    color: #0f172a;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Inline Minup Gomb a chat buborékon belül */
.spc-minup-btn-inline {
    display: inline-block;
    background: #3b82f6;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 15px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.spc-minup-btn-inline:hover {
    background: #2563eb;
}

/* Gyorsgombok (Quick Replies) Stílusai */
/* Gyors indítás felirat (a chip-konténer első, teljes szélességű eleme) */
.spc-qr-label {
    flex-basis: 100%;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin: 0 0 2px;
    letter-spacing: .01em;
}

/* Gyorsgombok - lágy chipek (természetes sortöréssel) */
.spc-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 6px;
    background: #ffffff;
}

.spc-qr-btn {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfd3f7 !important;
    border-radius: 18px !important;
    padding: 8px 13px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    text-align: left !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-shadow: none !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.spc-qr-btn:hover,
.spc-qr-btn:focus {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18) !important;
    transform: translateY(-1px) !important;
}

/* „Vissza a gyorsgombokhoz" - középre igazított chip az új dizájnhoz */
#spc-back-to-menu {
    text-align: center;
    padding: 2px 16px 12px;
    background: #ffffff;
}

.spc-qr-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfd3f7 !important;
    border-radius: 18px !important;
    padding: 8px 16px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    text-shadow: none !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.spc-qr-back-btn:hover {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18) !important;
    transform: translateY(-1px) !important;
}

.spc-chat-input-area {
    padding: 15px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* JAVÍTOTT: 1 sorosra húzott karcsú beviteli mező */
#spc-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 9px 15px;
    height: 40px;
    min-height: 40px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    outline: none;
    font-family: inherit;
    line-height: 20px;
    transition: border-color 0.2s;
    overflow: hidden;
}

#spc-chat-input:focus {
    border-color: #94a3b8;
}

#spc-chat-send {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#spc-chat-send:hover {
    transform: scale(1.1);
}

#spc-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Figyelmezteto sor az uzenetkuldo alatt (v2.4.0, tulajdonosi szoveg).
   A regi "Ai Sales Asszisztens" marka-lablec v2.4.1-ben tulajdonosi keresre kikerult:
   az ugyfelek latogatoinak nem kell latnia a bovitmeny nevet. */
.spc-chat-disclaimer {
    text-align: center;
    padding: 4px 15px 10px;
    font-size: 10.5px;
    line-height: 1.4;
    color: #94a3b8;
    background: #ffffff;
}

/* Javasolt valaszgombok a bot valasza alatt (v2.4.0, a "B" lagy-chip dizajn). */
.spc-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-self: flex-start;
    max-width: 92%;
    margin: 2px 0 4px;
}
.spc-suggest-chip {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfd3f7 !important;
    border-radius: 18px !important;
    padding: 7px 12px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    opacity: 1 !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}
.spc-suggest-chip:hover {
    background: #dbeafe !important;
    border-color: #93b4f2 !important;
}

/* 👍/👎 visszajelzes egy bot-valaszra (v2.4.0). */
.spc-fb {
    display: flex;
    gap: 4px;
    align-self: flex-start;
    margin: -4px 0 2px 4px;
}
.spc-fb-btn {
    background: transparent !important;
    border: none !important;
    padding: 2px 4px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    filter: grayscale(1);
    opacity: 0.55 !important;
    transition: all 0.15s ease !important;
}
.spc-fb-btn:hover {
    background: #f1f5f9 !important;
    filter: none;
    opacity: 1 !important;
}
.spc-fb-btn.spc-fb-active {
    background: #eff6ff !important;
    filter: none;
    opacity: 1 !important;
}

.spc-typing {
    display: flex;
    gap: 4px;
    padding: 15px 16px;
    align-items: center;
}

.spc-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: spc-bounce 1.4s infinite ease-in-out both;
}

.spc-dot:nth-child(1) { animation-delay: -0.32s; }
.spc-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes spc-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    #spc-chat-container {
        width: calc(100vw - 40px) !important;
        height: calc(100vh - 120px) !important;
        max-height: 600px;
        bottom: 70px !important;
        right: 0 !important;
    }
    #spc-chat-toggle {
        width: 50px !important;
        height: 50px !important;
    }
    #spc-chat-toggle svg {
        width: 24px !important;
        height: 24px !important;
    }
    #spc-chat-toggle img {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Minup Felugró Ablak (Modal) Stílusok */
#spc-minup-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#spc-minup-modal-overlay.spc-active {
    opacity: 1;
    pointer-events: auto;
}

#spc-minup-modal-content {
    background: #fff;
    width: 95%;
    max-width: 600px;
    height: 90vh;
    max-height: 700px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(30px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

#spc-minup-modal-overlay.spc-active #spc-minup-modal-content {
    transform: translateY(0);
}

.spc-modal-header {
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spc-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
    font-family: inherit;
}

.spc-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.spc-modal-close:hover {
    color: #ef4444;
}

.spc-modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #ffffff;
}
/* Google Calendar foglalóoldal: szélesebb és magasabb, mint a Minup widget. */
#spc-minup-modal-overlay[data-provider="google"] #spc-minup-modal-content {
    max-width: 960px;
    max-height: 820px;
}
.spc-modal-header .spc-modal-open-new {
    color: #64748b;
    font-weight: 600;
}
.spc-modal-header .spc-modal-open-new:hover { color: #1e293b; }
/* ===== 3.1.0 - AI Asszisztensek ===== */
.spc-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: flex-start;
    max-width: 100%;
}
.spc-role-chip {
    background: #ffffff;
    border: 1.5px solid #3b82f6;
    color: #3b82f6;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    line-height: 1.3;
}
.spc-role-chip:hover { background: #eff6ff; }

.spc-note {
    align-self: center;
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px 12px;
    text-align: center;
}

.spc-message.spc-action-msg { padding: 8px 12px; }

.spc-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: flex-start;
    width: 92%;
}
.spc-product {
    display: flex;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.spc-product img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
}
.spc-product-body { flex: 1; min-width: 0; }
.spc-product-name {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a !important;
    text-decoration: none !important;
    line-height: 1.3;
}
.spc-product-price { font-weight: 700; font-size: 14px; margin: 2px 0; }
.spc-product-desc { font-size: 12px; color: #475569; line-height: 1.4; margin-bottom: 6px; }
.spc-product-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.spc-btn-primary {
    display: inline-block;
    background: #3b82f6;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    line-height: 1.3;
}
.spc-btn-primary:hover { filter: brightness(.92); }
.spc-btn-primary:disabled { opacity: .6; cursor: default; }
.spc-btn-secondary {
    display: inline-block;
    background: #ffffff;
    border: 1.5px solid #3b82f6;
    color: #3b82f6 !important;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.3;
}
.spc-btn-secondary:hover { background: #eff6ff; }

.spc-lead-card { width: 92%; max-width: 92%; }
.spc-lead-title { font-weight: 700; margin-bottom: 8px; font-size: 13px; }
.spc-lead-form { display: flex; flex-direction: column; gap: 6px; }
.spc-lead-form input,
.spc-lead-form select,
.spc-lead-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
    font-family: inherit;
}
/* A lenyíló ugyanazt a lágy stílust kapja, mint a többi mező (saját nyíllal,
   hogy a téma fekete keretes alapértelmezése ne üssön el a formától). */
.spc-lead-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    padding-right: 32px;
    line-height: 1.4;
}
.spc-lead-form textarea { resize: vertical; min-height: 48px; }
.spc-lead-form .spc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.spc-lead-form button { align-self: flex-start; margin-top: 2px; }
.spc-lead-status { font-size: 12px; min-height: 14px; }

#spc-role-switch svg { width: 20px; height: 20px; }

/* Karakterszámláló a beviteli mező alatt (csak az utolsó negyedben jelenik meg). */
.spc-chat-counter {
    min-height: 0 !important;
    padding: 0 15px !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
    text-align: right !important;
    color: #94a3b8 !important;
    background: #ffffff !important;
}
.spc-chat-counter.spc-counter-warn { color: #b45309 !important; }
.spc-chat-counter.spc-counter-full { color: #b91c1c !important; font-weight: 600 !important; }

/* Adatkezelesi hozzajarulas az urlapon (GDPR, 2026-09-23). */
.spc-lead-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	line-height: 1.45;
	color: #475569;
	cursor: pointer;
}
.spc-lead-consent input[type="checkbox"] {
	margin: 2px 0 0;
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	cursor: pointer;
}
.spc-lead-consent a {
	color: inherit;
	text-decoration: underline;
}
