/* CrestIQ Marketing Auditor Styles */

.crestiq-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

/* Chatbot Container */
.crestiq-chatbot {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 600px;
    margin: 40px auto;
}

.crestiq-chatbot.popup-style {
    position: fixed;
    bottom: 80px;
    right: 20px;
    max-width: 400px;
    max-height: 600px;
    z-index: 9999;
    display: none;
}

.crestiq-chatbot.popup-style.active {
    display: block;
}

/* Chatbot Header */
.crestiq-header {
    /* background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%); */
    background-color: #000000;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crestiq-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crestiq-logo {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.crestiq-header-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.crestiq-header-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.crestiq-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Messages Area */
.crestiq-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    scroll-behavior: smooth;
}

.crestiq-message {
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

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

.crestiq-message.bot {
    display: flex;
    gap: 10px;
}

.crestiq-message.user {
    display: flex;
    justify-content: flex-end;
}

.crestiq-bot-avatar {
    width: 40px;
    height: 40px;
    background-color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.crestiq-message-content {
    max-width: 75%;
}

.crestiq-bubble {
    background: white;
    padding: 15px 20px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
    white-space: pre-line;
}

.crestiq-message.bot .crestiq-bubble {
    border-top-left-radius: 4px;
}

.crestiq-message.user .crestiq-bubble {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
    border-top-right-radius: 4px;
}

/* Buttons */
.crestiq-buttons {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crestiq-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: block;
    text-decoration: none;
}

.crestiq-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
}

.crestiq-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.crestiq-btn-start {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
    padding: 15px 40px;
    font-size: 16px;
    margin: 20px auto;
    display: inline-block;
}

/* Score Display */
.crestiq-score-display {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin: 15px 0;
}

.crestiq-score-number {
    font-size: 64px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin: 10px 0;
}

.crestiq-score-label {
    color: #6b7280;
    font-size: 14px;
}

.crestiq-score-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.crestiq-score-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    border-radius: 10px;
    transition: width 1s ease;
}

.crestiq-category-scores {
    margin-top: 20px;
    text-align: left;
}

.crestiq-category-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.crestiq-category-item:last-child {
    border-bottom: none;
}

.crestiq-category-label {
    color: #374151;
    font-size: 14px;
}

.crestiq-category-value {
    font-weight: 700;
    color: #6366f1;
}

/* Loading Animation */
.crestiq-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
}

.crestiq-loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    animation: bounce 1.4s infinite ease-in-out;
}

.crestiq-loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.crestiq-loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.crestiq-loading-text {
    color: #6b7280;
    font-size: 14px;
    margin-left: 10px;
}

/* Input Field */
.crestiq-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.crestiq-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.crestiq-input:focus {
    border-color: #6366f1;
}

.crestiq-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.crestiq-submit-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crestiq-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.crestiq-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Popup Toggle Button */
.crestiq-popup-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.crestiq-popup-toggle:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .crestiq-chatbot {
        margin: 20px;
        border-radius: 15px;
    }
    
    .crestiq-chatbot.popup-style {
        left: 10px;
        right: 10px;
        bottom: 80px;
        max-width: none;
    }
    
    .crestiq-messages {
        height: 400px;
    }
    
    .crestiq-message-content {
        max-width: 85%;
    }
}

/* Results Page */
.crestiq-results-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.crestiq-results-header {
    text-align: center;
    margin-bottom: 40px;
}

.crestiq-results-header h2 {
    font-size: 32px;
    color: #111827;
    margin-bottom: 10px;
}

.crestiq-results-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.crestiq-analysis-section {
    margin: 30px 0;
}

.crestiq-analysis-section h3 {
    color: #6366f1;
    margin-bottom: 15px;
    font-size: 20px;
}

.crestiq-list-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    line-height: 1.6;
}

.crestiq-list-item:last-child {
    border-bottom: none;
}

.crestiq-cta-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.crestiq-cta-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.crestiq-cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}