:root {
    --uupsc-blue: #08275f;
    --uupsc-blue-2: #145ef2;
    --uupsc-soft: #f6f9ff;
    --uupsc-border: #dce8ff;
    --uupsc-text: #172033;
    --uupsc-muted: #667085;
    --uupsc-shadow: 0 16px 45px rgba(8, 39, 95, 0.18);
}

#uupsc-chat-launcher,
#uupsc-chat-widget,
#uupsc-reminder-popup,
#uupsc-chat-widget *,
#uupsc-reminder-popup * {
    box-sizing: border-box;
    font-family: Inter, Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#uupsc-chat-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    border: 0;
    border-radius: 999px;
    padding: 13px 17px;
    background: linear-gradient(135deg, var(--uupsc-blue), var(--uupsc-blue-2));
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    box-shadow: var(--uupsc-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

#uupsc-chat-launcher .uupsc-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #32e875;
    box-shadow: 0 0 0 4px rgba(50, 232, 117, 0.20);
    animation: uupsc-blink 1.15s infinite;
}

@keyframes uupsc-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.82); }
}

#uupsc-chat-widget {
    position: fixed;
    right: 22px;
    bottom: 86px;
    z-index: 999999;
    width: 390px;
    max-width: calc(100vw - 28px);
    height: 610px;
    max-height: calc(100vh - 116px);
    background: #ffffff;
    border: 1px solid rgba(220, 232, 255, 0.95);
    border-radius: 22px;
    box-shadow: var(--uupsc-shadow);
    overflow: hidden;
    display: none;
}

#uupsc-chat-widget.uupsc-open {
    display: flex;
    flex-direction: column;
}

.uupsc-chat-header {
    padding: 16px;
    color: #fff;
    background: linear-gradient(135deg, #061d4f, #145cf0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.uupsc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .4px;
    border: 1px solid rgba(255,255,255,0.28);
}

.uupsc-title {
    font-weight: 850;
    font-size: 15px;
    line-height: 1.2;
}

.uupsc-subtitle {
    opacity: 0.86;
    font-size: 12px;
    margin-top: 3px;
}

.uupsc-close {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    border-radius: 0;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    font-weight: 950;
    display: grid;
    place-items: center;
    padding: 0;
    opacity: 1 !important;
    text-shadow: 0 1px 8px rgba(0,0,0,0.28);
}

.uupsc-close:hover,
.uupsc-close:focus {
    background: transparent !important;
    color: #ffffff !important;
    outline: none;
    transform: scale(1.06);
}

.uupsc-chat-body {
    flex: 1;
    padding: 16px 14px 10px 14px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.uupsc-msg-row {
    display: flex;
    margin-bottom: 11px;
}

.uupsc-msg-row.user {
    justify-content: flex-end;
}

.uupsc-msg {
    max-width: 84%;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--uupsc-text);
    background: #ffffff;
    border: 1px solid var(--uupsc-border);
    box-shadow: 0 4px 14px rgba(16, 58, 125, 0.05);
}

.uupsc-msg-row.bot .uupsc-msg {
    border-bottom-left-radius: 6px;
}

.uupsc-msg-row.bot.error .uupsc-msg {
    color: #c1121f;
    background: #fff5f5;
    border-color: #ffc9c9;
    font-weight: 750;
}

.uupsc-msg-row.user .uupsc-msg {
    color: #fff;
    background: linear-gradient(135deg, var(--uupsc-blue), var(--uupsc-blue-2));
    border: 0;
    border-bottom-right-radius: 6px;
}

.uupsc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 14px 0;
}

.uupsc-chip {
    border: 1px solid #c9dcff;
    background: #ffffff;
    color: #0b2e6f;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
    box-shadow: 0 3px 10px rgba(11, 46, 111, 0.05);
}

.uupsc-chip:hover,
.uupsc-chip:focus {
    background: #edf5ff;
    outline: none;
}

.uupsc-chat-input-area {
    padding: 12px;
    background: #fff;
    border-top: 1px solid #e7eefb;
    display: flex;
    align-items: center;
    gap: 9px;
}

#uupsc-text-input {
    flex: 1;
    height: 44px;
    border: 1px solid #cddcf7;
    border-radius: 14px;
    padding: 10px 12px;
    outline: none;
    font-size: 14px;
    color: var(--uupsc-text);
}

#uupsc-text-input:focus {
    border-color: #145ef2;
    box-shadow: 0 0 0 3px rgba(20, 94, 242, 0.10);
}

#uupsc-input-submit {
    height: 44px;
    min-width: 52px;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(135deg, var(--uupsc-blue), var(--uupsc-blue-2));
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.uupsc-footer-note {
    font-size: 10.5px;
    color: #74819a;
    padding: 0 14px 10px 14px;
    background: #fff;
}

#uupsc-reminder-popup {
    position: fixed;
    right: 22px;
    bottom: 86px;
    z-index: 999998;
    width: 334px;
    max-width: calc(100vw - 28px);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
    border: 1px solid #d7e6ff;
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(8, 39, 95, 0.18);
    padding: 18px 16px 15px 16px;
    display: none;
    opacity: 1 !important;
}

#uupsc-reminder-popup.uupsc-reminder-open {
    display: block !important;
}

.uupsc-reminder-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: 0 !important;
    background: transparent !important;
    color: #667085 !important;
    font-size: 22px;
    line-height: 22px;
    font-weight: 800;
    cursor: pointer;
    opacity: 1 !important;
    padding: 0;
}

.uupsc-reminder-close:hover,
.uupsc-reminder-close:focus {
    color: #172033 !important;
    background: transparent !important;
    outline: none;
}

.uupsc-reminder-text {
    color: var(--uupsc-text) !important;
    font-size: 14.5px;
    font-weight: 850;
    line-height: 1.38;
    padding-right: 24px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.uupsc-reminder-actions {
    display: flex !important;
    gap: 10px;
    opacity: 1 !important;
    visibility: visible !important;
}

.uupsc-reminder-actions button,
#uupsc-reminder-popup .uupsc-reminder-actions button {
    flex: 1;
    height: 40px;
    border: 0 !important;
    border-radius: 13px;
    color: #ffffff !important;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 900;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.uupsc-reminder-actions button:hover,
.uupsc-reminder-actions button:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
    outline: none;
    filter: brightness(1.02);
}

.uupsc-reminder-yes,
#uupsc-reminder-popup .uupsc-reminder-yes {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

.uupsc-reminder-no,
#uupsc-reminder-popup .uupsc-reminder-no {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

@media (max-width: 600px) {
    #uupsc-chat-launcher {
        right: 14px;
        bottom: 16px;
        padding: 12px 15px;
        font-size: 13.5px;
    }

    #uupsc-chat-widget {
        right: 10px;
        left: 10px;
        bottom: 74px;
        width: auto;
        height: 72vh;
        max-height: calc(100vh - 96px);
        border-radius: 20px;
    }

    #uupsc-reminder-popup {
        right: 14px;
        bottom: 76px;
        width: 310px;
    }

    .uupsc-chat-header {
        padding: 14px;
    }

    .uupsc-avatar {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 15px;
    }

    .uupsc-title {
        font-size: 14px;
    }

    .uupsc-subtitle {
        font-size: 11px;
    }

    .uupsc-msg {
        max-width: 88%;
        font-size: 13px;
    }

    .uupsc-options {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .uupsc-chip {
        width: 100%;
        text-align: left;
        border-radius: 14px;
        padding: 11px 12px;
    }
}
