/* FPC Wire v2.3.1e — Notifications & Messages Polish */

/* Notifications */
.notification-center,
.notifications-page,
[data-notifications-page]{
  display:grid;
  gap:12px;
}

.notification-header,
.notifications-header,
[data-notification-header]{
  position:sticky;
  top:0;
  z-index:18;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  background:rgba(6,14,23,.93);
}

[data-notification-filters]{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:10px 0 12px;
  scrollbar-width:none;
}

[data-notification-filters]::-webkit-scrollbar{display:none}

[data-notification-filter]{
  flex:0 0 auto;
  min-height:42px;
  border-radius:999px!important;
  border:1px solid rgba(111,139,171,.28)!important;
  background:#0e1a28!important;
  color:#cbd7e5!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease;
}

[data-notification-filter].active{
  background:#ef2f43!important;
  border-color:#ef2f43!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(239,47,67,.22);
}

[data-notification-card]{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-height:76px;
  padding:14px 16px;
  border:1px solid rgba(111,139,171,.23);
  border-radius:13px;
  background:#0a1521;
  transition:background .16s ease,border-color .16s ease,transform .16s ease,opacity .16s ease;
}

[data-notification-card]:hover{
  border-color:rgba(127,167,214,.43);
  background:#0d1a29;
}

[data-notification-card].is-unread,
[data-notification-unread="1"]{
  background:linear-gradient(90deg,rgba(239,47,67,.11),rgba(10,21,33,.98) 28%);
  border-color:rgba(239,47,67,.34);
}

[data-notification-card].is-unread::before,
[data-notification-unread="1"]::before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:3px;
  border-radius:0 999px 999px 0;
  background:#ef2f43;
}

[data-notification-card] time,
.notification-time{
  color:#8191a6;
  font-size:12px;
}

.notification-read-form button,
[data-notification-mark-read]{
  min-width:36px;
  min-height:36px;
  border-radius:50%;
}

/* Message shell */
.messages-shell,
.messages-layout,
[data-messages-shell]{
  min-height:calc(100dvh - 1px);
  background:#07111d;
}

.messages-sidebar,
.conversation-list,
[data-conversation-list]{
  border-right:1px solid rgba(111,139,171,.22);
  background:#091421;
}

.message-thread,
.messages-thread,
[data-message-thread]{
  display:flex;
  flex-direction:column;
  min-height:0;
  background:#06101a;
}

.message-thread-header,
.messages-thread-header,
[data-message-thread-header]{
  position:sticky;
  top:0;
  z-index:15;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:76px;
  padding:10px 16px;
  border-bottom:1px solid rgba(111,139,171,.22);
  background:rgba(7,17,29,.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.message-list,
.messages-list,
[data-message-list]{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:18px 16px 24px;
  scroll-behavior:smooth;
}

.message-bubble,
.message-row,
[data-message]{
  max-width:min(76%,560px);
  margin:7px 0;
  padding:10px 13px;
  border:1px solid rgba(111,139,171,.25);
  border-radius:16px 16px 16px 5px;
  background:#111e2d;
  color:#eef4fb;
  line-height:1.45;
  overflow-wrap:anywhere;
}

.message-bubble.is-own,
.message-row.is-own,
[data-message-own="1"]{
  margin-left:auto;
  border-color:rgba(107,160,221,.38);
  border-radius:16px 16px 5px 16px;
  background:#203d5f;
}

.message-bubble time,
.message-row time,
[data-message] time{
  display:block;
  margin-top:5px;
  color:#a9b6c6;
  font-size:10px;
  text-align:right;
}

.wire-unread-divider{
  display:flex;
  align-items:center;
  gap:10px;
  margin:16px 0;
  color:#ef7180;
  font-size:11px;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.wire-unread-divider::before,
.wire-unread-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:rgba(239,47,67,.35);
}

.message-composer,
.messages-composer,
[data-message-composer-form]{
  position:sticky;
  bottom:0;
  z-index:16;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:end;
  gap:10px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(111,139,171,.22);
  background:rgba(7,17,29,.97);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.message-composer textarea,
.messages-composer textarea,
[data-message-composer]{
  width:100%;
  min-height:42px;
  max-height:160px;
  resize:none;
  overflow-y:auto;
  border:1px solid #30465f;
  border-radius:18px;
  background:#091421;
  color:#fff;
  padding:11px 14px;
  font-size:16px;
  line-height:1.35;
}

.message-composer button[type="submit"],
.messages-composer button[type="submit"],
[data-message-composer-form] button[type="submit"]{
  min-width:72px;
  min-height:42px;
  border-radius:999px;
}

.wire-message-send-state{
  grid-column:2/4;
  min-height:16px;
  color:#91a4bb;
  font-size:11px;
}

.wire-message-send-state.is-error{
  color:#ff8793;
}

.wire-message-attachment-preview{
  grid-column:2/4;
  position:relative;
  width:min(220px,100%);
  overflow:hidden;
  border:1px solid rgba(111,139,171,.24);
  border-radius:12px;
  background:#0b1623;
}

.wire-message-attachment-preview img{
  display:block;
  width:100%;
  max-height:180px;
  object-fit:cover;
}

.wire-message-attachment-preview button{
  position:absolute;
  top:7px;
  right:7px;
  width:30px;
  height:30px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(4,8,13,.84);
  color:#fff;
}

.conversation-item,
[data-conversation-item]{
  position:relative;
  border:1px solid transparent;
  border-radius:12px;
  transition:background .16s ease,border-color .16s ease;
}

.conversation-item:hover,
[data-conversation-item]:hover{
  background:#0d1a29;
  border-color:rgba(111,139,171,.24);
}

.conversation-item.active,
[data-conversation-item].active{
  background:#122235;
  border-color:rgba(239,47,67,.34);
}

.conversation-item.is-unread::before,
[data-conversation-unread="1"]::before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:3px;
  border-radius:0 999px 999px 0;
  background:#ef2f43;
}

@media(max-width:799px){
  .messages-shell,
  .messages-layout,
  [data-messages-shell]{
    min-height:calc(100dvh - 72px - env(safe-area-inset-bottom));
  }

  .message-thread-header,
  .messages-thread-header,
  [data-message-thread-header]{
    min-height:68px;
    padding-top:max(10px,env(safe-area-inset-top));
  }

  .message-list,
  .messages-list,
  [data-message-list]{
    padding:14px 12px 18px;
  }

  .message-bubble,
  .message-row,
  [data-message]{
    max-width:84%;
  }

  .message-composer,
  .messages-composer,
  [data-message-composer-form]{
    grid-template-columns:auto minmax(0,1fr) auto;
    padding-inline:10px;
  }

  body.wire-message-keyboard-open .wire-mobile-nav-v230j{
    transform:translateY(110%);
    pointer-events:none;
  }

  [data-notification-card]{
    grid-template-columns:auto minmax(0,1fr);
    align-items:start;
  }

  [data-notification-card] > :last-child{
    grid-column:2;
  }
}

@media(prefers-reduced-motion:reduce){
  [data-notification-card],
  [data-notification-filter],
  .conversation-item,
  [data-conversation-item]{
    transition:none;
  }

  .message-list,
  .messages-list,
  [data-message-list]{
    scroll-behavior:auto;
  }
}
