:root {
    --fc-color: #ff7a00;
    --fc-chat-header-gradient: linear-gradient(135deg, #4f46e5, #4338ca);
}

* {
    box-sizing: border-box;
}

/* ========== LAUNCHERS - ocultos por defecto ========== */
#fc-chat-launcher,
#fc-chat-launcher-pill,
#fc-chat-launcher-default {
    display: none !important;
}
#fc-chat-launcher.fc-visible { display: flex !important; }
#fc-chat-launcher-pill.fc-visible { display: flex !important; }
#fc-chat-launcher-default.fc-visible { display: flex !important; }

/* ========== BUBBLE LAUNCHER ========== */
#fc-chat-launcher {
    position: fixed !important;
    bottom: 10px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    padding: 0;
    cursor: pointer;
    z-index: 9999;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border: none;
}

#fc-chat-launcher:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* ========== PILL LAUNCHER ========== */
#fc-chat-launcher-pill {
    position: fixed !important;
    bottom: 10px;
    background: #0b3ea8;
    color: white;
    padding: 15px 80px 15px 25px;
    border-radius: 40px;
    font-size: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 9999;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    position: fixed !important;
}

#fc-chat-launcher-pill:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

#fc-chat-launcher-pill .icono {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #dbeafe;
    background: white;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fc-chat-launcher-pill .icono img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== DEFAULT LAUNCHER ========== */
#fc-chat-launcher-default {
    position: fixed !important;
    bottom: 10px;
    height: auto;
    border-radius: 999px;
    cursor: pointer;
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
}

#fc-chat-launcher-default:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* ========== CHAT BOXES - ocultos por defecto ========== */
#fc-chat-box-default,
#fc-chat-box-modern,
#fc-chat-box-new {
    display: none !important;
    position: fixed !important;
    bottom: 10px !important;
    z-index: 10000;
}

#fc-chat-box-pro {
    display: flex;
}

#fc-chat-box-default.visible,
#fc-chat-box-modern.visible,
#fc-chat-box-new.visible {
    display: flex !important;
}

/* ========== DEFAULT CHAT DESIGN ========== */
#fc-chat-box-default {
    width: 320px;
    height: 460px;
    max-height: calc(100vh - 110px);
    background: #fff;
    border: 1px solid #ddd;
    flex-direction: column;
    font-family: inherit;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#fc-chat-box-default .header {
    background: var(--fc-color);
    color: #fff;
    padding: 12px;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#fc-chat-box-default .msgs {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

#fc-chat-box-default .msgs::-webkit-scrollbar { width: 5px; }
#fc-chat-box-default .msgs::-webkit-scrollbar-track { background: transparent; }
#fc-chat-box-default .msgs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 5px; }
#fc-chat-box-default .msgs::-webkit-scrollbar-thumb:hover { background: #bbb; }

#fc-chat-box-default .m {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    word-wrap: break-word;
}

#fc-chat-box-default .m.l {
    background: #e4e6eb;
    color: #000;
    align-self: flex-start;
}

#fc-chat-box-default .m.r {
    background: var(--fc-color);
    color: #fff;
    align-self: flex-end;
}

#fc-chat-box-default .inputBox {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
}

#fc-chat-box-default .inputBox input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-size: 13px;
}

#fc-chat-box-default .inputBox input:focus {
    border-color: var(--fc-color);
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.1);
}

#fc-chat-box-default .inputBox button {
    width: 40px;
    border: none;
    background: var(--fc-color);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

#fc-chat-box-default .inputBox button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

#fc-chat-box-default .footer {
    text-align: center;
    font-size: 10px;
    padding: 8px;
    border-top: 1px solid #eee;
    background: #fafafa;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#fc-chat-box-default .footer a { color: #999; text-decoration: none; }
#fc-chat-box-default .footer a:hover { text-decoration: underline; }

/* ========== MODERN CHAT DESIGN ========== */
#fc-chat-box-modern {
    width: 320px;
    height: 420px;
    max-height: calc(100vh - 110px);
    background: #f8fafc;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
}

.modern-design .chat-header {
    background: var(--fc-chat-header-gradient);
    color: white;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.modern-design .chat-header .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.modern-design .chat-header .info { flex: 1; font-size: 13px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.modern-design .chat-header .info strong { display: block; font-size: 14px; margin-bottom: 0; line-height: 1.2; }
#fc-advisor-status { font-size: 12px; color: rgba(255,255,255,0.85); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.modern-design .chat-header .online {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin: 0 5px;
    vertical-align: middle;
}

.modern-design .chat-header .close {
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.modern-design .chat-header .close:hover { transform: rotate(90deg); }

.modern-design .chat-subheader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    flex-shrink: 0;
}

.modern-design .chat-subheader .line { flex: 1; height: 1px; background: #e2e8f0; }

.modern-design .chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modern-design .chat-body::-webkit-scrollbar { width: 6px; }
.modern-design .chat-body::-webkit-scrollbar-track { background: transparent; }
.modern-design .chat-body::-webkit-scrollbar-thumb { background: #cbd5f5; border-radius: 10px; }
.modern-design .chat-body::-webkit-scrollbar-thumb:hover { background: #a5b4fc; }

.modern-design .message { max-width: 75%; padding: 10px; font-size: 14px; }
.modern-design .message.received { background: #e5e7eb; color: #111; align-self: flex-start; border-radius: 15px 15px 15px 5px; }
.modern-design .message.sent { background: var(--fc-chat-header-gradient); color: white; align-self: flex-end; border-radius: 15px 15px 5px 15px; }
.modern-design .message.system { background: transparent; color: #666; text-align: center; font-size: 12px; align-self: center; padding: 4px 0; margin: 1px 0; border: none; }

.modern-design .chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e2e8f0;
    background: white;
    gap: 10px;
    flex-shrink: 0;
}

.modern-design .chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    outline: none;
    font-size: 14px;
}

.modern-design .chat-input input:focus { border-color: var(--fc-color); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1); }

.modern-design .chat-input button {
    background: var(--fc-chat-header-gradient);
    border: none;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.modern-design .chat-input button:hover { opacity: 0.9; transform: scale(1.05); }

/* ========== PRO CHAT DESIGN ========== */
#fc-pro-wrapper {
    display: none !important;
    flex-direction: column;
    position: fixed !important;
    bottom: 10px !important;
    right: 10px !important;
    z-index: 10000;
    gap: 6px;
    width: 350px;
}

#fc-pro-wrapper.visible {
    display: flex !important;
}

#fc-chat-input-area-pro {
    display: none !important;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 350px;
    box-sizing: border-box;
}

#fc-pro-wrapper.visible #fc-chat-input-area-pro {
    display: flex !important;
}

#fc-chat-box-pro {
    width: 350px;
    height: 420px;
    max-height: calc(100vh - 160px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
    display: flex;
}

.pro-design .pro-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #e5e7eb;
    border-bottom: 1px solid #ddd;
}

.pro-design .pro-header .left { display: flex; align-items: center; gap: 10px; flex: 1; }
.pro-design .pro-header .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.pro-design .pro-header strong { display: block; font-size: 14px; color: #111; }
.pro-design .pro-header span { font-size: 12px; color: #6b7280; }
.pro-design .pro-header .online { width: 8px; height: 8px; background: #22c55e; display: inline-block; border-radius: 50%; margin: 0 4px; }
.pro-design .pro-header .actions { font-size: 18px; cursor: pointer; color: #555; }

.pro-design .pro-body { flex: 1; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: white; }
.pro-design .pro-body::-webkit-scrollbar { width: 5px; }
.pro-design .pro-body::-webkit-scrollbar-track { background: transparent; }
.pro-design .pro-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 5px; }

.pro-design .msg-row { display: flex; margin-bottom: 4px; align-items: flex-end; }
.pro-design .msg-row.right { justify-content: flex-end; }
.pro-design .mini-avatar { width: 28px; height: 28px; border-radius: 50%; margin-right: 8px; flex-shrink: 0; }
.pro-design .message { max-width: 220px; padding: 10px 12px; font-size: 14px; border-radius: 18px; word-wrap: break-word; }
.pro-design .message.received { background: #f3f4f6; border-radius: 18px; }
.pro-design .message.sent { background: var(--fc-chat-header-gradient); color: white; border-radius: 18px; }
.pro-design .time { font-size: 10px; opacity: 0.6; display: block; text-align: right; margin-top: 3px; }
.pro-design .time.right-time { text-align: right; }

#fc-chat-input-area-pro input { flex: 1; padding: 10px 14px; border: none; outline: none; border-radius: 20px; background: #f3f4f6; font-size: 14px; }
#fc-chat-input-area-pro button { background: var(--fc-chat-header-gradient); border: none; color: white; width: 38px; height: 38px; padding: 0 !important; border-radius: 50%; cursor: pointer; flex-shrink: 0; margin-left: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
#fc-chat-input-area-pro button:hover { opacity: 0.9; transform: scale(1.05); }

/* ========== NEW CHAT DESIGN ========== */
#fc-chat-box-new {
    width: 340px;
    height: 460px;
    max-height: calc(100vh - 110px);
    backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
}

.new-design .new-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; }
.new-design .new-header .left { display: flex; align-items: center; gap: 10px; }
.new-design .avatar-wrapper { position: relative; }
.new-design .avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.new-design .online-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; background: #22c55e; border-radius: 50%; border: 2px solid white; }
.new-design .new-header strong { display: block; font-size: 15px; }
.new-design .new-header span { font-size: 13px; color: #555; }
.new-design .new-header .actions { font-size: 18px; cursor: pointer; }

.new-design .new-body { flex: 1; padding: 10px; overflow-y: auto; }
.new-design .new-body::-webkit-scrollbar { width: 5px; }
.new-design .new-body::-webkit-scrollbar-track { background: transparent; }
.new-design .new-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 5px; }

.new-design .msg-row { display: flex; margin-bottom: 10px; }
.new-design .msg-row.right { justify-content: flex-end; }
.new-design .mini-avatar { width: 28px; height: 28px; border-radius: 50%; margin-right: 8px; }
.new-design .message { max-width: 220px; padding: 10px; margin: 3px 0; font-size: 14px; }
.new-design .message.received { background: #e5e7eb; border-radius: 15px 15px 15px 5px; }
.new-design .message.sent { background: var(--fc-chat-header-gradient); color: white; border-radius: 15px 15px 5px 15px; }
.new-design .time { font-size: 11px; color: #666; margin-left: 5px; }
.new-design .time.right-time { text-align: right; display: block; }

.new-design .chat-input-wrapper-new { padding: 10px; }
.new-design .new-input { display: flex; align-items: center; background: white; border-radius: 25px; padding: 8px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }
.new-design .new-input input { flex: 1; padding: 10px; border: none; outline: none; border-radius: 20px; font-size: 14px; }
.new-design .new-input button { background: var(--fc-chat-header-gradient); border: none; color: white; padding: 10px 14px; border-radius: 50%; cursor: pointer; transition: all 0.2s; }
.new-design .new-input button:hover { opacity: 0.9; transform: scale(1.05); }

/* ========== CLOSE BUTTON ========== */
.fc-close-btn {
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s;
    padding: 5px 10px;
    display: inline-block;
}
.fc-close-btn:hover { transform: rotate(90deg); opacity: 0.8; }

.modern-design .chat-header .close,
.pro-design .pro-header .actions,
.new-design .new-header .actions {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    padding: 5px 10px;
}

.modern-design .chat-header .close:hover,
.pro-design .pro-header .actions:hover,
.new-design .new-header .actions:hover {
    transform: rotate(90deg);
    opacity: 0.8;
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    font-size: 11px;
    padding: 6px;
    border-top: 1px solid #e2e8f0;
}
.footer a { color: #999; text-decoration: none; }

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    #fc-chat-box-default,
    #fc-chat-box-modern,
    #fc-chat-box-pro,
    #fc-chat-box-new {
        width: 100% !important;
        height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh !important;
    }

    #fc-chat-launcher { bottom: 15px; width: 60px; height: 60px; font-size: 22px; }
    #fc-chat-launcher-pill { bottom: 15px; font-size: 14px; padding: 12px 60px 12px 20px; }
    #fc-chat-launcher-pill .icono { width: 45px; height: 45px; border-width: 3px; }
}

#fc-send-default {
    padding: 0 !important;
    width: 40px !important;
    height: 36px !important;
    min-width: 40px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}