/**
 * SmartSite Bot - Frontend Styles
 * Modern, responsive chat widget design
 */

/* CSS Variables for customization */
:root {
    --smartsite-bot-primary: #007cba;
    --smartsite-bot-secondary: #f0f0f1;
    --smartsite-bot-text: #1e1e1e;
    --smartsite-bot-white: #ffffff;
    --smartsite-bot-shadow: rgba(0, 0, 0, 0.15);
    --smartsite-bot-border: #e0e0e0;
    --smartsite-bot-success: #46b450;
    --smartsite-bot-warning: #ffb900;
    --smartsite-bot-error: #dc3232;
    --smartsite-bot-header-bg: var(--smartsite-bot-primary);
    --smartsite-bot-header-text: var(--smartsite-bot-white);
    --smartsite-bot-body-bg: var(--smartsite-bot-secondary);
    --smartsite-bot-user-bubble-bg: var(--smartsite-bot-primary);
    --smartsite-bot-user-bubble-text: var(--smartsite-bot-white);
    --smartsite-bot-user-bubble-border: transparent;
    --smartsite-bot-bot-bubble-bg: var(--smartsite-bot-white);
    --smartsite-bot-bot-bubble-text: var(--smartsite-bot-text);
    --smartsite-bot-bot-bubble-border: var(--smartsite-bot-border);
    --smartsite-bot-bubble-radius: calc(var(--smartsite-bot-border-radius, 12px) + 6px);
    --smartsite-bot-input-bg: #ffffff;
    --smartsite-bot-input-placeholder: #888888;
}

/* Main Widget Container */
.smartsite-bot-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* Widget Positioning */
.smartsite-bot-widget[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.smartsite-bot-widget[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.smartsite-bot-widget[data-position="top-right"] {
    top: 20px;
    right: 20px;
}

.smartsite-bot-widget[data-position="top-left"] {
    top: 20px;
    left: 20px;
}

/* Chat Button */
.smartsite-bot-button {
    width: 60px;
    height: 60px;
    border-radius: calc(var(--smartsite-bot-border-radius, 12px) + 18px);
    background: var(--smartsite-bot-primary);
    color: var(--smartsite-bot-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--smartsite-bot-shadow);
    transition: all 0.3s ease;
    position: relative;
    border: none;
    outline: none;
}

.smartsite-bot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--smartsite-bot-shadow);
}

.smartsite-bot-button .bot-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.smartsite-bot-button svg {
    width: 24px;
    height: 24px;
}

/* Message Count Badge */
.message-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--smartsite-bot-error);
    color: var(--smartsite-bot-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Chat Window */
.smartsite-bot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--smartsite-bot-white);
    border-radius: var(--smartsite-bot-border-radius, 12px);
    box-shadow: 0 8px 40px var(--smartsite-bot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--smartsite-bot-border);
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

.smartsite-bot-widget[data-position="bottom-left"] .smartsite-bot-window {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

.smartsite-bot-widget[data-position="top-right"] .smartsite-bot-window {
    bottom: auto;
    top: 80px;
    transform-origin: top right;
}

.smartsite-bot-widget[data-position="top-left"] .smartsite-bot-window {
    bottom: auto;
    top: 80px;
    right: auto;
    left: 0;
    transform-origin: top left;
}

/* Window Animation */
.smartsite-bot-window.opening {
    animation: slideUp 0.3s ease-out;
}

.smartsite-bot-window.closing {
    animation: slideDown 0.3s ease-in;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
}

/* Header */
.smartsite-bot-header {
    background: var(--smartsite-bot-header-bg, var(--smartsite-bot-primary));
    color: var(--smartsite-bot-header-text, var(--smartsite-bot-white));
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.bot-avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.bot-avatar-icon .dashicons {
    line-height: 1;
}

.bot-details h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.bot-details .status {
    font-size: 12px;
    opacity: 0.8;
}

.close-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages Container */
.smartsite-bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--smartsite-bot-body-bg, var(--smartsite-bot-secondary));
}

.smartsite-bot-messages::-webkit-scrollbar {
    width: 6px;
}

.smartsite-bot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.smartsite-bot-messages::-webkit-scrollbar-thumb {
    background: var(--smartsite-bot-border);
    border-radius: 3px;
}

/* Messages */
.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user-message {
    align-self: flex-end;
}

.message.bot-message {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: var(--smartsite-bot-bubble-radius, calc(var(--smartsite-bot-border-radius, 12px) + 6px));
    word-wrap: break-word;
    position: relative;
}

/* Bubble tail radii */
.user-message .message-content {
    background: var(--smartsite-bot-user-bubble-bg, var(--smartsite-bot-primary));
    color: var(--smartsite-bot-user-bubble-text, var(--smartsite-bot-white));
    border: 1px solid var(--smartsite-bot-user-bubble-border, transparent);
    border-bottom-right-radius: max(4px, calc(var(--smartsite-bot-bubble-radius, var(--smartsite-bot-border-radius, 12px)) - 8px));
}

.bot-message .message-content {
    background: var(--smartsite-bot-bot-bubble-bg, var(--smartsite-bot-white));
    color: var(--smartsite-bot-bot-bubble-text, var(--smartsite-bot-text));
    border: 1px solid var(--smartsite-bot-bot-bubble-border, var(--smartsite-bot-border));
    border-bottom-left-radius: max(4px, calc(var(--smartsite-bot-bubble-radius, var(--smartsite-bot-border-radius, 12px)) - 8px));
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.bot-message .message-time {
    text-align: left;
}

/* Input Area */
.smartsite-bot-input-area {
    padding: 16px 20px;
    background: var(--smartsite-bot-white);
    border-top: 1px solid var(--smartsite-bot-border);
}

.input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.smartsite-bot-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: var(--smartsite-bot-input-bg, #ffffff);
}

.smartsite-bot-input-area input::placeholder {
    color: var(--smartsite-bot-input-placeholder, #888888);
    opacity: 1;
}

.smartsite-bot-input-area input:-ms-input-placeholder { /* IE 10+ */
    color: var(--smartsite-bot-input-placeholder, #888888);
}

.smartsite-bot-input-area input::-ms-input-placeholder { /* Microsoft Edge */
    color: var(--smartsite-bot-input-placeholder, #888888);
}

.smartsite-bot-input-area input:focus {
    border-color: var(--smartsite-bot-primary);
}

.smartsite-bot-input-area button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--smartsite-bot-primary);
    color: var(--smartsite-bot-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.smartsite-bot-input-area button:hover {
    background: var(--smartsite-bot-primary);
    transform: scale(1.05);
}

.smartsite-bot-input-area button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 8px;
}

.typing-indicator span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--smartsite-bot-primary);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Footer */
.smartsite-bot-footer {
    padding: 8px 20px;
    background: var(--smartsite-bot-secondary);
    text-align: center;
    border-top: 1px solid var(--smartsite-bot-border);
}

.smartsite-bot-footer small {
    color: var(--smartsite-bot-text);
    opacity: 0.6;
    font-size: 11px;
}

/* Quick Replies */
.smartsite-bot-quick-replies {
    margin-top: 12px;
}

.quick-replies-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.quick-reply-btn {
    background: var(--smartsite-bot-white);
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    margin: 2px;
    transition: all 0.2s ease;
    display: inline-block;
}

.quick-reply-btn:hover {
    background: var(--smartsite-bot-primary);
    color: var(--smartsite-bot-white);
    border-color: var(--smartsite-bot-primary);
}

/* Inline Chat */
.smartsite-bot-inline {
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--smartsite-bot-white);
    display: flex;
    flex-direction: column;
}

.inline-messages {
    flex: 1;
    min-height: 200px;
}

.inline-input {
    border-top: 1px solid var(--smartsite-bot-border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .smartsite-bot-window {
        width: 320px;
        height: 450px;
    }
}

@media (max-width: 480px) {
    .smartsite-bot-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .smartsite-bot-widget[data-position="bottom-right"],
    .smartsite-bot-widget[data-position="bottom-left"] {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .smartsite-bot-window {
        width: 100%;
        height: 400px;
        bottom: 80px;
        right: 0;
        left: 0;
        margin: 0;
    }
    
    .smartsite-bot-messages {
        padding: 16px;
        gap: 12px;
    }
    
    .message {
        max-width: 90%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .smartsite-bot-button,
    .smartsite-bot-window,
    .message,
    .typing-indicator span {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .smartsite-bot-window {
        border: 2px solid var(--smartsite-bot-text);
    }
    
    .message-content {
        border-width: 2px;
    }
    
    .smartsite-bot-input-area input {
        border-width: 2px;
    }
}

/* Focus Styles for Accessibility */
.smartsite-bot-button:focus-visible,
.smartsite-bot-input-area input:focus-visible,
.smartsite-bot-input-area button:focus-visible,
.close-button:focus-visible,
.quick-reply-btn:focus-visible {
    outline: 2px solid var(--smartsite-bot-primary);
    outline-offset: 2px;
}

/* Source Links */
.message-sources {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--smartsite-bot-border);
}

.source-link {
    display: block;
    color: var(--smartsite-bot-primary);
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 4px;
}

.source-link:hover {
    text-decoration: underline;
}

/* Message Status */
.message-status {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
}

/* Error States */
.message.error .message-content {
    background: var(--smartsite-bot-error);
    color: var(--smartsite-bot-white);
}

.input-error {
    border-color: var(--smartsite-bot-error) !important;
}

/* Loading States */
.loading-message .message-content {
    background: var(--smartsite-bot-secondary);
    color: var(--smartsite-bot-text);
    font-style: italic;
}

/* Connection Status */
.connection-status {
    padding: 8px 20px;
    background: var(--smartsite-bot-warning);
    color: var(--smartsite-bot-white);
    font-size: 12px;
    text-align: center;
}

.connection-status.connected {
    background: var(--smartsite-bot-success);
}

.connection-status.disconnected {
    background: var(--smartsite-bot-error);
}

/* Lead Capture Form */
.smartsite-bot-lead-capture {
    padding: 20px;
    background: var(--smartsite-bot-white);
    border-radius: var(--smartsite-bot-border-radius);
}

.lead-capture-content h4 {
    margin: 0 0 10px 0;
    color: var(--smartsite-bot-primary);
    font-size: 18px;
}

.lead-capture-content p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--smartsite-bot-text);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--smartsite-bot-primary);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: var(--smartsite-bot-primary);
    color: var(--smartsite-bot-white);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid var(--smartsite-bot-border);
}

.btn-secondary:hover {
    background: #e9e9e9;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.end-chat-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.end-chat-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--smartsite-bot-white);
}

/* End Chat Modal */
.smartsite-bot-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: var(--smartsite-bot-border-radius);
}

.modal-content {
    background: var(--smartsite-bot-white);
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-content h4 {
    margin: 0 0 10px 0;
    color: var(--smartsite-bot-primary);
    font-size: 18px;
}

.modal-content p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Print Styles */
@media print {
    .smartsite-bot-widget {
        display: none !important;
    }
}

/* Additional Responsive Design */
@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .lead-capture-content {
        padding: 15px;
    }
}

/* Feedback Styles */
.message-feedback {
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--smartsite-bot-border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.feedback-question {
    color: #666;
    font-size: 11px;
}

.feedback-btn {
    background: none;
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    margin: 0;
}

.feedback-btn:hover {
    background-color: var(--smartsite-bot-secondary);
    transform: scale(1.1);
}

.feedback-positive:hover {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.feedback-negative:hover {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.feedback-thanks {
    color: var(--smartsite-bot-success);
    font-size: 11px;
    font-weight: 500;
}

.feedback-correction {
    margin-top: 8px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 6px;
}

.correction-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--smartsite-bot-text);
    margin-bottom: 8px;
}

.correction-input {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.correction-input:focus {
    outline: none;
    border-color: var(--smartsite-bot-primary);
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.correction-buttons {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-submit-correction,
.btn-cancel-correction {
    padding: 6px 12px;
    border: 1px solid var(--smartsite-bot-border);
    border-radius: 4px;
    background: var(--smartsite-bot-white);
    color: var(--smartsite-bot-text);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-correction {
    background-color: var(--smartsite-bot-primary);
    color: var(--smartsite-bot-white);
    border-color: var(--smartsite-bot-primary);
}

.btn-submit-correction:hover {
    background-color: #006ba1;
    border-color: #006ba1;
}

.btn-cancel-correction:hover {
    background-color: var(--smartsite-bot-secondary);
}

/* Hide feedback on small screens to save space */
@media (max-width: 480px) {
    .message-feedback {
        font-size: 11px;
    }
    
    .feedback-btn {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .correction-input {
        min-height: 50px;
        font-size: 11px;
    }
}

/* Frontend Button Icon Alignment */
.smartsite-bot-send,
.smartsite-bot-send-inline,
.quick-reply-btn,
.feedback-btn,
.btn-submit-correction,
.btn-cancel-correction {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    justify-content: center !important;
}

.smartsite-bot-send .dashicons,
.smartsite-bot-send-inline .dashicons,
.quick-reply-btn .dashicons,
.feedback-btn .dashicons,
.btn-submit-correction .dashicons,
.btn-cancel-correction .dashicons {
    margin-right: 0 !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
    width: 14px !important;
    height: 14px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.smartsite-bot-send .dashicons:before,
.smartsite-bot-send-inline .dashicons:before,
.quick-reply-btn .dashicons:before,
.feedback-btn .dashicons:before,
.btn-submit-correction .dashicons:before,
.btn-cancel-correction .dashicons:before {
    vertical-align: top !important;
    line-height: 1 !important;
}

/* Chat widget header buttons */
.smartsite-bot-header .smartsite-bot-close,
.smartsite-bot-header .smartsite-bot-minimize {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* End chat and other modal buttons */
.modal-content .button,
.modal-content .button-primary,
.modal-content .button-secondary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    vertical-align: middle !important;
}

.modal-content .button .dashicons {
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
}

/* Form submit buttons */
.smartsite-bot-widget form .button,
.smartsite-bot-widget form .button-primary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    justify-content: center !important;
}

.smartsite-bot-widget form .button .dashicons {
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

/* Source badge styling */
.source-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 10px;
  background: #eef5ff;
  color: #2b6cb0;
}

/* Debug info block under messages */
.message-debug {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--smartsite-bot-border);
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
}

/* Template Variants */
.smartsite-bot-widget.template-glass .smartsite-bot-window {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255,255,255,0.35);
}
.smartsite-bot-widget.template-glass .smartsite-bot-messages {
  background: rgba(240, 240, 241, 0.6);
}
.smartsite-bot-widget.template-glass .smartsite-bot-header {
  background: linear-gradient(135deg, var(--smartsite-bot-primary), rgba(0,0,0,0.3));
}

.smartsite-bot-widget.template-compact .smartsite-bot-window {
  width: 300px;
  height: 420px;
  border-radius: calc(var(--smartsite-bot-border-radius, 12px) - 4px);
}
.smartsite-bot-widget.template-compact .message-content {
  padding: 10px 12px;
}
.smartsite-bot-widget.template-compact .smartsite-bot-input-area input {
  padding: 10px 12px;
}
.smartsite-bot-widget.template-compact .smartsite-bot-header {
  padding: 12px 16px;
}

.smartsite-bot-widget.template-bubble .user-message .message-content {
  border-bottom-right-radius: 6px;
  border-top-right-radius: 24px;
}
.smartsite-bot-widget.template-bubble .bot-message .message-content {
  border-bottom-left-radius: 6px;
  border-top-left-radius: 24px;
}

.smartsite-bot-widget.template-dark .smartsite-bot-window {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #1f2937;
}
.smartsite-bot-widget.template-dark .smartsite-bot-header {
  background: #111827;
}
.smartsite-bot-widget.template-dark .smartsite-bot-messages {
  background: #111827;
}
.smartsite-bot-widget.template-dark .user-message .message-content {
  background: var(--smartsite-bot-primary);
  color: #fff;
}
.smartsite-bot-widget.template-dark .bot-message .message-content {
  background: #0b1220;
  color: #e5e7eb;
  border-color: #1f2937;
}
.smartsite-bot-widget.template-dark .smartsite-bot-input-area {
  background: #0b1220;
  border-color: #1f2937;
}
.smartsite-bot-widget.template-dark .smartsite-bot-footer {
  background: #0b1220;
  border-color: #1f2937;
}

/* Classic is the default base; no extra rules needed */