/* ============================================================
   AD24 INBOX PLUGIN — inbox.css
   ============================================================ */

/* ---- Badge mesaje necitite ---- */
.ad24-inbox-badge {
  display: inline-block;
  background: #e8192c;
  color: #fff;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
  vertical-align: middle;
}
.ad24-inbox-badge.sm { font-size: 10px; padding: 1px 5px; }

/* Meniu utilizator: badge lângă link */
.opt_inbox a .ad24-inbox-badge { margin-left: 5px; }

/* ---- Header pagină inbox ---- */
.ad24-inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.ad24-inbox-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ad24-inbox-page-title { font-size: 20px; margin-bottom: 20px; }

/* ---- Breadcrumb ---- */
.ad24-inbox-crumb {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}
.ad24-inbox-crumb a { color: #1a73e8; text-decoration: none; }
.ad24-inbox-crumb span { margin: 0 6px; }

/* ---- Tabel conversații ---- */
.ad24-inbox-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ad24-inbox-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #e8e8e8;
  color: #555;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ad24-inbox-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #f2f2f2;
  vertical-align: middle;
}
.ad24-inbox-row:hover td { background: #fafafa; }
.ad24-inbox-row.unread td { background: #eef4ff; }
.ad24-inbox-row.unread .col-subj strong { color: #1a73e8; }

.col-from { white-space: nowrap; font-size: 13px; }
.col-from .fa { color: #bbb; margin-right: 5px; }

.col-subj a { display: block; text-decoration: none; color: inherit; }
.col-subj strong { display: block; font-size: 14px; }
.col-subj .preview { display: block; color: #999; font-size: 12px; margin-top: 2px; }

.col-item { font-size: 12px; color: #777; }
.col-item a { color: #1a73e8; text-decoration: none; }
.col-date { font-size: 12px; color: #aaa; white-space: nowrap; }
.col-act a { color: #ddd; font-size: 15px; transition: color .2s; }
.col-act a:hover { color: #e8192c; }

.ad24-inbox-empty {
  text-align: center;
  padding: 60px 20px;
  color: #bbb;
}
.ad24-inbox-empty p { margin: 0 0 16px; font-size: 16px; }

/* ---- Conversație ---- */
.ad24-conv-header {
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
  margin-bottom: 18px;
}
.ad24-conv-header h2 { margin: 0 0 5px; font-size: 18px; }
.conv-meta { font-size: 13px; color: #888; }
.conv-meta a { color: #1a73e8; text-decoration: none; }

/* ---- Bule de mesaj ---- */
.ad24-conv-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 500px;
  overflow-y: auto;
  padding: 8px 2px 12px;
  margin-bottom: 22px;
  scroll-behavior: smooth;
}

.ad24-msg {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  max-width: 78%;
}
.ad24-msg.msg-mine    { flex-direction: row-reverse; align-self: flex-end; }
.ad24-msg.msg-theirs  { align-self: flex-start; }

.msg-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.msg-bubble {
  border-radius: 16px;
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 100%;
  word-break: break-word;
  background: #f0f0f0;
}
.msg-mine .msg-bubble { background: #1a73e8; color: #fff; }

.msg-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.msg-meta strong { font-size: 12px; font-weight: 700; }
.msg-meta span   { font-size: 11px; color: #aaa; }
.msg-mine .msg-meta span { color: rgba(255,255,255,.65); }
.msg-mine .msg-meta strong { color: rgba(255,255,255,.85); }

/* ---- Formular răspuns ---- */
.ad24-conv-reply { border-top: 1px solid #eee; padding-top: 18px; }
.ad24-conv-reply h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: #555; }
.ad24-conv-reply textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.ad24-conv-reply textarea:focus { outline: none; border-color: #1a73e8; }
.reply-btns { margin-top: 10px; display: flex; gap: 10px; }

/* ---- Formular mesaj nou ---- */
.ad24-new-msg-form .ad24-form-row { margin-bottom: 16px; }
.ad24-new-msg-form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 5px;
  color: #444;
}
.ad24-new-msg-form input[type="text"],
.ad24-new-msg-form input[type="email"],
.ad24-new-msg-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
}
.ad24-new-msg-form input:focus,
.ad24-new-msg-form textarea:focus { outline: none; border-color: #1a73e8; }
.req { color: #e8192c; }
.ad24-form-static {
  padding: 9px 12px;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 7px;
  font-size: 14px;
  color: #444;
}
.ad24-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Buton Contact pe pagina anunțului ---- */
.ad24-inbox-contact-btn {
  margin-top: 10px;
  margin-bottom: 6px;
}
.ad24-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/* ---- Buton Contact în loop (cardul anunțului) ---- */
.ad24-loop-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #555;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.ad24-loop-contact-btn:hover { background: #1a73e8; color: #fff; }

/* ---- Buton pe profilul public ---- */
.ad24-inbox-profile-btn .btn { display: inline-flex; align-items: center; gap: 7px; }

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .ad24-msg { max-width: 94%; }
  .col-date, .col-item { display: none; }
  .ad24-inbox-table th.not767,
  .ad24-inbox-table td.not767 { display: none; }
}
