/**
 * GripAdvisor Product Catalog - Review Comments System Styles
 */

/* Comment Form Styles */
.gpc-review-comment-form {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: none;
}

.gpc-review-comment-form.open {
    display: block;
}

.gpc-form-field {
    margin-bottom: 15px;
}

.gpc-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gpc-form-field input[type="text"],
.gpc-form-field input[type="email"],
.gpc-form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.gpc-form-field input[type="text"]:focus,
.gpc-form-field input[type="email"]:focus,
.gpc-form-field textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

.gpc-form-field textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

.gpc-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.gpc-form-actions button,
.gpc-form-actions input[type="submit"] {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.gpc-form-actions input[type="submit"] {
    background: #4CAF50;
    color: white;
    font-weight: 600;
}

.gpc-form-actions input[type="submit"]:hover:not(:disabled) {
    background: #45a049;
}

.gpc-form-actions input[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.gpc-form-message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

.gpc-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gpc-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Show Comment Form Button */
.gpc-show-comment-form-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 15px;
}

.gpc-show-comment-form-btn:hover {
    background: #45a049;
}

/* Comments List Styles */
.gpc-review-comments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.gpc-comments-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.gpc-comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gpc-comment-item {
    padding: 15px;
    margin-bottom: 12px;
    background: #f9f9f9;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
    transition: all 0.3s;
}

.gpc-comment-item:hover {
    background: #f0f8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gpc-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.gpc-comment-author {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

.gpc-comment-date {
    color: #999;
    font-size: 12px;
}

.gpc-comment-text {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gpc-review-comment-form {
        padding: 12px;
    }

    .gpc-form-actions {
        flex-direction: column;
    }

    .gpc-form-actions button,
    .gpc-form-actions input[type="submit"] {
        width: 100%;
    }

    .gpc-comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gpc-comment-item {
        padding: 12px;
    }
}

/* Animation for new comments */
@keyframes slideInComment {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gpc-comment-item.new {
    animation: slideInComment 0.3s ease-out;
}
