/**
 * REDPRO Social Wall Styles
 *
 * Muro social tipo LinkedIn/Facebook.
 *
 * @package RedPro
 */

/* ─── Variables ─────────────────────────────────────────── */
:root {
    --prord-wall-bg: #f3f2ef;
    --prord-wall-card-bg: #ffffff;
    --prord-wall-border: #e0e0e0;
    --prord-wall-text: #191919;
    --prord-wall-text-secondary: #666666;
    --prord-wall-primary: #0a66c2;
    --prord-wall-primary-hover: #004182;
    --prord-wall-like-active: #0a66c2;
    --prord-wall-danger: #cc1016;
    --prord-wall-radius: 10px;
    --prord-wall-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --prord-wall-transition: 0.2s ease;
}

/* ─── Container ─────────────────────────────────────────── */
.prord-wall {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--prord-wall-text);
}

/* ─── Profile Header ───────────────────────────────────── */
.prord-wall-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--prord-wall-card-bg);
    border-radius: var(--prord-wall-radius);
    box-shadow: var(--prord-wall-shadow);
    margin-bottom: 16px;
}

.prord-wall-profile-avatar {
    width: 64px;
    height: 64px !important;
    min-width: 64px;
    min-height: 64px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.prord-wall-profile-name {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
}

.prord-wall-connect-btn {
    padding: 6px 20px;
    border-radius: 20px;
    border: 1.5px solid var(--prord-wall-primary);
    background: transparent;
    color: var(--prord-wall-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--prord-wall-transition);
}

.prord-wall-connect-btn:hover {
    background: rgba(10, 102, 194, 0.08);
}

.prord-wall-connect-btn:focus {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
}

.prord-wall-connect-btn:focus:not(:focus-visible) {
    outline: none;
}

.prord-wall-connect-btn:focus-visible {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
}

.prord-wall-connect-btn.is-connected {
    background: var(--prord-wall-primary);
    color: #fff;
}

.prord-wall-connect-btn.is-connected:hover {
    background: var(--prord-wall-primary-hover);
}

/* ─── Composer ──────────────────────────────────────────── */
.prord-wall-composer {
    background: var(--prord-wall-card-bg);
    border-radius: var(--prord-wall-radius);
    box-shadow: var(--prord-wall-shadow);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.prord-wall-composer-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.prord-wall-composer-avatar {
    width: 48px;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    aspect-ratio: 1;
    object-fit: cover;
    flex-shrink: 0;
}

.prord-wall-post-avatar,
.prord-wall-composer-avatar,
.prord-wall-comment-form-avatar,
.prord-wall-comment-avatar,
.prord-contact-avatar {
    border-radius: 50% !important;
}

.prord-wall-composer-input {
    flex: 1;
    border: 1px solid var(--prord-wall-border);
    border-radius: 22px;
    padding: 12px 18px;
    font-size: 14px;
    resize: none;
    min-height: 44px;
    max-height: 200px;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    color: var(--prord-wall-text);
    transition: border-color var(--prord-wall-transition);
    width: 100%;
    box-sizing: border-box;
}

.prord-wall-composer-input:focus {
    border-color: var(--prord-wall-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2);
}

.prord-wall-composer-input::placeholder {
    color: var(--prord-wall-text-secondary);
}

/* Image preview. */
.prord-wall-image-preview {
    position: relative;
    margin: 12px 0 0 60px;
    max-width: 300px;
}

.prord-wall-image-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--prord-wall-border);
}

.prord-wall-remove-image {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Composer actions. */
.prord-wall-composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--prord-wall-border);
}

.prord-wall-composer-buttons {
    display: flex;
    gap: 8px;
}

.prord-wall-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--prord-wall-text-secondary);
    cursor: pointer;
    transition: background var(--prord-wall-transition);
}

.prord-wall-photo-btn:hover {
    background: #f0f0f0;
}

.prord-wall-photo-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #378fe9;
}

.prord-wall-publish-btn {
    padding: 8px 24px;
    border-radius: 20px;
    border: none;
    background: var(--prord-wall-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--prord-wall-transition);
}

.prord-wall-publish-btn:hover:not(:disabled) {
    background: var(--prord-wall-primary-hover);
}

.prord-wall-publish-btn:focus {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
}

.prord-wall-publish-btn:focus:not(:focus-visible) {
    outline: none;
}

.prord-wall-publish-btn:focus-visible {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
}

.prord-wall-publish-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Post Card ─────────────────────────────────────────── */
.prord-wall-post {
    background: var(--prord-wall-card-bg);
    border-radius: var(--prord-wall-radius);
    box-shadow: var(--prord-wall-shadow);
    margin-bottom: 12px;
    overflow: hidden;
}

.prord-wall-post-header {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px 0;
    gap: 12px;
}

.prord-wall-post-avatar {
    width: 48px;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.prord-wall-post-meta {
    flex: 1;
    min-width: 0;
}

.prord-wall-post-author {
    font-size: 15px;
    font-weight: 600;
    color: var(--prord-wall-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prord-wall-post-time {
    font-size: 12px;
    color: var(--prord-wall-text-secondary);
    margin-top: 2px;
}

.prord-wall-post-connect-btn {
    padding: 4px 14px;
    border-radius: 16px;
    border: 1.5px solid var(--prord-wall-primary);
    background: transparent;
    color: var(--prord-wall-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--prord-wall-transition);
    white-space: nowrap;
}

.prord-wall-post-connect-btn:hover {
    background: rgba(10, 102, 194, 0.08);
}

.prord-wall-post-connect-btn:focus {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
}

.prord-wall-post-connect-btn:focus:not(:focus-visible) {
    outline: none;
}

.prord-wall-post-connect-btn.is-connected {
    background: var(--prord-wall-primary);
    color: #fff;
    border-color: var(--prord-wall-primary);
}

/* Post actions dropdown trigger. */
.prord-wall-post-actions {
    position: relative;
}

.prord-wall-post-actions-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--prord-wall-text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background var(--prord-wall-transition);
    line-height: 1;
}

.prord-wall-post-actions-btn:hover {
    background: #f0f0f0;
}

.prord-wall-post-actions-btn:focus {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
}

.prord-wall-post-actions-btn:focus:not(:focus-visible) {
    outline: none;
}

.prord-wall-post-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--prord-wall-card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.prord-wall-post-dropdown.is-open {
    display: block;
}

.prord-wall-post-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--prord-wall-text);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background var(--prord-wall-transition);
}

.prord-wall-post-dropdown button:hover {
    background: #f5f5f5;
}

.prord-wall-post-dropdown button.prord-wall-danger-action {
    color: var(--prord-wall-danger);
}

/* Post body. */
.prord-wall-post-body {
    padding: 12px 20px;
}

.prord-wall-post-content {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prord-wall-post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    cursor: pointer;
}

/* Shared post embed. */
.prord-wall-shared-post {
    border: 1px solid var(--prord-wall-border);
    border-radius: 8px;
    margin: 8px 20px 0;
    padding: 12px;
}

.prord-wall-shared-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.prord-wall-shared-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.prord-wall-shared-author {
    font-size: 13px;
    font-weight: 600;
}

.prord-wall-shared-time {
    font-size: 11px;
    color: var(--prord-wall-text-secondary);
}

.prord-wall-shared-content {
    font-size: 13px;
    line-height: 1.4;
}

.prord-wall-shared-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 6px;
    margin-top: 8px;
}

/* ─── Stats Row ─────────────────────────────────────────── */
.prord-wall-post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 13px;
    color: var(--prord-wall-text-secondary);
}

.prord-wall-stat-likes {
    display: flex;
    align-items: center;
    gap: 4px;
}

.prord-wall-stat-right {
    display: flex;
    gap: 12px;
}

/* ─── Action Buttons ────────────────────────────────────── */
.prord-wall-post-footer {
    display: flex;
    border-top: 1px solid var(--prord-wall-border);
    padding: 4px 8px;
}

.prord-wall-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--prord-wall-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: background var(--prord-wall-transition), color var(--prord-wall-transition);
}

.prord-wall-action-btn:hover {
    background: #f0f0f0;
}

.prord-wall-action-btn:focus {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: -2px;
}

.prord-wall-action-btn:focus:not(:focus-visible) {
    outline: none;
}

.prord-wall-action-btn.is-liked {
    color: var(--prord-wall-like-active);
    font-weight: 600;
}

.prord-wall-action-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ─── Comments ──────────────────────────────────────────── */
.prord-wall-comments-section {
    padding: 0 20px 16px;
    display: none;
}

.prord-wall-comments-section.is-open {
    display: block;
}

/* Comment form. */
.prord-wall-comment-form {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.prord-wall-comment-form-avatar {
    width: 32px;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.prord-wall-comment-input-wrap {
    flex: 1;
    position: relative;
}

.prord-wall-comment-input {
    width: 100%;
    border: 1px solid var(--prord-wall-border);
    border-radius: 20px;
    padding: 8px 40px 8px 14px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    resize: none;
    min-height: 36px;
    max-height: 120px;
    line-height: 1.3;
    box-sizing: border-box;
    transition: border-color var(--prord-wall-transition);
}

.prord-wall-comment-input:focus {
    border-color: var(--prord-wall-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2);
}

.prord-wall-comment-submit {
    position: absolute;
    right: 6px;
    top: 44%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--prord-wall-primary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity var(--prord-wall-transition);
}

.prord-wall-comment-submit:hover {
    opacity: 1;
}

.prord-wall-comment-submit:focus {
    outline: 2px solid var(--prord-wall-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.prord-wall-comment-submit:focus:not(:focus-visible) {
    outline: none;
}

/* Comment item. */
.prord-wall-comment {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.prord-wall-comment-avatar {
    width: 32px;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.prord-wall-comment-body {
    flex: 1;
    min-width: 0;
}

.prord-wall-comment-bubble {
    background: #f2f2f2;
    border-radius: 12px;
    padding: 8px 14px;
}

.prord-wall-comment-author {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 2px;
}

.prord-wall-comment-text {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prord-wall-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--prord-wall-text-secondary);
}

.prord-wall-comment-meta button {
    background: none;
    border: none;
    color: var(--prord-wall-text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.prord-wall-comment-meta button:hover {
    color: var(--prord-wall-text);
}

/* Nested comments (replies). */
.prord-wall-comment-children {
    margin-left: 40px;
    margin-top: 8px;
}

/* Reply form inline. */
.prord-wall-reply-form {
    width: 100%;
    margin: 4px 0 8px 0;
}

/* ─── Loader & End ──────────────────────────────────────── */
.prord-wall-loader {
    text-align: center;
    padding: 24px;
}

.prord-wall-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--prord-wall-border);
    border-top-color: var(--prord-wall-primary);
    border-radius: 50%;
    animation: prord-wall-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes prord-wall-spin {
    to {
        transform: rotate(360deg);
    }
}

.prord-wall-end {
    text-align: center;
    padding: 24px;
    color: var(--prord-wall-text-secondary);
    font-size: 14px;
}

/* Login message. */
.prord-wall-login-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--prord-wall-text-secondary);
    font-size: 15px;
}

/* ─── Shared indicator. */
.prord-wall-shared-label {
    font-size: 12px;
    color: var(--prord-wall-text-secondary);
    padding: 8px 20px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.prord-wall-shared-label .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ─── Lightbox ──────────────────────────────────────────── */
.prord-wall-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}

.prord-wall-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.prord-wall-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.prord-wall-lightbox.is-open .prord-wall-lightbox-img {
    transform: scale(1);
}

.prord-wall-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1;
}

.prord-wall-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prord-wall-lightbox-close:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.prord-wall-lightbox-close:focus:not(:focus-visible) {
    outline: none;
}

/* ─── Clickable Stats ───────────────────────────────────── */
.prord-wall-stat-comments {
    cursor: pointer;
}

.prord-wall-stat-comments:hover {
    text-decoration: underline;
}

/* ─── Profile Links ─────────────────────────────────────── */
.prord-wall-profile-link {
    text-decoration: none;
    color: inherit;
    display: inline;
}

.prord-wall-profile-link:hover,
.prord-wall-profile-link:focus {
    text-decoration: underline;
}

.prord-wall-post-author .prord-wall-profile-link {
    color: #191919;
    font-weight: 600;
}

.prord-wall-post-author .prord-wall-profile-link:hover {
    color: #0a66c2;
}

.prord-wall-shared-author .prord-wall-profile-link {
    color: #191919;
    font-weight: 600;
}

.prord-wall-shared-author .prord-wall-profile-link:hover {
    color: #0a66c2;
}

.prord-wall-comment-author .prord-wall-profile-link {
    color: #191919;
    font-weight: 600;
}

.prord-wall-comment-author .prord-wall-profile-link:hover {
    color: #0a66c2;
}

a.prord-wall-profile-link img {
    display: block;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
    .prord-wall {
        margin: 0 -8px;
    }

    .prord-wall-composer,
    .prord-wall-post {
        border-radius: 0;
    }

    .prord-wall-post-header,
    .prord-wall-post-body,
    .prord-wall-post-stats,
    .prord-wall-comments-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    .prord-wall-post-footer {
        padding: 4px 4px;
    }

    .prord-wall-composer {
        padding: 12px 14px;
    }

    .prord-wall-image-preview {
        margin-left: 0;
    }

    .prord-wall-comment-children {
        margin-left: 24px;
    }
}