/**
 * Panmed AI Autopilot - Frontend Widget & E-Commerce Styles
 */

/* ==========================================================================
   Plávajúci spúšťač (Trigger Button)
   ========================================================================== */
#panmed-ai-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.panmed-ai-trigger-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.panmed-ai-trigger-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.45);
}

.panmed-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.panmed-trigger-badge {
    background: #10b981;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panmed-trigger-text {
    font-size: 14px;
    font-weight: 600;
}

/* ==========================================================================
   Okno chatu (Chat Window)
   ========================================================================== */
.panmed-ai-chat-window {
    display: none;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
    border: 1px solid #e2e8f0;
    flex-direction: column;
    overflow: hidden;
    animation: panmedSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panmedSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panmed-ai-widget-expanded .panmed-ai-chat-window {
    display: flex;
}

.panmed-ai-widget-expanded .panmed-ai-trigger-btn {
    display: none;
}

/* Hlavička */
.panmed-chat-header {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panmed-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panmed-ai-avatar {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.panmed-header-titles h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.panmed-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
}

.panmed-dot {
    width: 7px;
    height: 7px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #34d399;
}

.panmed-chat-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.panmed-chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Telo správ */
.panmed-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panmed-msg {
    display: flex;
    gap: 10px;
    max-width: 88%;
}

.panmed-msg-ai {
    align-self: flex-start;
}

.panmed-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.panmed-msg-avatar {
    width: 28px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.panmed-msg-content {
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 13px;
    line-height: 1.45;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.panmed-msg-user .panmed-msg-content {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.panmed-msg-content p {
    margin: 0 0 6px 0;
}
.panmed-msg-content p:last-child {
    margin-bottom: 0;
}

/* Rýchle voľby */
.panmed-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.panmed-prompt-btn {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.panmed-prompt-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* Produktová karta v chate */
.panmed-product-rec-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.panmed-rec-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.panmed-rec-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.panmed-rec-details {
    flex: 1;
}

.panmed-rec-brand {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #0284c7;
}

.panmed-rec-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 2px 0;
}

.panmed-rec-price {
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
}

.panmed-rec-action {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.panmed-btn-action {
    flex: 1;
    background: #0284c7;
    color: #ffffff;
    text-align: center;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.panmed-btn-action:hover {
    background: #0369a1;
    color: #ffffff;
}

.panmed-btn-outline {
    background: transparent;
    color: #0284c7;
    border: 1px solid #0284c7;
}

.panmed-btn-outline:hover {
    background: #f0f9ff;
    color: #0369a1;
}

/* Hodnotenie feedbacku */
.panmed-feedback-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    font-size: 11px;
    color: #64748b;
}

.panmed-thumb-btn {
    background: none;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 11px;
    color: #475569;
    transition: all 0.2s;
}

.panmed-thumb-btn:hover {
    background: #f1f5f9;
}

/* Pätička a vstup */
.panmed-chat-footer {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.panmed-chat-input-form {
    display: flex;
    gap: 8px;
}

#panmed-ai-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

#panmed-ai-chat-input:focus {
    border-color: #0284c7;
}

.panmed-send-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.panmed-send-btn:hover {
    background: #0369a1;
}

.panmed-chat-disclaimer {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    margin-top: 6px;
}

/* ==========================================================================
   Autopilot E-Commerce Upsell Komponenty
   ========================================================================== */
.panmed-single-autopilot-upsell {
    margin: 20px 0;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 12px;
    padding: 16px;
}

.panmed-upsell-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 10px;
}

.panmed-upsell-body {
    display: flex;
    gap: 14px;
    align-items: center;
}

.panmed-upsell-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0f2fe;
}

.panmed-upsell-info strong {
    font-size: 14px;
    color: #0f172a;
}

.panmed-upsell-reason {
    margin: 4px 0 8px 0;
    font-size: 13px;
    color: #475569;
}

.panmed-cart-autopilot-banner {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 18px 0;
}

.panmed-banner-icon {
    font-size: 22px;
}

.panmed-banner-content strong {
    color: #166534;
    font-size: 14px;
}

.panmed-banner-content span {
    display: block;
    font-size: 13px;
    color: #334155;
    margin: 4px 0;
}
