/* ── WA Rotador — Widget Frontend ── */

#war-widget-wrap {
    position: fixed;
    bottom: 1em;
    right: 1em;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
}


#war-widget-wrap *{
	margin-top:initial;
	margin-bottom:initial;
	margin-right:initial;
	margin-left:initial;
	margin:initial;
	min-height:initial;
}

#war-widget-wrap p{margin-bottom:.75em;}


/* ── FAB (botón flotante) ── */

#war-fab {
    width: 4em;
    height: 4em;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 .25em .75em rgba(0, 0, 0, .25);
    transition: transform .2s ease, box-shadow .2s ease;
}

#war-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 .4em 1em rgba(0, 0, 0, .3);
}

#war-fab .fa-whatsapp {
    font-size: 2em;
    color: #fff;
    pointer-events: none;
}

/* ── Chat popup ── */

#war-chat-popup {
    position: absolute;
    bottom: 5em;
    right: 0;
    width: 24em;
    max-width: calc(100vw - 2.5em);
    border-radius: 1em;
    overflow: hidden;
    box-shadow: 0 .5em 2em rgba(0, 0, 0, .22);
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity .25s ease, transform .25s ease;
}

#war-chat-popup.war-hidden {
    opacity: 0;
    transform: translateY(1em) scale(.95);
    pointer-events: none;
}

/* ── Header ── */

.war-chat-header {
    background: #075E54;
    color: #fff;
    padding: 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.war-chat-header-info {
    display: flex;
    align-items: center;
    gap: .75em;
}

.war-avatar {
    flex-shrink: 0;
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    overflow: hidden;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
}

.war-avatar .fa-whatsapp {
    font-size: 1.5em;
    color: #fff;
}

.war-chat-header-text {
    display: flex;
    flex-direction: column;
}

.war-chat-title {
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
}

.war-chat-subtitle {
    font-size: .75em;
    opacity: .85;
    line-height: 1.3;
}

#war-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    line-height: 1;
    padding: 0 .25em;
    opacity: .8;
    transition: opacity .15s;
}

#war-chat-close:hover {
    opacity: 1;
}

/* ── Body ── */

.war-chat-body {
    background: #E5DDD5;
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M20 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4z' fill='%23ccc' fill-opacity='.15'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='400' height='400' fill='url(%23p)'/%3E%3C/svg%3E");
    padding: 1.5em 1em;
    min-height: 8em;
    max-height: 17.5em;
    overflow-y: auto;
}

.war-chat-bubble {
    background: #fff;
    border-radius: 0 .5em .5em .5em;
    padding: .7em 1em;
    font-size: 1em;
    line-height: 1.5;
    color: #303030;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
    position: relative;
    word-wrap: break-word;
}

.war-chat-bubble p {
    margin: 0 0 .4em;
}

.war-chat-bubble p:last-child {
    margin-bottom: 0;
}

.war-chat-bubble::before {
    content: "";
    position: absolute;
    top: 0;
    left: -.5em;
    width: 0;
    height: 0;
    border-top: 0 solid transparent;
    border-right: .5em solid #fff;
    border-bottom: .5em solid transparent;
}

/* ── Footer / Input ── */

.war-chat-footer {
    background: #F0F0F0;
    padding: .7em .75em;
    display: flex;
    align-items: flex-end;
    gap: .5em;
}

#war-user-msg {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 1.5em;
    padding: .7em 1em;
    font-size: 1em;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    max-height: 6.5em;
    transition: border-color .15s;
	overflow:hidden;
	min-height:3em;
}

#war-user-msg:focus {
    border-color: #25D366;
}

#war-send-btn {
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}

#war-send-btn:hover {
    background: #1ebe5a;
}

#war-send-btn .fa-paper-plane {
    font-size: 1em;
    color: #fff;
    pointer-events: none;
}

/* ── Botón Consultar precio ── */

.war-consult-price {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    line-height: 1;
    color: #25D366;
    background: #fff;
    border: 1px solid #25D366;
    border-radius: .5em;
    padding: .5em;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
    box-sizing: border-box;
}

.war-consult-price:hover {
    background: #25D366;
    color: #fff;
}

.war-consult-price .fa-whatsapp {
    font-size: 1.2em;
    pointer-events: none;
}

/* ── Responsive ── */

@media (max-width: 420px) {
    #war-chat-popup {
        width: calc(100vw - 2em);
        right: -.25em;
        bottom: 4.5em;
        border-radius: .75em;
    }
}
