/* Product Comments Styles */
.product-comments {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comments-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.comment-form-wrapper {
    margin-bottom: 30px;
}

.comment-form {
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-group:last-child {
    flex: 0 0 auto;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.error-message {
    display: none;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
}

.error-message.show {
    display: block;
}

.form-control.error {
    border-color: #e53e3e;
}

.btn-submit {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background: #005a87;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message styles */
.comment-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.comment-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.comment-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.comments-list {
    margin-top: 20px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.comment-item:last-child {
    border-bottom: none;
}

/* Phần phản hồi bình luận */
.comment-replies {
    margin-left: 30px;
    margin-top: 15px;
    border-left: 2px solid #eee;
    padding-left: 15px;
}

.comment-reply {
    padding: 10px 0;
    margin-bottom: 10px;
}

.comment-reply:last-child {
    margin-bottom: 0;
}

.admin-reply {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px 15px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.reply-author {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.admin-badge {
    background-color: #007cba;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 8px;
    font-weight: 500;
}

.reply-date {
    font-size: 12px;
    color: #666;
}

.reply-content {
    color: #555;
    line-height: 1.5;
}

/* Form phản hồi của admin */
.comment-reply-wrapper {
    margin-top: 10px;
}

.reply-button {
    background: none;
    border: none;
    color: #007cba;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.reply-button:hover {
    color: #005a87;
}

.admin-reply-form {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.reply-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-submit-reply {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel-reply {
    background: #f1f1f1;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    font-size: 12px;
    color: #666;
}

.comment-content {
    color: #555;
    line-height: 1.5;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px 0;
}

/* Honeypot field */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Loading state */
.comment-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .product-comments {
        padding: 15px;
        margin-top: 20px;
    }
    
    .product-comments .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .product-comments .form-row .form-group:last-child {
        flex: 1;
    }
    
    .product-comments .btn-submit {
        width: 100%;
    }
    
    .product-comments .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .product-comments .comments-title {
        font-size: 16px;
    }
    .form-row .form-group{
        width: 100%;
    }
}