/**
 * wpForo Recent Posts - Main Stylesheet
 */

.wpforo-recent-posts {
    margin: 20px 0;
}

/* Post Card */
.wpforo-post-card {
    margin-bottom: 30px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.wpforo-post-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Featured Image */
.post-image-link {
    display: block;
    text-decoration: none;
    overflow: hidden;
    max-height: 350px;
    background: #f5f5f5;
}

.post-featured-image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.post-image-link:hover .post-featured-image {
    transform: scale(1.05);
}

/* Post Content */
.post-content {
    padding: 20px;
}

/* Post Title */
.post-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #0073aa;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.post-meta span a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.post-meta span a:hover {
    text-decoration: underline;
}

.meta-replies {
    background: #e8f4f8;
    padding: 2px 8px;
    border-radius: 12px;
    color: #0073aa;
    font-size: 12px;
}

/* Post Excerpt */
.post-excerpt-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    transition: all 0.3s ease;
}

.post-excerpt-full {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expand/Collapse Button */
.btn-expand {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #0073aa;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.2s ease;
}

.btn-expand:hover {
    text-decoration: underline;
}

.btn-expand:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.expand-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.btn-expand.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Replies Section */
.post-replies {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.replies-header {
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e1e1;
}

.reply-item {
    padding: 10px 0;
    border-left: 3px solid #2b6cb0;
    padding-left: 12px;
    margin-bottom: 8px;
}

.reply-item:last-child {
    margin-bottom: 0;
}

.reply-author {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.reply-author a {
    color: #0073aa;
    text-decoration: none;
}

.reply-author a:hover {
    text-decoration: underline;
}

.reply-body {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

/* Post Actions */
.post-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.btn-reply,
.btn-view-thread {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reply {
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

.btn-reply:hover {
    background: #005a8b;
    border-color: #005a8b;
}

.btn-reply.active {
    background: #005a8b;
}

.btn-view-thread {
    background: transparent;
    color: #0073aa;
    border: 1px solid #0073aa;
}

.btn-view-thread:hover {
    background: #f0f8ff;
}

.reply-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.btn-reply.active .reply-icon {
    transform: rotate(180deg);
}

/* Reply Form */
.reply-form-wrapper {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wpforo-reply-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.reply-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.reply-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.25);
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.char-count {
    float: right;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    clear: both;
}

.btn-submit,
.btn-cancel {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

.btn-submit {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.btn-submit:hover:not(:disabled) {
    background: #005a8b;
    border-color: #005a8b;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cancel {
    background: #f0f0f0;
    color: #333;
    border-color: #d0d0d0;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.form-loading {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* Form Messages */
.form-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 8px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Prompt */
.login-prompt {
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
}

.login-prompt a {
    color: #856404;
    text-decoration: underline;
}

.login-prompt a:hover {
    color: #533f03;
}

/* No Posts Message */
.wpforo-no-posts {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-meta {
        gap: 8px;
        font-size: 12px;
    }

    .post-actions {
        flex-direction: column;
    }

    .btn-reply,
    .btn-view-thread {
        width: 100%;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
    }

    .post-title {
        font-size: 18px;
    }
}