:root {
    --mps-blue: #00597C;
    --mps-green: #71A74F;
    --mps-wa: #25D366;
    --mps-shadow: 0 10px 30px rgba(0, 89, 124, 0.3);
}

/* Green Black Night Theme Overrides (Enterprise Special) */
.mps-theme-green-black-night {
    --mps-blue: #0c1824;
    --mps-accent: #71A74F;
    --mps-text-light: #e2e8f0;
}

/* Master Branding Icons */
.mps-wa-icon-master {
    width: 20px !important;
    height: 20px !important;
    filter: brightness(0) invert(1);
    display: block;
}

.mps-master-logo {
    height: 24px;
    margin-bottom: 8px;
    display: block;
}

.mps-esr-master {
    height: 16px;
    opacity: 0.9;
    filter: brightness(0) invert(1);
}

.mps-footer-compliance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.mps-theme-green-black-night .mps-card,
.mps-theme-green-black-night .mps-menu-header,
.mps-theme-green-black-night .mps-chat-footer {
    background: #111821;
    border-color: rgba(255, 255, 255, 0.1);
}

.mps-theme-green-black-night .mps-bubble {
    background: #0c1824;
    border: none !important;
    animation: mps-pulse-green 2s infinite;
    box-shadow: 0 10px 30px rgba(113, 167, 79, 0.2);
}

.mps-theme-green-black-night .mps-wa-indicator {
    border-color: #0c1824;
}

.mps-theme-green-black-night .mps-tooltip {
    background-color: #111821 !important;
    border: none !important;
    color: white !important;
}

.mps-theme-green-black-night .mps-tooltip-arrow {
    background: #111821 !important;
}

@keyframes mps-pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(113, 167, 79, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(113, 167, 79, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(113, 167, 79, 0);
    }
}

.mps-theme-green-black-night .mps-menu-header h3 {
    color: white;
}

.mps-theme-green-black-night .mps-menu-header p {
    color: #94a3b8;
}

.mps-theme-green-black-night .mps-option-btn {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.mps-theme-green-black-night .mps-option-title {
    color: white;
}

.mps-theme-green-black-night .mps-option-desc {
    color: #94a3b8;
}

.mps-theme-green-black-night .mps-submit-btn {
    background: var(--mps-accent);
    box-shadow: 0 4px 15px rgba(113, 167, 79, 0.2);
}

.mps-theme-green-black-night .mps-submit-btn:hover {
    background: #5d8a41;
}

.mps-theme-green-black-night .mps-chat-header {
    background: #0c1824;
}

.mps-theme-green-black-night .mps-chat-messages {
    background: #0a0f14;
}

.mps-theme-green-black-night .mps-msg-assistant {
    background: #1a232e;
    border-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.mps-theme-green-black-night .mps-form-group label {
    color: #71A74F;
}

.mps-theme-green-black-night .mps-form-group input {
    background: #0a0f14;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#mps-assistant-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Maven Pro', 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

@media (min-width: 768px) {
    #mps-assistant-container {
        bottom: 32px;
        right: 32px;
    }
}

/* Hide when loading hub is active */
body.mps-loading-active #mps-assistant-container {
    display: none !important;
}

.mps-bubble-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Pulsing Bubble (Matched with Production) */
.mps-bubble {
    width: 56px;
    height: 56px;
    background: var(--mps-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    animation: mps-pulse-subtle 2s infinite;
    position: relative;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 89, 124, 0.3);
}

.mps-wa-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--mps-wa);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--mps-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.mps-bubble:hover {
    transform: scale(1.1);
}

.mps-bubble i {
    font-size: 24px;
}

@keyframes mps-pulse-subtle {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 89, 124, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 89, 124, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 89, 124, 0);
    }
}

@keyframes mps-bounce-subtle {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Card Common */
.mps-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    width: 320px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    display: none;
    animation: mps-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mps-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Menu */
.mps-menu-header {
    padding: 24px;
    background: white;
    border-bottom: 1px solid #f9f9f9;
}

.mps-menu-header h3 {
    margin: 0;
    color: var(--mps-blue);
    font-size: 18px;
    font-weight: 700;
}

.mps-menu-header p {
    margin: 5px 0 0;
    color: #666;
    font-size: 11px;
}

.mps-options-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mps-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    background: #fbfbfb;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.mps-option-btn:hover {
    background: #f0f7ff;
    border-color: #d1e9ff;
    transform: translateY(-2px);
}

.mps-wa-option {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.mps-wa-option:hover {
    background: #dcfce7;
    border-color: #bbf7d0;
}

.mps-status-dot {
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: mps-status-pulse 2s infinite;
}

@keyframes mps-status-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.mps-close-x {
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    font-size: 18px;
}

.mps-close-x:hover {
    color: #64748b;
}

.mps-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.mps-option-text p {
    margin: 0;
}

.mps-option-title {
    font-weight: 700;
    font-size: 14px;
}

.mps-option-desc {
    font-size: 10px;
    color: #666;
}

.mps-menu-footer {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #f8fafc;
}

.mps-footer-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: mps-status-pulse 2s infinite;
}

.mps-footer-text {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Form */
.mps-form-body {
    padding: 24px;
}

.mps-form-group {
    margin-bottom: 15px;
}

.mps-form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.mps-form-group input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fdfdfd;
    font-size: 14px;
    box-sizing: border-box;
}

/* Privacy Link Styling */
.mps-form-privacy-text {
    font-size: 11px;
    color: #94a3b8;
    /* Gray for readability in dark themes */
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.4;
    padding: 0 10px;
}

.mps-form-privacy-text a {
    color: #e2e8f0;
    /* White/Light gray */
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.mps-form-privacy-text a:hover {
    color: #71A74F;
    /* Green hover as requested */
}

/* Circular Spinner (HPE ProLiant Style) */
.mps-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
}

.mps-spinner-circle {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(113, 167, 79, 0.2);
    border-top: 3px solid #71A74F;
    border-radius: 50%;
    animation: mps-spin 1s linear infinite;
}

@keyframes mps-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.mps-loading-text {
    font-size: 12px;
    color: #71A74F;
    font-weight: 700;
}

.mps-submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: var(--mps-blue);
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 89, 124, 0.2);
}

.mps-submit-btn:hover {
    background: #004a66;
    transform: translateY(-2px);
}

/* Chat */
.mps-chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.mps-chat-header {
    background: var(--mps-blue);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mps-chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mps-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.mps-msg-assistant {
    background: white;
    border: 1px solid #eee;
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.mps-msg-user {
    background: var(--mps-blue);
    color: white;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.mps-typing {
    font-size: 10px;
    color: #aaa;
    font-style: italic;
    margin-left: 15px;
    margin-bottom: 10px;
    display: none;
}

.mps-chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.mps-chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mps-chat-opt {
    padding: 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mps-chat-opt:hover {
    background: #e8f5e9;
    border-color: var(--mps-green);
}