/* ==========================================================================
   Social Network Plugin (SNP) CSS
   Colors:
   - Primary Red: #EF2B2D (Flag Red)
   - Primary Green: #009E49 (Flag Green)
   - Accent Yellow/Gold: #FCD116 (Flag Star Gold)
   - Dark Neutral: #1E293B (Deep Charcoal / Slate)
   - Light Neutral: #F8FAFC (Soft Warm Off-White)
   - Surface White: #FFFFFF
   - Muted Grey: #64748B
   - Border Light: #E2E8F0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root Variables & Reset Scoping
   -------------------------------------------------------------------------- */
:root {
  --bf-red: #EF2B2D;
  --bf-red-hover: #D01B1E;
  --bf-red-light: #FDF2F2;
  --bf-green: #009E49;
  --bf-green-hover: #007E3A;
  --bf-green-light: #F0FDF4;
  --bf-yellow: #FCD116;
  --bf-yellow-hover: #E5BB05;
  --bf-yellow-light: #FEFCE8;
  --bf-dark: #1E293B;
  --bf-muted: #64748B;
  --bf-light: #F8FAFC;
  --bf-border: #E2E8F0;
  --bf-white: #FFFFFF;
  --bf-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --bf-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --bf-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --bf-radius-sm: 6px;
  --bf-radius-md: 10px;
  --bf-radius-lg: 16px;
  --bf-radius-full: 9999px;
  --bf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bf-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Container & Standard Box-Sizing */
[class^="snp-"],
[class*=" snp-"] {
  box-sizing: border-box;
  font-family: var(--bf-font);
  color: var(--bf-dark);
  -webkit-font-smoothing: antialiased;
}

[class^="snp-"] *,
[class*=" snp-"] * {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   2. Typography & Top Level Layout Elements
   -------------------------------------------------------------------------- */
.snp-feed,
.snp-profile,
.snp-groups-page,
.snp-group-page,
.snp-messages,
.snp-followers-page,
.snp-single-post {
  max-width: 900px;
  margin: 0 auto 30px auto;
  padding: 0 15px;
}

.snp-feed h2,
.snp-groups-page h2,
.snp-messages h2,
.snp-followers-page h2,
.snp-group-page h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--bf-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px solid var(--bf-yellow);
  padding-bottom: 8px;
}

.snp-empty,
.snp-empty-feed,
.snp-no-conversations,
.snp-no-messages,
.snp-no-results,
.snp-no-comments {
  text-align: center;
  padding: 30px 20px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-md);
  border: 1px dashed var(--bf-border);
  color: var(--bf-muted);
  font-size: 0.95rem;
  margin: 15px 0;
}

.snp-error-message,
.snp-error {
  background-color: var(--bf-red-light);
  color: var(--bf-red);
  border: 1px solid var(--bf-red);
  padding: 12px 16px;
  border-radius: var(--bf-radius-md);
  margin: 15px 0;
  font-weight: 600;
}

.snp-loading {
  text-align: center;
  padding: 20px;
  color: var(--bf-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   3. Buttons & Interactive Controls
   -------------------------------------------------------------------------- */
button[class^="snp-"],
button[class*=" snp-"],
.snp-upload-btn,
.snp-group-link,
.snp-submit-post,
.snp-submit-group-post {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--bf-radius-sm);
  padding: 8px 16px;
  border: none;
  transition: var(--bf-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  line-height: 1.2;
}

button:disabled,
.snp-upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
}

/* Primary Green Action Buttons */
.snp-submit-post,
.snp-submit-group-post,
.snp-submit-group,
.snp-follow-btn,
.snp-create-group-btn,
.snp-accept-contact-request,
.snp-accept-group-request,
.snp-save-group-edit,
.snp-join-group-btn {
  background-color: var(--bf-green);
  color: var(--bf-white);
}

.snp-submit-post:hover,
.snp-submit-group-post:hover,
.snp-submit-group:hover,
.snp-follow-btn:hover,
.snp-create-group-btn:hover,
.snp-accept-contact-request:hover,
.snp-accept-group-request:hover,
.snp-save-group-edit:hover,
.snp-join-group-btn:hover {
  background-color: var(--bf-green-hover);
  box-shadow: 0 4px 10px rgba(0, 158, 73, 0.25);
  color: var(--bf-white);
}

/* Red / Warning Action Buttons */
.snp-unfollow-btn,
.snp-block-btn,
.snp-delete-post,
.snp-delete-group-btn,
.snp-delete-comment,
.snp-reject-contact-request,
.snp-reject-group-request,
.snp-leave-group-btn,
.snp-cancel-group,
.snp-cancel-group-edit,
.snp-remove-member {
  background-color: var(--bf-red-light);
  color: var(--bf-red);
  border: 1px solid rgba(239, 43, 45, 0.2);
}

.snp-unfollow-btn:hover,
.snp-block-btn:hover,
.snp-delete-post:hover,
.snp-delete-group-btn:hover,
.snp-delete-comment:hover,
.snp-reject-contact-request:hover,
.snp-reject-group-request:hover,
.snp-leave-group-btn:hover,
.snp-cancel-group:hover,
.snp-cancel-group-edit:hover,
.snp-remove-member:hover {
  background-color: var(--bf-red);
  color: var(--bf-white);
}

/* Yellow / Secondary Accent Buttons */
.snp-message-btn,
.snp-edit-post,
.snp-edit-group-btn,
.snp-edit-comment,
.snp-request-join-group-btn,
.snp-copy-link-btn,
.snp-share-post-btn,
.snp-view-post-btn {
  background-color: var(--bf-yellow-light);
  color: var(--bf-dark);
  border: 1px solid rgba(252, 209, 22, 0.4);
}

.snp-message-btn:hover,
.snp-edit-post:hover,
.snp-edit-group-btn:hover,
.snp-edit-comment:hover,
.snp-request-join-group-btn:hover,
.snp-copy-link-btn:hover,
.snp-share-post-btn:hover,
.snp-view-post-btn:hover {
  background-color: var(--bf-yellow);
  color: var(--bf-dark);
}

/* Size Variants */
.snp-xs {
  padding: 4px 8px !important;
  font-size: 0.78rem !important;
}

.snp-sm {
  padding: 6px 12px !important;
  font-size: 0.85rem !important;
}

/* Tabs System */
.snp-relations-tabs,
.snp-groups-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--bf-border);
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.snp-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 16px;
  font-weight: 600;
  color: var(--bf-muted);
  border-radius: 0;
  white-space: nowrap;
}

.snp-tab-btn:hover {
  color: var(--bf-red);
}

.snp-tab-btn.active {
  color: var(--bf-red);
  border-bottom-color: var(--bf-red);
  background: transparent;
}

/* --------------------------------------------------------------------------
   4. Post & Feed Design
   -------------------------------------------------------------------------- */
.snp-post-form {
  background: var(--bf-white);
  border-radius: var(--bf-radius-md);
  padding: 18px;
  box-shadow: var(--bf-shadow-sm);
  border: 1px solid var(--bf-border);
  margin-bottom: 25px;
  border-top: 4px solid var(--bf-green);
}

.snp-post-form-header,
.snp-group-post-form-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.snp-post-form textarea,
.snp-group-post-form textarea {
  width: 100%;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-sm);
  padding: 12px;
  resize: vertical;
  outline: none;
  font-size: 0.95rem;
  transition: var(--bf-transition);
  background: var(--bf-light);
}

.snp-post-form textarea:focus,
.snp-group-post-form textarea:focus {
  border-color: var(--bf-green);
  background: var(--bf-white);
  box-shadow: 0 0 0 3px rgba(0, 158, 73, 0.15);
}

.snp-post-form-footer,
.snp-group-post-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.snp-upload-label {
  cursor: pointer;
  background: var(--bf-light);
  padding: 6px 14px;
  border-radius: var(--bf-radius-sm);
  border: 1px solid var(--bf-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bf-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.snp-upload-label:hover {
  background: var(--bf-yellow-light);
  color: var(--bf-dark);
}

.snp-file-upload input[type="file"] {
  display: none;
}

.snp-file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.snp-file-preview .file-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--bf-radius-sm);
  overflow: hidden;
  border: 1px solid var(--bf-border);
  background: var(--bf-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.snp-file-preview .file-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.snp-file-preview .remove-file {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(239, 43, 45, 0.85);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 11px;
  line-height: 20px;
}

/* Individual Post Card */
.snp-post {
  background: var(--bf-white);
  border-radius: var(--bf-radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--bf-border);
  box-shadow: var(--bf-shadow-sm);
  position: relative;
  transition: var(--bf-transition);
}

.snp-post:hover {
  box-shadow: var(--bf-shadow-md);
}

.snp-quarantine-notice {
  background: var(--bf-yellow-light);
  border-left: 4px solid var(--bf-yellow);
  color: #856404;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.snp-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.snp-post-author,
.snp-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.snp-post-author strong a,
.snp-author strong a {
  color: var(--bf-dark);
  text-decoration: none;
  font-size: 1rem;
}

.snp-post-author strong a:hover,
.snp-author strong a:hover {
  color: var(--bf-red);
}

.snp-post-time,
.snp-date {
  display: block;
  font-size: 0.78rem;
  color: var(--bf-muted);
}

.snp-post-content {
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 16px;
  color: #334155;
}

.snp-post-files {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.snp-post-files img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--bf-radius-sm);
  border: 1px solid var(--bf-border);
}

.snp-audio-player,
.snp-video-player {
  background: var(--bf-light);
  padding: 10px;
  border-radius: var(--bf-radius-sm);
  border: 1px solid var(--bf-border);
}

.snp-audio-player audio,
.snp-video-player video {
  width: 100%;
  margin-top: 5px;
}

.snp-post-footer {
  border-top: 1px solid var(--bf-border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snp-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.snp-react {
  background: var(--bf-light);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-full);
  padding: 4px 10px !important;
  font-size: 0.85rem !important;
}

.snp-react:hover,
.snp-react.active {
  background: var(--bf-yellow-light);
  border-color: var(--bf-yellow);
}

.snp-post-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ========== MODALE IMAGE ========== */
.snp-image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: snpModalFade 0.3s ease;
}
@keyframes snpModalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.snp-image-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.snp-image-modal img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--snp-radius-sm);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.snp-image-modal .snp-modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    line-height: 1;
    transition: transform 0.3s ease;
}
.snp-image-modal .snp-modal-close:hover {
    transform: rotate(90deg);
}
.snp-modal-nav {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}
.snp-modal-nav button {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--snp-radius-sm);
    font-size: 20px;
    cursor: pointer;
    transition: background var(--snp-transition);
}
.snp-modal-nav button:hover {
    background: rgba(255,255,255,0.3);
}
.snp-modal-counter {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   5. Single Post & Comments Section
   -------------------------------------------------------------------------- */
.snp-single-post {
  border-top: 4px solid var(--bf-red);
}

.snp-back {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--bf-red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.snp-back:hover {
  text-decoration: underline;
}

.snp-author-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bf-light);
  padding: 10px 14px;
  border-radius: var(--bf-radius-sm);
  margin: 15px 0;
}

.snp-author-actions-left,
.snp-author-actions-right {
  display: flex;
  gap: 8px;
}

.snp-comments-section {
  margin-top: 25px;
  border-top: 2px solid var(--bf-border);
  padding-top: 20px;
}

.snp-new-comment {
  margin-bottom: 20px;
}

.snp-comment-input-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.snp-new-comment textarea {
  flex-grow: 1;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-sm);
  padding: 10px;
  font-size: 0.9rem;
  resize: vertical;
}

.snp-comment {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bf-border);
}

.snp-comment-body {
  flex-grow: 1;
  background: var(--bf-light);
  padding: 10px 14px;
  border-radius: var(--bf-radius-sm);
}

.snp-comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.snp-comment-date {
  font-size: 0.75rem;
  color: var(--bf-muted);
}

/* --------------------------------------------------------------------------
   6. Messages System
   -------------------------------------------------------------------------- */
.snp-messages-toolbar {
  margin-bottom: 15px;
}

#snp-messages-search {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-md);
  outline: none;
}

#snp-messages-search:focus {
  border-color: var(--bf-green);
  box-shadow: 0 0 0 3px rgba(0, 158, 73, 0.15);
}

.snp-messages-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-md);
  overflow: hidden;
  min-height: 500px;
  box-shadow: var(--bf-shadow-sm);
}

.snp-conversations-list {
  border-right: 1px solid var(--bf-border);
  background: var(--bf-light);
}

.snp-conversations-list h3 {
  padding: 15px;
  margin: 0;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--bf-border);
  background: var(--bf-white);
}

.snp-conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--bf-border);
  cursor: pointer;
  transition: var(--bf-transition);
  position: relative;
}

.snp-conversation-item:hover,
.snp-conversation-item.active {
  background: var(--bf-yellow-light);
}

.snp-conversation-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--bf-red);
}

.snp-conversation-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.snp-conversation-info {
  flex-grow: 1;
  overflow: hidden;
}

.snp-conversation-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snp-conversation-last {
  display: block;
  font-size: 0.8rem;
  color: var(--bf-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snp-unread-badge {
  background: var(--bf-red);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--bf-radius-full);
}

.snp-messages-area {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bf-white);
}

#snp-messages-content {
  padding: 20px;
  overflow-y: auto;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snp-message {
  display: flex;
  gap: 10px;
  max-width: 75%;
}

.snp-message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.snp-message.received {
  align-self: flex-start;
}

.snp-message-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  position: relative;
}

.snp-message.sent .snp-message-bubble {
  background: var(--bf-green);
  color: white;
  border-bottom-right-radius: 2px;
}

.snp-message.received .snp-message-bubble {
  background: var(--bf-light);
  color: var(--bf-dark);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--bf-border);
}

.snp-message-bubble small {
  display: block;
  font-size: 0.7rem;
  margin-top: 4px;
  opacity: 0.8;
  text-align: right;
}

.snp-message-input {
  padding: 12px;
  border-top: 1px solid var(--bf-border);
  background: var(--bf-light);
}

.snp-message-input-wrapper {
  display: flex;
  gap: 10px;
}

.snp-message-input-wrapper textarea {
  flex-grow: 1;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-sm);
  padding: 8px 12px;
  resize: none;
  outline: none;
}

.snp-contact-requests-banner {
  background: var(--bf-yellow-light);
  border: 1px solid var(--bf-yellow);
  border-radius: var(--bf-radius-md);
  padding: 15px;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   7. Groups Management & Grid Layout
   -------------------------------------------------------------------------- */
.snp-groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.snp-groups-grid,
.snp-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.snp-group-card,
.snp-user-card {
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-md);
  padding: 16px;
  box-shadow: var(--bf-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--bf-transition);
}

.snp-group-card:hover,
.snp-user-card:hover {
  box-shadow: var(--bf-shadow-md);
  border-color: var(--bf-yellow);
}

.snp-group-card a,
.snp-user-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 12px;
  align-items: center;

}

.snp-group-avatar,
.snp-group-avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: var(--bf-radius-sm);
  object-fit: cover;
  background: var(--bf-green-light);
  color: var(--bf-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.snp-group-info h4 {
  margin: 0 0 5px 0;
  font-size: 1.05rem;
  color: var(--bf-dark);
}

.snp-group-members,
.snp-group-role,
.snp-group-privacy-tag {
  display: block;
  font-size: 0.8rem;
  color: var(--bf-muted);
}

.snp-group-actions,
.snp-user-actions {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--bf-border);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.snp-create-group-form {
  background: var(--bf-light);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-md);
  padding: 20px;
  margin-bottom: 25px;
  border-left: 5px solid var(--bf-green);
}

.snp-form-group {
  margin-bottom: 14px;
}

.snp-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 5px;
}

.snp-form-group input,
.snp-form-group textarea,
.snp-form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-sm);
  outline: none;
}

.snp-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Group Page Detailed View */
.snp-group-header {
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-md);
  overflow: hidden;
  margin-bottom: 25px;
  box-shadow: var(--bf-shadow-sm);

}

.snp-group-cover {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--bf-muted);
}

.snp-group-info-header {
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-end;

}

.snp-group-avatar-big,
.snp-group-avatar-placeholder-big {
  width: 90px;
  height: 90px;
  border-radius: var(--bf-radius-md);
  border: 4px solid var(--bf-white);
  box-shadow: var(--bf-shadow-sm);
  object-fit: cover;
  background: var(--bf-yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;

}

/* --------------------------------------------------------------------------
   8. User Profile Component
   -------------------------------------------------------------------------- */
.snp-profile {
  background: var(--bf-white);
  border-radius: var(--bf-radius-md);
  border: 1px solid var(--bf-border);
  overflow: hidden;
  box-shadow: var(--bf-shadow-sm);

}

/* Navigation Dropdown Menu */
.snp-profile-nav-wrapper {
  background: var(--bf-dark);
  padding: 8px 15px;
}

.snp-nav-dropdown {
  position: relative;
  display: inline-block;
}

.snp-nav-trigger {
  /*background: transparent;*/
  color: var(--bf-white);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;

}

.snp-nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bf-white);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-sm);
  box-shadow: var(--bf-shadow-lg);
  list-style: none;
  padding: 8px 0;
  margin: 5px 0 0 0;
  min-width: 200px;
  z-index: 100;
  display: none;
}

.snp-nav-dropdown:hover .snp-nav-dropdown-menu {
  display: block;
}

.snp-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--bf-dark);
  text-decoration: none;
  font-size: 0.9rem;

}

.snp-nav-link:hover {
  background: var(--bf-yellow-light);
  color: var(--bf-red);
}

.snp-badge-nav {
  background: var(--bf-red);
  color: white;
  border-radius: var(--bf-radius-full);
  padding: 2px 6px;
  font-size: 0.75rem;
  margin-left: auto;
}

/* Cover & Avatar Header Layout */
.snp-cover {
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--bf-dark);
  position: relative;
}

.snp-cover-upload {
  position: absolute;
  bottom: 15px;
  right: 15px;
}

.snp-profile-header {
  padding: 0 25px 25px 25px;
  position: relative;

}

.snp-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-top: -60px;
  margin-bottom: 15px;
}

.snp-avatar-img {
  border-radius: 50%;
  border: 4px solid var(--bf-white);
  box-shadow: var(--bf-shadow-md);
  object-fit: cover;
}

.snp-avatar-upload {
  position: absolute;
  bottom: 5px;
  right: 5px;
}

.snp-profile-info h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 2px;
}

.snp-username {
  color: var(--bf-muted);
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 15px;
}

.snp-profile-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.snp-stat-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 5px;
  align-items: center;
}

.snp-stat-number {
  font-weight: 700;
  color: var(--bf-red);
}

.snp-stat-label {
  color: var(--bf-muted);
  font-size: 0.88rem;
}

.snp-bio {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #334155;
  background: var(--bf-light);
  padding: 12px;
  border-radius: var(--bf-radius-sm);
  border-left: 3px solid var(--bf-yellow);
}

.snp-professional-info {
  background: var(--bf-green-light);
  border: 1px solid rgba(0, 158, 73, 0.2);
  padding: 12px 16px;
  border-radius: var(--bf-radius-sm);
  margin-top: 15px;
}

.snp-professional-info p {
  margin: 4px 0;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   9. Media Queries & Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .snp-messages-container {
    grid-template-columns: 1fr;
  }
  
  .snp-conversations-list {
    max-height: 250px;
    overflow-y: auto;
  }

  .snp-groups-grid,
  .snp-users-grid {
    grid-template-columns: 1fr;
  }

  .snp-group-info-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .snp-author-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .snp-author-actions-left,
  .snp-author-actions-right {
    justify-content: space-between;
  }

  .snp-post-form-footer,
  .snp-group-post-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .snp-submit-post,
  .snp-submit-group-post {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .snp-feed,
  .snp-profile,
  .snp-groups-page,
  .snp-group-page,
  .snp-messages,
  .snp-followers-page,
  .snp-single-post {
    padding: 0 10px;
  }

  .snp-cover {
    height: 140px;
  }

  .snp-avatar-img {
    width: 90px;
    height: 90px;
  }

  .snp-avatar-wrapper {
    margin-top: -45px;
  }

  .snp-post-actions-bar {
    justify-content: space-between;
  }

  .snp-react {
    padding: 3px 6px !important;
    font-size: 0.78rem !important;
  }
}

/* Liens dans les publications et commentaires */
.snp-link {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
    font-weight: 500;
}

.snp-link:hover {
    color: #1d4ed8;
    text-decoration: none;
}

/* Bouton "Voir plus" */
.snp-read-more {
    display: inline-block;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.snp-read-more:hover {
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: underline;
}

/* Compteur de caractères */
.snp-char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
    padding: 2px 8px;
    margin-top: 4px;
    transition: color 0.3s;
}

.snp-char-counter.warning {
    color: #f39c12 !important;
}

.snp-char-counter.error {
    color: #e74c3c !important;
}

/* Limite de caractères dépassée */
.snp-post-form textarea:invalid,
.snp-new-comment textarea:invalid {
    border-color: #e74c3c !important;
}

/* MESSAGES AVEC MODALE */
.snp-messages-search {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.snp-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.snp-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.snp-search-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}
.snp-search-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.snp-search-btn:hover {
    background: #005a87;
}
.snp-clear-search {
    padding: 10px 15px;
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
}
.snp-clear-search:hover {
    text-decoration: underline;
}
.snp-conversation-item.unread {
    background: #f0f8ff;
    border-left: 3px solid #0073aa;
}
.snp-conversation-item.unread .snp-conv-name {
    font-weight: 700;
}
.snp-conv-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}
.snp-conv-time {
    font-size: 11px;
    color: #999;
}
.snp-unread-count {
    background: #0073aa;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Justification des textes */
.snp-post-text,
.snp-post-content p,
.snp-comment-body p,
.snp-message-bubble p {
    text-align: justify;
    word-break: break-word;
}

/* Style du compteur de caractères */
.snp-char-counter,
.snp-message-counter {
    font-size: 12px;
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 4px;
}

.snp-char-counter .snp-char-warning {
    color: #e74c3c;
    font-weight: bold;
}

/* Style du texte tronqué */
.snp-post-text-truncated {
    max-height: 250px;
    overflow: hidden;
}

.snp-post-read-more {
    margin-top: 8px;
}

.snp-read-more {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.snp-read-more:hover {
    text-decoration: underline;
}

/* Style des boutons d'édition */
.snp-edit-form {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.snp-edit-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
}

.snp-edit-form .snp-save-edit {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 8px;
}

.snp-edit-form .snp-cancel-edit-post {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
}