/* =====================================================
   SocialCore - core-ui.css
   Doel: Globale UI-styling & utilities
   -----------------------------------------------------
   - Bevat basisopmaak voor knoppen, navigatie, formulieren
   - Bevat kleine utilities die overal bruikbaar zijn:
     * .skip-link          toegankelijkheidslink, alleen zichtbaar bij focus
     * .visually-hidden    alleen zichtbaar voor screenreaders
     * .clearfix           clearfix voor floats
     * .text-center/left/right  tekst uitlijning
     * .mt-/.mb-/.p-*    kleine spacing-helpers
   -----------------------------------------------------
   Richtlijn:
   - Alleen herbruikbare en globale UI-componenten.
   - Pagina-specifieke styling hoort in /css/pages/...
   ===================================================== */

/* === Page layout === */
.page-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1rem;
}

.compose-container {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.compose-header {
    background-color: #2563eb;
    color: white;
    padding: 1.5rem;
}

.compose-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.compose-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.compose-subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.25rem;
}

.chat-container {
    max-width: 1400px;
    height: calc(100vh - 200px);
}

.friend-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.friend-card {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    background-color: #fff;
}

.friend-card:hover {
    background-color: #f9f9f9;
}
.chat-icon {
    font-size: 1.25rem;
    color: #555;
    padding-left: 1rem;
}

#searchContainer {
    padding: 1rem 1.5rem;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: #888;
}

.search-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* === Avatars === */
.avatar-md {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    object-fit: cover;
}

/* === Online status indicator === */
.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 1rem;
    height: 1rem;
    background-color: #22c55e; /* groen */
    border: 2px solid #fff;
    border-radius: 9999px;
}

.title-blue {
    color: #2563eb;
    font-size: 1.5rem;
    font-weight: 600;
}

/* === Buttons === */
.back-to-chat-link-1 {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.back-to-chat-link-1 {
    background-color: #2563eb;
    color: white;
}
.back-to-chat-link-1:hover {
    background-color: #1e40af;
}

/* === Responsive: Chat Compose (mobiel) === */
@media (max-width: 768px) {
    .compose-container {
        margin: 10px;
        height: calc(100vh - 120px);
    }

    .friend-card {
        padding: 0.75rem !important;
        flex-direction: column;
        text-align: center;
    }

    .friend-row {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .avatar-md {
        width: 3rem !important;
        height: 3rem !important;
    }

    .chat-icon {
        margin-top: 0.5rem;
    }
}

.sc-header { border-bottom: 1px solid #e9e9ee; background:#fff; }
.sc-header__inner { max-width: 1100px; margin:0 auto; padding:12px 20px; display:flex; gap:16px; align-items:center; }
.sc-logo { font-weight:800; text-decoration:none; color:#222; }
.sc-nav { display:flex; gap:14px; margin-left:auto; }
.sc-nav a { color:#444; text-decoration:none; padding:6px 8px; border-radius:8px; }
.sc-nav a.is-active { background:#f1f5ff; color:#1f62ea; }
.sc-header__actions { display:flex; gap:10px; margin-left:12px; }

.btn { display:inline-flex; align-items:center; justify-content:center; height:36px; padding:0 14px; border-radius:10px; text-decoration:none; font-weight:600; border:1px solid transparent; }
.btn-primary { background:#2b72ff; color:#fff; }
.btn-outline { background:transparent; color:#2b72ff; border-color:#2b72ff; }

.sc-main { min-height: 60vh; }
.sc-footer { border-top:1px solid #e9e9ee; background:#fff; }
.sc-footer__inner { max-width:1100px; margin:0 auto; padding:16px 20px; color:#666; font-size:14px; }

/* Sticky header met subtiele blur */
.sc-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #ececf3;
}
.sc-header__inner{ height: 64px; }

/* Nav: hover/active states net wat duidelijker */
.sc-nav a{
  padding: 8px 10px; border-radius: 8px; color:#444; text-decoration: none;
}
.sc-nav a:hover{ background:#f3f6ff; color:#1f62ea; }
.sc-nav a.is-active{ background:#e9f0ff; color:#1f62ea; font-weight: 600; }

/* Toetsenbord focus voor a11y */
a:focus-visible, .btn:focus-visible{
  outline: 2px solid #2b72ff; outline-offset: 2px;
}

/* Footer iets meer ademruimte */
.sc-footer__inner{ padding: 20px; color:#6b7280; }

/* Zelfde max-width als home-grid */
.sc-header__inner,
.sc-footer__inner{
  max-width: 1200px; /* match met home-grid */
}

/* ====================================
   NOTIFICATIONS (HEADER + PAGE)
   ==================================== */

/* ====================================
   NOTIFICATIONS BELL IN HEADER
   ==================================== */

.sc-notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.sc-notification-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sc-notification-link:hover {
    background: #f3f4f6;
}

.sc-bell-icon {
    font-size: 20px;
    display: block;
}

.sc-notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Animation voor nieuwe notificatie */
@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

.sc-notification-link.has-new {
    animation: bellRing 0.5s ease-in-out;
}

/* ====================================
   NOTIFICATIONS PAGE
   ==================================== */

.sc-notifications {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.sc-notifications__header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-notifications__title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.sc-notifications__actions {
    display: flex;
    gap: 10px;
}

.sc-btn-mark-read {
    padding: 8px 16px;
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sc-btn-mark-read:hover {
    background: #d1d5db;
}

/* Notificatie lijst */
.sc-notifications__list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.sc-notification-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.sc-notification-item:last-child {
    border-bottom: none;
}

.sc-notification-item:hover {
    background: #f9fafb;
}

.sc-notification-item.unread {
    background: #eff6ff;
}

.sc-notification-item.unread:hover {
    background: #dbeafe;
}

.sc-notification__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sc-notification__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-notification__content {
    flex: 1;
}

.sc-notification__text {
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.5;
}

.sc-notification__text strong {
    font-weight: 600;
}

.sc-notification__time {
    font-size: 13px;
    color: #6b7280;
}

.sc-notification__mark {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s;
}

.sc-notification__mark:hover {
    background: #f3f4f6;
}

.sc-notification__mark svg {
    width: 18px;
    height: 18px;
    fill: #6b7280;
}

/* Empty state */
.sc-notifications__empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.sc-notifications__empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.sc-notifications__empty-text {
    font-size: 18px;
    font-weight: 500;
    color: #9ca3af;
}

/* Type indicators */
.sc-notification-item[data-type="friend_request"] {
    border-left: 3px solid #3b82f6;
}

.sc-notification-item[data-type="friend_accepted"] {
    border-left: 3px solid #10b981;
}

.sc-notification-item[data-type="post_like"] {
    border-left: 3px solid #ef4444;
}

.sc-notification-item[data-type="post_comment"] {
    border-left: 3px solid #8b5cf6;
}

.sc-notification-item[data-type="system"] {
    border-left: 3px solid #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .sc-notifications {
        padding: 10px;
    }
    
    .sc-notifications__header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .sc-notifications__actions {
        width: 100%;
    }
    
    .sc-btn-mark-read {
        flex: 1;
    }
    
    .sc-notification-item {
        gap: 12px;
        padding: 12px 16px;
    }
    
    .sc-notification__avatar {
        width: 40px;
        height: 40px;
    }
    
    .sc-notification__text {
        font-size: 14px;
    }
}

/* =====================================================
   SocialCore Utilities
   Globale helper-classes voor accessibility & layout
   ===================================================== */

/* Skip link: toegankelijkheid, alleen zichtbaar bij keyboard focus */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--sc-accent);
  color: var(--sc-accent-ink);
  border-radius: 6px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}

/* Alleen zichtbaar voor screenreaders */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Clearfix helper: clearfix voor floats */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Text alignment helpers */
.text-center { text-align: center !important; }
.text-left   { text-align: left !important; }
.text-right  { text-align: right !important; }

/* Spacing utilities (mini, voor incidenteel gebruik) */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }


