
/* RWI PROFESSOR UNAPIEDRA GLOBAL */

.rwi-pu-launcher,
.rwi-pu-panel,
.rwi-pu-panel * {
    box-sizing: border-box;
}

.rwi-pu-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000000;

    width: 68px;
    height: 68px;
    padding: 0;

    border: 2px solid rgba(255,255,255,.75);
    border-radius: 50%;

    background: #0a633f;

    box-shadow:
        0 14px 34px rgba(0,0,0,.28);

    overflow: hidden;
    cursor: pointer;
}

.rwi-pu-launcher img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rwi-pu-panel {
    position: fixed;
    right: 22px;
    bottom: 102px;
    z-index: 1000001;

    width: min(
        390px,
        calc(100vw - 32px)
    );

    max-height: min(
        650px,
        calc(100vh - 130px)
    );

    display: none;
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid rgba(0,82,52,.18);

    border-radius: 18px;

    background: #ffffff;
    color: #173228;

    box-shadow:
        0 24px 70px rgba(0,0,0,.25);

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.rwi-pu-panel.is-open {
    display: flex;
}

.rwi-pu-header {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    color: #ffffff;
    background: #064f33;
}

.rwi-pu-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;

    border-radius: 50%;
    overflow: hidden;

    border:
        1px solid rgba(255,255,255,.5);
}

.rwi-pu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rwi-pu-title {
    min-width: 0;
    flex: 1 1 auto;
}

.rwi-pu-title strong {
    display: block;

    font-size: 16px;
    line-height: 1.2;
}

.rwi-pu-title small {
    display: block;

    margin-top: 3px;

    font-size: 11px;
    line-height: 1.25;

    opacity: .8;
}

.rwi-pu-close {
    width: 38px;
    height: 38px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    color: #ffffff;

    background:
        rgba(255,255,255,.12);

    font-size: 22px;

    cursor: pointer;
}

.rwi-pu-log {
    min-height: 250px;
    flex: 1 1 auto;

    padding: 16px;

    overflow-y: auto;

    background: #f5f8f6;
}

.rwi-pu-message {
    width: fit-content;
    max-width: 88%;

    margin: 0 0 11px;
    padding: 10px 12px;

    border-radius: 12px;

    font-size: 14px;
    line-height: 1.45;

    white-space: pre-wrap;
}

.rwi-pu-user {
    margin-left: auto;

    color: #ffffff;
    background: #087249;
}

.rwi-pu-ai {
    margin-right: auto;

    color: #173228;
    background: #ffffff;

    border:
        1px solid #dce7e1;
}

.rwi-pu-thinking {
    color: #60746b;
    background: #edf3ef;
}

.rwi-pu-error {
    color: #861e1e;

    background: #fff0f0;

    border-color: #f0caca;
}

.rwi-pu-sources {
    margin-top: 10px;
    padding-top: 8px;

    border-top:
        1px solid #dce7e1;
}

.rwi-pu-sources strong {
    display: block;

    margin-bottom: 5px;

    color: #064f33;

    font-size: 11px;
}

.rwi-pu-sources a {
    display: block;

    margin: 4px 0;

    color: #087249;

    font-size: 11px;
    line-height: 1.3;

    word-break: break-word;
}

.rwi-pu-form {
    display: grid;

    grid-template-columns:
        minmax(0,1fr) 46px;

    gap: 8px;

    padding: 12px;

    background: #ffffff;

    border-top:
        1px solid #dce7e1;
}

.rwi-pu-input {
    min-width: 0;
    height: 46px;

    padding: 0 12px;

    border:
        1px solid #ccd9d2;

    border-radius: 10px;

    color: #173228;
    background: #ffffff;

    font-size: 14px;

    outline: none;
}

.rwi-pu-input:focus {
    border-color: #087249;

    box-shadow:
        0 0 0 3px
        rgba(8,114,73,.12);
}

.rwi-pu-send {
    width: 46px;
    height: 46px;
    padding: 0;

    border: 0;
    border-radius: 10px;

    color: #ffffff;
    background: #087249;

    font-size: 19px;
    font-weight: 700;

    cursor: pointer;
}

.rwi-pu-send:disabled {
    cursor: wait;
    opacity: .55;
}

/* WhatsApp */

.rwi-pu-whatsapp {
    appearance: none;

    display: flex;
    align-items: center;
    gap: 11px;

    width: calc(100% - 24px);

    margin:
        0 12px 10px;

    padding:
        10px 12px;

    border:
        1px solid #d7e3dc;

    border-radius: 12px;

    color: #173228;
    background: #ffffff;

    font: inherit;
    text-align: left;

    cursor: pointer;
}

.rwi-pu-whatsapp:hover {
    border-color: #25d366;
    background: #f2fff7;
}

.rwi-pu-whatsapp:focus-visible {
    outline:
        3px solid
        rgba(37,211,102,.30);

    outline-offset: 2px;
}

.rwi-pu-whatsapp-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    border-radius: 50%;

    color: #ffffff;
    background: #25d366;

    font-size: 16px;
    font-weight: 700;
}

.rwi-pu-whatsapp-text {
    display: block;
    min-width: 0;
}

.rwi-pu-whatsapp-text strong {
    display: block;

    font-size: 13px;
    line-height: 1.25;
}

.rwi-pu-whatsapp-text small {
    display: block;

    margin-top: 3px;

    color: #60746b;

    font-size: 10px;
    line-height: 1.35;
}

.rwi-pu-footer {
    padding:
        0 12px 12px;

    color: #60746b;
    background: #ffffff;

    font-size: 10px;
    line-height: 1.35;
}

@media (max-width: 620px) {

    .rwi-pu-launcher {
        right: 16px;
        bottom: 16px;

        width: 60px;
        height: 60px;
    }

    .rwi-pu-panel {
        right: 16px;
        bottom: 88px;

        width:
            calc(100vw - 32px);

        max-height:
            calc(100vh - 110px);
    }
}


/* RWI PROFESSOR WHATSAPP WACHTSTAND */
.rwi-pu-whatsapp:disabled {
    cursor: default;
    opacity: 0.72;
}

.rwi-pu-whatsapp:disabled:hover {
    border-color: #d7e3dc;
    background: #ffffff;
}
