/* ========================================
   44SALTS CHAT SYSTEM - COMPLETE CSS
   Replace your entire salts-chat.css with this
======================================== */

/* Base styles */
#salts-chat-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================
   ANIMATED ORB
======================================== */
#salts-chat-orb-container {
    max-width: 326px;
    margin: 10px auto;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    padding: 15px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

#salts-chat-orb-container:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(164, 214, 94, 0.4);
}

.salts-orb {
    width: 80px;
    height: 80px;
    position: relative;
    flex-shrink: 0;
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle at 30% 30%, #a4d65e, #7ab51d);
    border-radius: 50%;
    box-shadow: 
        0 0 30px rgba(164, 214, 94, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: orbFloat 4s ease-in-out infinite;
}

.orb-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(164, 214, 94, 0.4), transparent 70%);
    border-radius: 50%;
    filter: blur(15px);
    animation: orbGlow 3s ease-in-out infinite alternate;
}

.orb-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border: 2px solid rgba(164, 214, 94, 0.5);
    border-radius: 50%;
    animation: orbPulse 2s ease-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-5px); }
}

@keyframes orbGlow {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes orbPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.orb-text {
    color: #000;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: left;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ========================================
   INLINE CHAT CONTAINER (WHITE DESIGN)
======================================== */
#salts-chat-inline {
    max-width: 1100px;
    width: 100%;
    margin: 40px auto;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e3e3;
}

#salts-chat-inline.transforming {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
}

.salts-chat-header {
    display: none;
}

/* ========================================
   MESSAGES CONTAINER
======================================== */
.salts-chat-messages {
    padding: 0;
    background: white;
    min-height: auto;
}

/* ========================================
   PROMPT CARDS
======================================== */
.salts-prompts-container {
    padding: 30px !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    background: white !important;
    width: 100% !important;
}

.salts-prompt-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: white;
    border: 1px solid #ededed;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
}

.salts-prompt-btn:hover {
    border-color: #a4d65e;
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(164, 214, 94, 0.2);
}

/* Add this to your salts-chat.css file */

.prompt-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-icon svg {
    width: 32px;
    height: 32px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.salts-prompt-btn:hover .prompt-icon svg {
    transform: scale(1.1) rotate(5deg);
}

.prompt-text {
    flex: 1;
    line-height: 1.4;
}

/* ========================================
   CHAT MESSAGES (when conversation active)
======================================== */
.user-message, .ai-message {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 5px;
    max-width: 75%;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
	background: #000;
	color: white;
	margin-left: auto;
	text-align: right;
	width: fit-content;
}

.ai-message {
	background: #f9f9f9;
	color: #2d3748;
	border: 1px solid #e8e8e8;
}

.ai-message.thinking {
    font-style: italic;
    opacity: 0.7;
}

/* When messages are present */
.salts-chat-messages:has(.user-message),
.salts-chat-messages:has(.ai-message) {
    padding: 20px 30px;
    max-height: 400px;
    overflow-y: auto;
}

/* ========================================
   WEBINAR BUTTON
======================================== */
.salts-webinar-btn {
    width: calc(100% - 60px);
    margin: 0 30px 30px 30px;
    padding: 16px 24px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 8px rgba(164, 214, 94, 0.3); */
}

.salts-webinar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(164, 214, 94, 0.5);
    background: #7ab51d;
}

/* ========================================
   INPUT WRAPPER
======================================== */
.salts-chat-input-wrapper {
    display: flex;
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e2e8f0;
    gap: 10px;
}

.salts-chat-input-wrapper.hidden-prompts {
    display: none;
}

.salts-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    background: white;
    color: #2d3748;
}

.salts-chat-input:focus {
    border-color: #667eea;
}

.salts-chat-send {
    padding: 12px 24px;
    background: #e9e9e9;
    color: #232323;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s;
    box-shadow: none;
}

.salts-chat-send:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.salts-chat-send:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   SCROLLBAR
======================================== */
.salts-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.salts-chat-messages::-webkit-scrollbar-track {
    background: #f7fafc;
}

.salts-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.salts-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ========================================
   FLOATING WIDGET
======================================== */
.salts-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.salts-chat-widget.hidden {
    opacity: 0;
    pointer-events: none;
}

.salts-chat-widget-trigger {
    background: #667eea;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s;
}

.salts-chat-widget-trigger:hover {
    transform: translateY(-2px);
}

.chat-icon {
    font-size: 20px;
}

.chat-text {
    font-weight: 600;
}

.salts-chat-widget-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.salts-chat-widget-window.open {
    display: flex;
}

.salts-chat-widget-header {
    padding: 20px;
    background: #667eea;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.salts-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.salts-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.salts-chat-widget-window .salts-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Checkout mode */
.salts-chat-widget.checkout-mode {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 500px;
    height: 100vh;
}

.salts-chat-widget.checkout-mode .salts-chat-widget-trigger {
    display: none;
}

.salts-chat-widget.checkout-mode .salts-chat-widget-window {
    position: static;
    width: 100%;
    height: 100%;
    border-radius: 0;
    bottom: auto;
    right: auto;
}

.salts-chat-widget.checkout-mode .salts-chat-widget-window.checkout-open {
    display: flex;
}

/* ========================================
   FORM POPUP
======================================== */
.salts-form-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.salts-form-popup-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.salts-form-popup {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.salts-form-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.salts-form-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.salts-form-popup-header {
    background: #a4d65e;
    padding: 30px;
    color: black;
}

.salts-form-popup-header h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: black;
    font-weight: 700;
}

.salts-form-popup-header p {
    margin: 0;
    color: rgba(0, 0, 0, 0.8);
    font-size: 16px;
}

.salts-form-popup-content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* Fluent Form styling */
.salts-form-popup-content .fluentform {
    background: transparent !important;
    padding: 0 !important;
}

.salts-form-popup-content .ff-el-form-control {
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 16px !important;
}

.salts-form-popup-content .ff-btn-submit {
    background: black !important;
    border: none !important;
    padding: 14px 30px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    transition: transform 0.2s !important;
    color: white;
    width: 100%;
}

.salts-form-popup-content .ff-btn-submit:hover {
    transform: translateY(-2px) !important;
}

/* ========================================
   POPUP TRIGGER BUTTONS
======================================== */
.salts-popup-trigger {
    width: 100%;
    max-width: 460px;
    padding: 20px 40px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    font-family: inherit;
    margin: 0 auto;
}

.salts-popup-primary {
    background: #D0F46E;
    color: #000;
    /*box-shadow: 0 4px 15px rgba(164, 214, 94, 0.4);*/
}

.salts-popup-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(164, 214, 94, 0.6);
}

.salts-popup-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.salts-popup-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.salts-popup-outline {
    background: transparent;
    border: 2px solid #a4d65e;
    color: #a4d65e;
}

.salts-popup-outline:hover {
    background: rgba(164, 214, 94, 0.1);
    border-color: #7ab51d;
}

.salts-popup-small {
    padding: 12px 24px;
    font-size: 14px;
    max-width: 300px;
}

.salts-popup-medium {
    padding: 16px 32px;
    font-size: 16px;
    max-width: 380px;
}

.salts-popup-large {
    padding: 15px 20px;
    font-size: 15px;
    max-width: 100%;
}

.salts-popup-trigger:active {
    transform: translateY(0);
}

.salts-popup-trigger.salts-popup-primary.salts-popup-large:hover {
    background: black;
    color: white;
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */
@media (max-width: 768px) {
    #salts-chat-orb-container {
        max-width: 90%;
        padding: 12px 20px;
    }
    
    .salts-orb {
        width: 60px;
        height: 60px;
    }
    
    .orb-core {
        width: 50px;
        height: 50px;
    }
    
    .orb-glow {
        width: 60px;
        height: 60px;
    }
    
    .orb-pulse {
        width: 50px;
        height: 50px;
    }
    
    .orb-text {
        font-size: 16px;
    }
    
    #salts-chat-inline {
        margin: 20px;
    }
    
    .salts-prompts-container {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .salts-chat-input-wrapper {
        padding: 15px;
    }
    
    .salts-webinar-btn {
        width: calc(100% - 40px);
        margin: 0 20px 20px 20px;
    }
    
    .salts-chat-widget-window {
        width: calc(100vw - 40px);
        height: 80vh;
    }
    
    .salts-chat-widget.checkout-mode {
        width: 100%;
    }
    
    .salts-form-popup {
        width: 95%;
        max-height: 95vh;
    }
    
    .salts-form-popup-header {
        padding: 20px;
    }
    
    .salts-form-popup-header h3 {
        font-size: 22px;
    }
    
    .salts-form-popup-content {
        padding: 20px;
    }
}