/* ==========================================================
   GIORGETA CHATBOT - WIDGET WORDPRESS
   Extraído de la demo original.
   Solo se ha eliminado el estilo de la página demo.
   ========================================================== */

.giorgeta-chatbot-widget {
    --giorgeta-orange: #f37000;
    --giorgeta-orange-soft: #fff3e8;
    --giorgeta-green: #007044;
    --giorgeta-green-soft: #eef7f2;
    --bg: #f6f7f5;
    --white: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --border: #dce4df;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;

    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
}

/* ==========================================================
   CHAT FLOTANTE
   Posición: inferior izquierda para evitar reCAPTCHA
   y otros elementos flotantes de la web real.
========================================================== */

.giorgeta-chatbot-widget .chat-launcher {
    position: fixed;
    left: 24px;
    right: auto;
    bottom: 24px;
    width: 82px;
    height: 82px;
    border: 4px solid var(--giorgeta-orange);
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 18px 38px rgba(243, 112, 0, 0.28);
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 8px;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-launcher:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 22px 48px rgba(243, 112, 0, 0.36);
}

.giorgeta-chatbot-widget .chat-launcher img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.giorgeta-chatbot-widget .chat-launcher-badge {
    position: absolute;
    right: -2px;
    top: -2px;
    width: 22px;
    height: 22px;
    background: var(--giorgeta-green);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-window {
    position: fixed;
    left: 24px;
    right: auto;
    bottom: 118px;
    width: min(400px, calc(100vw - 32px));
    height: min(640px, calc(100vh - 140px));
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99997;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.giorgeta-chatbot-widget .chat-header {
    background: linear-gradient(135deg, var(--giorgeta-orange), #ff9f2f);
    color: var(--white);
    padding: 14px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-header-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    background: var(--white);
    border-radius: 50%;
    padding: 5px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    display: block;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-title {
    flex: 1;
    min-width: 0;
}

.giorgeta-chatbot-widget .chat-title strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--white);
    margin: 0;
}

.giorgeta-chatbot-widget .chat-title span {
    display: block;
    font-size: 0.78rem;
    opacity: 0.95;
    margin-top: 3px;
    color: var(--white);
}

.giorgeta-chatbot-widget .chat-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.giorgeta-chatbot-widget .chat-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.giorgeta-chatbot-widget .messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, #ffffff, #f9fbfa);
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .message {
    max-width: 88%;
    padding: 10px 13px;
    border-radius: 15px;
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .message.bot {
    align-self: flex-start;
    background: var(--giorgeta-green-soft);
    color: #183327;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(0, 112, 68, 0.12);
}

.giorgeta-chatbot-widget .message.user {
    align-self: flex-end;
    background: var(--giorgeta-orange);
    color: var(--white);
    border-bottom-right-radius: 5px;
}

.giorgeta-chatbot-widget .message.typing-message {
    padding: 9px 13px;
    min-height: 36px;
    max-width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
}

.giorgeta-chatbot-widget .quick-questions {
    padding: 10px 12px;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
    background: #ffffff;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .quick-questions button {
    flex: 0 0 auto;
    border: 1px solid rgba(0, 112, 68, 0.18);
    background: #f1f8f4;
    color: var(--giorgeta-green);
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 600;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .quick-questions button:hover {
    background: #e3f3eb;
}

.giorgeta-chatbot-widget .chat-form {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-form input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    font-size: 0.92rem;
    outline: none;
    min-width: 0;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-form input:focus {
    border-color: var(--giorgeta-orange);
    box-shadow: 0 0 0 4px rgba(243, 112, 0, 0.13);
}

.giorgeta-chatbot-widget .chat-form button {
    border: none;
    border-radius: var(--radius-sm);
    background: var(--giorgeta-green);
    color: var(--white);
    padding: 0 15px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .chat-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.giorgeta-chatbot-widget .chat-note {
    padding: 0 12px 12px;
    font-size: 0.72rem;
    color: var(--muted);
    background: #ffffff;
    box-sizing: border-box;
}

.giorgeta-chatbot-widget .typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.giorgeta-chatbot-widget .typing span {
    width: 6px;
    height: 6px;
    background: var(--giorgeta-green);
    border-radius: 50%;
    animation: giorgeta-chatbot-bounce 1s infinite ease-in-out;
}

.giorgeta-chatbot-widget .typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.giorgeta-chatbot-widget .typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes giorgeta-chatbot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@media (max-width: 520px) {
    .giorgeta-chatbot-widget .chat-launcher {
        left: 16px;
        right: auto;
        bottom: 16px;
        width: 76px;
        height: 76px;
    }

    .giorgeta-chatbot-widget .chat-launcher img {
        width: 52px;
        height: 52px;
    }

    .giorgeta-chatbot-widget .chat-window {
        left: 12px;
        right: auto;
        bottom: 104px;
        width: calc(100vw - 24px);
        height: calc(100vh - 124px);
    }
}