.review-summary-container,
.product-qa-container {
    margin: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qa-form {
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 20px;
}
.qa-form input, .qa-form button {
    margin: 0;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.char-counter {
    position: relative;
    right: -25px;
    top: 2px;
    font-size: 12px;
    color: #666;
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: -35px;
}

.char-counter.limit-near {
    color: #f59e0b;
}

.char-counter.limit-reached {
    color: #ef4444;
}


#summarize-reviews {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

#summarize-reviews:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.25);
}

#summarize-reviews:disabled {
    background: #e2e2e2;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#product-question {
    flex: 1;
    padding: 23px 18px;
    border: 0px solid #cdcdcd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3sease;
    background: #e9e9e9;
    box-shadow: none;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#product-question:focus {
    outline: none;
    border-color: #999;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
button#ask-product svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
    margin-right: 10px;
}
#ask-product {
    background: #5caf21;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    display: flex;
    margin-right: 10px;
    align-items: center;
}


#ask-product:disabled {
    background: #e2e2e2;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.product-answer-result {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    line-height: 1.8;
    color: #2c3338;
    font-size: 16px;
}

.typing-animation::after {
    content: '|';
    animation: blink 1s infinite;
}

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

@media (max-width: 768px) {
    .qa-form {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    #ask-product {
        width: 100%;
        margin-right: 0;
        justify-content: center;
    }

    .input-wrapper {
        width: 100%;
    }

    #product-question {
        width: 100%;
        padding: 15px;
        min-height: 80px;
        height: auto;
        resize: none;
        line-height: 1.5;
    }

    .char-counter {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        background: transparent;
        padding: 0;
    }

    #product-question::placeholder {
        padding-left: 35px;
    }
}

.qa-history {
    margin-top: 0;
    padding: 0 0;
}

.qa-item {
    margin-bottom: 15px;
    border-bottom: 3px dotted #e5e7eb;
    padding: 10px 0;
}

.qa-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.question {
    color: #5caf21;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0;
}

.question:before {
    content: '🤔 ';
}

.answer {
    color: #222;
    line-height: 1.8;
    font-size: 18px;
}

.answer:before {
    content: '💡 ';
}

.answer.limit-reached:before {
    content: none;
}

.qa-history-title {
    margin: 25px 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 4px double #e5e7eb;
    color: #222;
    font-size: 18px;
    font-weight: 500;
}

.qa-error {
    color: #ef4444;
    padding: 10px;
    margin: 10px 0;
    background: #fef2f2;
    border-radius: 8px;
    font-size: 14px;
}

.qa-new-questions {
    margin-bottom: 30px;
}

.qa-new-questions .qa-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.review-summary-container {
    margin: 25px 0;
    background: transparent;
    box-shadow: none;
    border: 1px solid #ddd;
    padding: 20px;
}

.review-summary-header {
    margin-bottom: 15px;
}

.review-summary-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.review-summary-title h3 {
    margin: 0;
    color: #5caf21;
    font-weight: 900;
    font-size: 1.25em;
}

.review-summary-subtitle {
    color: #222;
    font-size: 18px;
}

.review-summary-content {
    position: relative;
}

.review-summary-result {
    display: block;
    margin: 0;
    padding: 15px;
    background: #f1f1f1;
    border-radius: 15px 0px 15px 15px;
    line-height: 1.8;
    color: #222;
    font-size: 18px;
    position: relative;
    max-width: 100%;
}

.review-summary-loading {
    display: flex;
    justify-content: center;
    padding: 10px;
}

.loading-dots {
    display: flex;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #0277BD;
    border-radius: 50%;
    animation: loading 1.4s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}


.ai-icon {
    width: 55px;
    height: 55px !important;
    margin-left: 8px;
    border-radius: 50%;
    object-fit: cover;
} 