/* =======================================================
   POSTS
======================================================= */

.ab-post-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
  transition: 0.2s ease;
}

.ab-post-card:hover {
  border-color: #d0d7de;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* =======================================================
   HEADER
======================================================= */

.ab-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ab-post-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: #0a66c2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.ab-post-user-info h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  color: #111827;
  font-weight: 600;
}

.ab-post-user-info span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

/* =======================================================
   CONTENT
======================================================= */

.ab-post-content {
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #374151 !important;
  word-break: break-word;
  font-weight: 400;
}

/* RESET EDITOR CONTENT */

.ab-post-content * {
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #374151 !important;
  font-weight: 400 !important;
  margin-top: 0 !important;
  letter-spacing: 0 !important;
  max-width: 100% !important;
}

/* PARAGRAPHS */

.ab-post-content p {
  margin-bottom: 6px !important;
  line-height: 1.45 !important;
}

/* HEADINGS */

.ab-post-content h1,
.ab-post-content h2,
.ab-post-content h3,
.ab-post-content h4,
.ab-post-content h5,
.ab-post-content h6 {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin-bottom: 6px !important;
}

/* LISTS */

.ab-post-content ul,
.ab-post-content ol {
  padding-left: 16px !important;
  margin-bottom: 6px !important;
  margin-top: 0 !important;
}

/* LIST ITEMS */

.ab-post-content li {
  margin-bottom: 2px !important;
  line-height: 1.4 !important;
}

/* REMOVE HUGE SPACING FROM EDITORS */

.ab-post-content br {
  line-height: 1 !important;
}

/* MEDIA */
.ab-post-content img,
.ab-post-content iframe,
.ab-post-content video,
.ab-post-content table {
  max-width: 100% !important;
}

/* =======================================================
   FILE CARD
======================================================= */

.ab-file-card {
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* FILE ICON */

.ab-file-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* FILE COLORS */

.ab-file-icon.pdf {
  background: #dc2626;
}

.ab-file-icon.docx {
  background: #2563eb;
}

.ab-file-icon.xlsx {
  background: #059669;
}

.ab-file-icon.pptx {
  background: #ea580c;
}

.ab-file-icon.image {
  background: #db2777;
}

.ab-file-icon.zip {
  background: #7c3aed;
}

.ab-file-icon.default {
  background: #4b5563;
}

/* FILE DETAILS */

.ab-file-details {
  flex: 1;
  min-width: 200px;
}

.ab-file-details h5 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.ab-file-details span {
  font-size: 12px;
  color: #6b7280;
}

/* DOWNLOAD BUTTON */

.ab-file-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 8px;
  background: #0a66c2;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s ease;
}

.ab-file-action a:hover {
  background: #004182;
  color: #fff;
}

/* =======================================================
   DOWNLOAD MODAL
======================================================= */

.ab-download-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ab-download-modal.active {
  display: flex;
}

.ab-download-modal-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  animation: abModalUp 0.2s ease;
}

@keyframes abModalUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ab-modal-close {
  position: absolute;
  right: 14px;
  top: 10px;
  border: none;
  background: none;
  font-size: 28px;
  cursor: pointer;
  color: #6b7280;
}

.ab-download-modal-box h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #111827;
}

.ab-download-modal-box p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
}

#abDownloadForm input {
  width: 100%;
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  margin-bottom: 14px;
}

#abDownloadForm input:focus {
  border-color: #0a66c2;
}

#abDownloadForm button {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: #0a66c2;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

#abDownloadForm button:hover {
  background: #004182;
}

.ab-email-error {
  margin-top: 10px;
  font-size: 13px;
  color: #dc2626;
}

.ab-email-success {
  margin-top: 10px;
  font-size: 13px;
  color: #16a34a;
}

/* =======================================================
   MOBILE
======================================================= */

@media (max-width: 768px) {
  .ab-post-card {
    padding: 15px;
  }

  .ab-file-card {
    align-items: flex-start;
  }
}
