.mr-widget-container {
    position: fixed;
    bottom: 20px;
    right: 25px;
    width: min(400px, 95%);
    max-width: 400px;
    height: min(80vh, 850px); 
    z-index: 1000;

    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

@media (max-width: 600px) {
    .mr-widget-container,
    #mr-widget-open {
        display: none !important;
    }
}

@media (min-width: 601px) and (max-width: 992px) {
    .mr-widget-container {
        right: 16px;
        bottom: 16px;
        width: min(360px, 90%);
        height: min(65vh, 700px);
    }
}

.mr-widget-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mr-widget-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
    flex-shrink: 0;
}

.mr-widget-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.mr-widget-header h3 span {
    font-weight: 400;
    color: #00C5E9;
}

.mr-widget-feedback-reminder {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    opacity: 0.8;
}

.mr-widget-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 25px;
    background-color: #f9f9f9;
}

.mr-widget-message-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.mr-widget-sender-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.mr-widget-message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
}

.mr-widget-message-wrapper.bot .mr-widget-sender-label {
    align-self: flex-start;
}
.mr-widget-message-wrapper.bot .mr-widget-message {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.mr-widget-message-wrapper.user .mr-widget-sender-label {
    align-self: flex-end;
}
.mr-widget-message-wrapper.user .mr-widget-message {
    background-color: #00C5E9;
    color: #ffffff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.mr-widget-typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #aaa;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.3s infinite;
}
.mr-widget-typing-indicator span:nth-of-type(2) { animation-delay: 0.15s; }
.mr-widget-typing-indicator span:nth-of-type(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.mr-widget-feedback-buttons {
    margin-top: 10px;
    opacity: 0.7;
    align-self: flex-start;
}
.mr-widget-feedback-buttons button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.9rem;
}
.mr-widget-feedback-buttons button:hover { background: #e0e0e0; }

.mr-widget-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background-color: #fcfcfc;
    flex-shrink: 0;
}

.mr-widget-footer-input-bar {
    display: flex;
    gap: 10px;
}

.mr-widget-footer-input-bar input[type="text"] {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
}
.mr-widget-footer-input-bar input[type="text"]:focus {
    outline: none;
    border-color: #00C5E9;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.mr-widget-footer-input-bar button[type="submit"] {
    border: none;
    background-color: #00C5E9;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.mr-widget-footer-input-bar button[type="submit"]:hover {
    background-color: #ef7a5c;
}

.mr-widget-footer-input-bar input[type="text"],
.mr-widget-footer-input-bar button[type="submit"] {
    height: 44px;
    box-sizing: border-box;
}

.mr-widget-minimize-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    transition: color 0.3s ease;
}
.mr-widget-minimize-btn:hover {
    color: #ef7a5c;
}
#mr-widget-open {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #00C5E9;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#mr-widget-open:hover {
    background-color: #ef7a5c;
    transform: scale(1.05);
}