/* =========================================================
   professional-feed.css
   LinkedIn-style Professional Feed — HSL Glassmorphism
   Prefix: pf-* (Professional Feed)
   ========================================================= */

:root {
    --pf-primary:      hsl(215, 90%, 40%);
    --pf-primary-soft: hsl(215, 90%, 96%);
    --pf-primary-hov:  hsl(215, 90%, 30%);
    --pf-gold:         hsl(43, 96%, 56%);
    --pf-surface:      #ffffff;
    --pf-border:       rgba(0,0,0,0.07);
    --pf-shadow:       0 4px 24px rgba(20,40,80,0.07);
    --pf-shadow-hov:   0 10px 36px rgba(20,40,80,0.12);
    --pf-text:         hsl(220,15%,15%);
    --pf-muted:        hsl(220,10%,52%);
    --pf-bg:           hsl(210,20%,97%);
    --pf-radius:       16px;
    --pf-ease:         cubic-bezier(0.4,0,0.2,1);
}

/* ---------- Page Wrapper ---------- */
.pf-page {
    background: var(--pf-bg);
    min-height: 70vh;
    padding: 28px 0 48px;
}

/* ---------- Create Post Card ---------- */
.pf-create-card {
    background: var(--pf-surface);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.pf-create-input {
    width: 100%;
    border: 1.5px solid hsl(215,30%,88%);
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 15px;
    color: var(--pf-text);
    background: hsl(215,40%,98%);
    resize: none;
    outline: none;
    transition: border-color 0.2s var(--pf-ease), box-shadow 0.2s;
    font-family: inherit;
}
.pf-create-input:focus {
    border-color: var(--pf-primary);
    
}
.pf-create-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* ---------- Post Card ---------- */
.pf-post-card {
    background: var(--pf-surface);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    animation: pfFadeIn 0.4s var(--pf-ease) both;
    transition: box-shadow 0.22s var(--pf-ease), transform 0.22s var(--pf-ease);
}
.pf-post-card:hover {
    box-shadow: var(--pf-shadow-hov);
    transform: translateY(-2px);
}
@keyframes pfFadeIn {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Post Header */
.pf-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 12px;
}
.pf-post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid hsl(215,30%,88%);
    background: hsl(215,30%,92%);
    flex-shrink: 0;
}
.pf-post-author {
    font-weight: 700;
    font-size: 15px;
    color: var(--pf-text);
    text-decoration: none;
    transition: color 0.15s;
}
.pf-post-author:hover { color: var(--pf-primary); }
.pf-post-time {
    font-size: 12px;
    color: var(--pf-muted);
    margin-top: 2px;
}

/* Post Body */
.pf-post-body {
    padding: 4px 20px 16px;
    font-size: 15px;
    color: var(--pf-text);
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Post Media */
.pf-post-media {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Post Stats */
.pf-post-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 20px;
    border-top: 1px solid var(--pf-border);
    font-size: 13px;
    color: var(--pf-muted);
}
.pf-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pf-stat-item i { font-size: 15px; }

/* Post Actions Bar */
.pf-post-actions {
    display: flex;
    gap: 4px;
    padding: 6px 14px 8px;
    border-top: 1px solid var(--pf-border);
}
.pf-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 4px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pf-muted);
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.pf-action-btn:hover {
    background: hsl(215,40%,95%);
    color: var(--pf-text);
}
.pf-action-btn.liked {
    color: var(--pf-primary);
}
.pf-action-btn.liked i {
    animation: pfBump 0.22s var(--pf-ease);
}
@keyframes pfBump {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ---------- Comments Section ---------- */
.pf-comments-area {
    padding: 0 20px 16px;
    display: none; /* toggled by JS */
}
.pf-comments-area.open { display: block; }

.pf-comment-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.pf-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: hsl(215,30%,92%);
    border: 2px solid hsl(215,30%,88%);
}
.pf-comment-input {
    flex: 1;
    border: 1.5px solid hsl(215,30%,88%);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    background: hsl(215,40%,98%);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    resize: none;
}
.pf-comment-input:focus {
    border-color: var(--pf-primary);
    
}
.pf-comment-submit {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--pf-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
    transition: background 0.18s;
}
.pf-comment-submit:hover { background: var(--pf-primary-hov); }

/* Individual Comment */
.pf-comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    animation: pfFadeIn 0.3s var(--pf-ease);
}
.pf-comment-bubble {
    background: hsl(215,40%,97%);
    border-radius: 12px;
    padding: 8px 14px;
    flex: 1;
}
.pf-comment-bubble-author {
    font-weight: 700;
    font-size: 13px;
    color: var(--pf-text);
    margin-bottom: 2px;
}
.pf-comment-bubble-text {
    font-size: 14px;
    color: var(--pf-text);
    line-height: 1.5;
}
.pf-comment-delete {
    background: none;
    border: none;
    color: hsl(0,65%,60%);
    cursor: pointer;
    font-size: 12px;
    margin-top: 4px;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.pf-comment-delete:hover { opacity: 1; }

/* ---------- Buttons ---------- */
.pf-btn-primary {
    background: var(--pf-primary);
    color: #fff !important;
    border: none;
    border-radius: 22px;
    padding: 8px 22px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.pf-btn-primary:hover {
    background: var(--pf-primary-hov);
    transform: translateY(-1px);
    
}

/* Spinner */
.pf-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top-color: #fff;
    border-radius: 50%;
    animation: pf-spin 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ---------- Sidebar Cards ---------- */
.pf-sidebar-card {
    background: var(--pf-surface);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius);
    box-shadow: var(--pf-shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.pf-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pf-text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pf-border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pf-sidebar-title i { color: var(--pf-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .pf-post-body { font-size: 14px; }
    .pf-action-btn { font-size: 12px; padding: 8px 2px; }
    .pf-action-btn span { display: none; }
}
