/**
 * BuddyPress Home Activity Widget — Frontend Styles
 *
 * @version 1.1.0
 * @package BPHomeActivityWidget
 */

/* ===== Grid Layout ===== */

.bphfw-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.bphfw-columns-1 { grid-template-columns: 1fr; }
.bphfw-columns-2 { grid-template-columns: repeat(2, 1fr); }
.bphfw-columns-3 { grid-template-columns: repeat(3, 1fr); }
.bphfw-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Card ===== */

.bphfw-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 18px;
    transition: box-shadow 0.2s ease;
}

.bphfw-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* ===== Card Header: Avatar + User Info ===== */

.bphfw-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.bphfw-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.bphfw-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.bphfw-user-link {
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bphfw-user-link:hover {
    color: #0073aa;
    text-decoration: underline;
}

.bphfw-date {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ===== Card Body ===== */

.bphfw-card-body {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
}

/* ===== Empty / Notice States ===== */

.bphfw-empty,
.bphfw-notice {
    text-align: center;
    color: #888;
    padding: 20px 0;
    grid-column: 1 / -1;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .bphfw-columns-2,
    .bphfw-columns-3,
    .bphfw-columns-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bphfw-columns-3,
    .bphfw-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Card Footer: Action Buttons ===== */

.bphfw-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.bphfw-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}

.bphfw-btn:hover {
    background: #ececec;
    color: #1a1a1a;
    border-color: #ccc;
}

.bphfw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Comment count badge */
.bphfw-count {
    background: #0073aa;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.bphfw-count-hidden {
    display: none;
}

/* Favorite — active state */
.bphfw-btn-favorite.is-favorite {
    background: #fff0f0;
    border-color: #e57373;
    color: #c62828;
}

.bphfw-btn-favorite.is-favorite:hover {
    background: #ffe5e5;
}

/* ===== Inline Comment Form ===== */

.bphfw-comment-form {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.bphfw-comment-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease;
    color: #333;
}

.bphfw-comment-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.bphfw-comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.bphfw-btn-submit-comment {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.bphfw-btn-submit-comment:hover {
    background: #005a87;
    border-color: #005a87;
    color: #fff;
}

.bphfw-btn-cancel-comment {
    background: #fff;
    color: #777;
    border-color: #ddd;
}

.bphfw-btn-cancel-comment:hover {
    background: #f5f5f5;
    color: #333;
}

/* Feedback message below comment form */
.bphfw-comment-message {
    margin: 8px 0 0;
    font-size: 13px;
    min-height: 18px;
}

.bphfw-comment-message.is-error {
    color: #c62828;
}

.bphfw-comment-message.is-success {
    color: #2e7d32;
}
