/**
 * User Comments Profile Tab Styles
 *
 * @package PVH_Comments
 * @since   1.1.0
 */

/* Header */
.pvh-user-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.pvh-user-comments-header .pvh-profile-section-title {
    margin-bottom: 0;
}

.pvh-comment-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--pvh-text-secondary, #6b7280);
    margin-left: 8px;
}

/* Comments List */
.pvh-user-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Comment Item */
.pvh-user-comment-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 16px;
    padding: 16px;
    background: var(--pvh-card-bg, #ffffff);
    border: 1px solid var(--pvh-border-color, #e5e7eb);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pvh-user-comment-item:hover {
    border-color: var(--pvh-border-hover, #d1d5db);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Dark mode */
[data-theme="dark"] .pvh-user-comment-item,
.dark .pvh-user-comment-item {
    background: var(--pvh-card-bg-dark, #1f2937);
    border-color: var(--pvh-border-color-dark, #374151);
}

[data-theme="dark"] .pvh-user-comment-item:hover,
.dark .pvh-user-comment-item:hover {
    border-color: var(--pvh-border-hover-dark, #4b5563);
}

/* Video Info */
.pvh-user-comment-video {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.pvh-user-comment-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--pvh-bg-secondary, #f3f4f6);
}

.pvh-user-comment-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pvh-user-comment-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pvh-text-tertiary, #9ca3af);
}

.pvh-user-comment-video-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pvh-user-comment-video-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--pvh-text-primary, #111827);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.pvh-user-comment-video-title:hover {
    color: var(--pvh-primary, #3b82f6);
}

[data-theme="dark"] .pvh-user-comment-video-title,
.dark .pvh-user-comment-video-title {
    color: var(--pvh-text-primary-dark, #f9fafb);
}

.pvh-user-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--pvh-text-secondary, #6b7280);
}

.pvh-user-comment-reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: var(--pvh-bg-tertiary, #e5e7eb);
    border-radius: 4px;
    font-size: 11px;
    color: var(--pvh-text-secondary, #6b7280);
}

[data-theme="dark"] .pvh-user-comment-reply-badge,
.dark .pvh-user-comment-reply-badge {
    background: var(--pvh-bg-tertiary-dark, #374151);
}

.pvh-user-comment-time {
    color: var(--pvh-text-tertiary, #9ca3af);
}

.pvh-user-comment-edited {
    font-style: italic;
    color: var(--pvh-text-tertiary, #9ca3af);
}

/* Comment Content */
.pvh-user-comment-content {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.pvh-user-comment-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pvh-text-primary, #111827);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .pvh-user-comment-content p,
.dark .pvh-user-comment-content p {
    color: var(--pvh-text-primary-dark, #e5e7eb);
}

/* Comment Stats */
.pvh-user-comment-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    align-self: end;
}

.pvh-user-comment-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--pvh-text-secondary, #6b7280);
}

.pvh-user-comment-stat svg {
    opacity: 0.7;
}

/* Comment Actions */
.pvh-user-comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: end;
}

.pvh-user-comment-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: none;
    background: var(--pvh-bg-secondary, #f3f4f6);
    border-radius: 6px;
    color: var(--pvh-text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pvh-user-comment-action svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    flex-shrink: 0;
}

.pvh-user-comment-action:hover {
    background: var(--pvh-bg-tertiary, #e5e7eb);
    color: var(--pvh-text-primary, #111827);
}

[data-theme="dark"] .pvh-user-comment-action,
.dark .pvh-user-comment-action {
    background: var(--pvh-bg-secondary-dark, #374151);
    color: var(--pvh-text-secondary-dark, #9ca3af);
}

[data-theme="dark"] .pvh-user-comment-action:hover,
.dark .pvh-user-comment-action:hover {
    background: var(--pvh-bg-tertiary-dark, #4b5563);
    color: var(--pvh-text-primary-dark, #f9fafb);
}

.pvh-delete-comment-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.pvh-delete-comment-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.pvh-delete-comment-btn.deleting {
    pointer-events: none;
    opacity: 0.5;
}

/* Empty State */
.pvh-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.pvh-empty-state svg {
    color: var(--pvh-text-tertiary, #9ca3af);
    margin-bottom: 16px;
}

.pvh-empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--pvh-text-primary, #111827);
}

[data-theme="dark"] .pvh-empty-state h3,
.dark .pvh-empty-state h3 {
    color: var(--pvh-text-primary-dark, #f9fafb);
}

.pvh-empty-state p {
    margin: 0;
    font-size: 14px;
    color: var(--pvh-text-secondary, #6b7280);
}

.pvh-user-comments-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.pvh-user-comments-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--pvh-bg-elevated, #ffffff);
    border: 1px solid var(--pvh-border, #e5e7eb);
    color: var(--pvh-text-primary, #111827);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pvh-user-comments-page-link:hover {
    border-color: var(--pvh-primary, #2563eb);
    color: var(--pvh-primary, #2563eb);
}

.pvh-user-comments-page-status {
    flex: 1;
    text-align: center;
    color: var(--pvh-text-secondary, #6b7280);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .pvh-user-comment-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .pvh-user-comment-video {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .pvh-user-comment-content {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .pvh-user-comment-actions {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        justify-self: start;
    }

    .pvh-user-comment-stats {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        justify-self: end;
    }

    .pvh-user-comment-thumbnail {
        width: 60px;
        height: 34px;
    }

    .pvh-user-comments-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pvh-user-comments-page-status {
        order: -1;
    }
}

@media (max-width: 480px) {
    .pvh-user-comment-item {
        padding: 12px;
    }

    .pvh-user-comment-video {
        flex-direction: column;
        gap: 8px;
    }

    .pvh-user-comment-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
