/* ===================================================
   CHAT FLOTANTE - SOLICITUDES Y DEDICATORIAS
=================================================== */

.request-chat-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    font-family: inherit;
}

.request-chat-floating-button {
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #2ecc71, #16a34a);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow:
        0 18px 36px rgba(22, 163, 74, 0.34),
        0 0 0 8px rgba(46, 204, 113, 0.10);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.request-chat-floating-button i {
    font-size: 21px;
}

.request-chat-floating-button:hover {
    transform: translateY(-4px);
    box-shadow:
        0 22px 44px rgba(22, 163, 74, 0.42),
        0 0 0 8px rgba(46, 204, 113, 0.14);
}

.request-chat-panel {
    position: absolute;
    right: 0;
    bottom: 78px;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 110px);
    display: none;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(46, 204, 113, 0.16), transparent 36%),
        linear-gradient(180deg, #111827, #020617);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.request-chat-widget.is-open .request-chat-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.request-chat-widget.is-open .request-chat-floating-button {
    display: none;
}

.request-chat-header {
    min-height: 74px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(2, 6, 23, 0.42);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.request-chat-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.request-chat-brand img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
}

.request-chat-brand strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.2;
}

.request-chat-brand span {
    display: block;
    margin-top: 3px;
    color: #86efac;
    font-size: 12px;
    font-weight: 800;
}

.request-chat-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    cursor: pointer;
}

.request-chat-body {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.request-chat-message {
    width: fit-content;
    max-width: 86%;
    padding: 11px 14px;
    border-radius: 18px;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

.request-chat-message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.09);
    border-bottom-left-radius: 6px;
}

.request-chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2ecc71, #16a34a);
    border-bottom-right-radius: 6px;
}

.request-chat-choices {
    display: grid;
    gap: 9px;
    margin: 6px 0 4px;
}

/* ===================================================
   MEJORA CONTRASTE BOTONES CHAT
=================================================== */

.request-chat-choices button {
    background: linear-gradient(135deg, #2ecc71, #16a34a) !important;
    border: 1px solid rgba(22, 163, 74, 0.85) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow:
        0 10px 24px rgba(22, 163, 74, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.request-chat-choices button:hover {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(22, 163, 74, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.request-chat-footer {
    padding: 13px;
    display: flex;
    gap: 10px;
    background: rgba(2, 6, 23, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.request-chat-footer input {
    flex: 1;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    outline: none;
}

.request-chat-footer input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.request-chat-footer input:focus {
    border-color: rgba(46, 204, 113, 0.65);
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.12);
}

.request-chat-footer button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #2ecc71, #16a34a);
    color: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
}

.request-chat-footer input:disabled,
.request-chat-footer button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Modo claro */

body.light-theme .request-chat-panel {
    background:
        radial-gradient(circle at top left, rgba(46, 204, 113, 0.12), transparent 36%),
        linear-gradient(180deg, #fff7ed, #ffffff);
    border-color: rgba(17, 24, 39, 0.12);
}

body.light-theme .request-chat-header,
body.light-theme .request-chat-footer {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(17, 24, 39, 0.08);
}

body.light-theme .request-chat-brand strong {
    color: #111827;
}

body.light-theme .request-chat-close {
    background: rgba(17, 24, 39, 0.08);
    color: #111827;
}

body.light-theme .request-chat-message.bot {
    background: rgba(17, 24, 39, 0.08);
    color: #111827;
}

body.light-theme .request-chat-footer input {
    background: rgba(17, 24, 39, 0.05);
    border-color: rgba(17, 24, 39, 0.12);
    color: #111827;
}

body.light-theme .request-chat-footer input::placeholder {
    color: rgba(17, 24, 39, 0.48);
}

/* ===================================================
   MEJORA CONTRASTE BOTONES CHAT
=================================================== */

.request-chat-choices button {
    background: linear-gradient(135deg, #2ecc71, #16a34a) !important;
    border: 1px solid rgba(22, 163, 74, 0.85) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow:
        0 10px 24px rgba(22, 163, 74, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.request-chat-choices button:hover {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(22, 163, 74, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

@media (max-width: 560px) {
    .request-chat-widget {
        right: 14px;
        bottom: 14px;
    }

    .request-chat-panel {
        width: calc(100vw - 28px);
        height: min(560px, calc(100vh - 96px));
        bottom: 72px;
    }

    .request-chat-floating-button span {
        display: none;
    }

    .request-chat-floating-button {
        width: 62px;
        height: 62px;
        padding: 0;
        justify-content: center;
    }
}