/* Feemo Review Dynamic 插件样式 */

/* 主容器样式 */
.feemo-reviews-container {
    max-width: 100%;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* 评论表单样式 */
.feemo-review-form {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.feemo-review-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
}

.feemo-form-group {
    margin-bottom: 20px;
}

.feemo-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.feemo-form-group input[type="text"],
.feemo-form-group input[type="email"],
.feemo-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.feemo-form-group input[type="text"]:focus,
.feemo-form-group input[type="email"]:focus,
.feemo-form-group textarea:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.feemo-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* 评分选择样式 */
.feemo-rating-select {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.feemo-rating-select input {
    display: none;
}

.feemo-rating-select label {
    cursor: pointer;
    font-size: 24px;
    color: #ddd;
    padding: 0 2px;
    transition: color 0.2s;
}

.feemo-rating-select label:hover,
.feemo-rating-select label:hover ~ label,
.feemo-rating-select input:checked ~ label {
    color: #ffd700;
}

.feemo-rating-select label.selected {
    color: #ffd700;
}

/* 图片上传样式 */
.feemo-image-upload {
    margin-bottom: 20px;
}

.feemo-image-upload label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.feemo-image-upload input[type="file"] {
    display: block;
    margin-bottom: 10px;
}

#feemo_image_preview {
    margin-top: 10px;
}

#feemo_image_preview img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 提交按钮样式 */
.feemo-submit-button {
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.feemo-submit-button:hover {
    background-color: #3a7bc8;
}

/* 错误信息样式 */
.feemo-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
}

/* 消息提示样式 */
.feemo-review-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.feemo-review-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    box-shadow: 0 2px 4px rgba(21, 87, 36, 0.1);
}

.feemo-review-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    box-shadow: 0 2px 4px rgba(114, 28, 36, 0.1);
}

.feemo-review-message ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.feemo-review-message li {
    margin-bottom: 5px;
}

.feemo-review-message li:last-child {
    margin-bottom: 0;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 固定位置的消息提示 */
.feemo-review-message.fixed {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 999999;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .feemo-review-message.fixed {
        top: 0;
        right: 0;
        left: 0;
        max-width: none;
        border-radius: 0;
    }
}

/* 评论列表样式 */
.feemo-reviews-list {
    margin-top: 30px;
}

.feemo-reviews-list h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
}

.feemo-review-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.feemo-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.feemo-review-author {
    font-weight: 600;
    color: #333;
}

.feemo-review-date {
    color: #777;
    font-size: 0.9em;
}

.feemo-review-rating {
    margin-bottom: 15px;
    color: #ffd700;
}

.feemo-review-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.feemo-review-image {
    margin-top: 15px;
}

.feemo-review-image img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* 分页样式 */
.feemo-pagination {
    margin-top: 30px;
    text-align: center;
}

.feemo-pagination a,
.feemo-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #4a90e2;
    transition: all 0.3s;
}

.feemo-pagination a:hover {
    background-color: #f5f5f5;
}

.feemo-pagination .current {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .feemo-review-form {
        padding: 15px;
    }
    
    .feemo-rating-select label {
        font-size: 20px;
    }
    
    .feemo-review-item {
        padding: 15px;
    }
    
    .feemo-review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .feemo-review-date {
        margin-top: 5px;
    }
}

/* Elementor 集成样式 */
.elementor-widget-container .feemo-reviews-container {
    margin: 0;
}

.elementor-widget-html .feemo-reviews-container {
    width: 100%;
}

/* 产品信息样式（当在评论页面显示产品信息时） */
.feemo-product-info {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.feemo-product-image {
    width: 80px;
    margin-right: 20px;
}

.feemo-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.feemo-product-details h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.feemo-product-details .price {
    color: #4a90e2;
    font-weight: 600;
    margin-bottom: 8px;
}

.feemo-product-details .view-product {
    display: inline-block;
    font-size: 14px;
    color: #4a90e2;
    text-decoration: none;
}

.feemo-product-details .view-product:hover {
    text-decoration: underline;
}