#orac-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#orac-chat-toggle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#orac-chat-toggle:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
}

.orac-hidden {
    display: none !important;
}

/* Облаче за поздрав */
#orac-chat-badge {
    position: absolute;
    bottom: 14px;
    right: 78px;
    background: #ffffff;
    color: #0f172a;
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: oracBounce 3s infinite ease-in-out;
}

.orac-badge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.3;
}

.orac-badge-text span {
    font-weight: 600;
    color: #0f172a;
}

.orac-badge-text small {
    font-size: 11px;
    color: #64748b;
}

#orac-chat-badge::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
    filter: drop-shadow(1px 0 1px rgba(226, 232, 240, 0.8));
}

#orac-badge-close {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

#orac-badge-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

@keyframes oracBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Главен прозорец на чатот - Модерен и заоблен */
#orac-chat-box {
    width: 380px;
    max-width: 92vw;
    height: 560px;
    max-height: 82vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    animation: oracOpenUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes oracOpenUp {
    0% { opacity: 0; transform: translateY(15px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.orac-chat-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#orac-chat-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#orac-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#orac-chat-messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
}

.orac-message {
    max-width: 84%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.orac-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.orac-message.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* Стил за кликабилни линкови во пораките */
.orac-chat-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    word-break: break-all;
}
.orac-message.user .orac-chat-link {
    color: #93c5fd;
}

.orac-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.orac-btn-action {
    display: block;
    text-align: center;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    color: white !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, opacity 0.2s;
}
.orac-btn-action:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.orac-btn-viber { background-color: #7360f2; }
.orac-btn-whatsapp { background-color: #25d366; }
.orac-btn-phone { background-color: #0284c7; }
.orac-btn-email { background-color: #475569; cursor: pointer; border: none; width: 100%; }

.orac-chat-footer {
    padding: 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

#orac-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

#orac-input-field {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 11px 16px;
    outline: none;
    font-size: 14px;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s;
}

#orac-input-field:focus {
    border-color: #2563eb;
    background: #ffffff;
}

#orac-send-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s;
}

#orac-send-btn:hover {
    transform: scale(1.05);
}

#orac-email-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#orac-email-form input, #orac-email-form textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    background: #f8fafc;
}

#orac-email-form button {
    padding: 11px;
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.orac-secondary-btn {
    background: #94a3b8 !important;
}

/* МОБИЛНА ОПТИМИЗАЦИЈА — Стеснат и модерен изглед на телефон */
@media (max-width: 480px) {
    #orac-chat-widget {
        bottom: 16px !important;
        right: 16px !important;
    }

    #orac-chat-badge {
        right: 0 !important;
        bottom: 72px !important;
        left: auto !important;
        white-space: normal !important;
        max-width: 240px !important;
        font-size: 11px !important;
        padding: 9px 12px !important;
    }

    #orac-chat-badge::after {
        right: 20px !important;
        top: 100% !important;
        transform: none !important;
        border-width: 8px 6px 0 6px !important;
        border-color: #ffffff transparent transparent transparent !important;
    }

    #orac-chat-box {
        position: fixed !important;
        bottom: 84px !important;
        right: 12px !important;
        left: auto !important;
        width: 310px !important;
        max-width: 88vw !important;
        height: 440px !important;
        max-height: 65vh !important;
        border-radius: 20px !important;
    }

    #orac-input-field {
        font-size: 15px !important;
    }
}