/* assets/css/detailberita.css */

/* ===== POPUP SHARE ===== */
.detailberita-share-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95); /* Transparan putih */
  padding: 25px;
  padding-top: 45px; /* Agar judul tidak nempel ke X */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 340px; /* Lebih lebar untuk HP */
  width: 90%;
  min-width: 280px;
}

.detailberita-share-popup.active {
  display: block;
}

.detailberita-close-share {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  background: none;
  border: none;
  color: #666;
  transition: color 0.2s;
}

.detailberita-close-share:hover {
  color: #333;
}

.detailberita-share-title {
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif!important;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.4;
  color: #090909;
}

.detailberita-share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detailberita-share-btn {
  padding: 12px 15px;
  text-decoration: none;
  color: white;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.detailberita-share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.whatsapp { background: #25D366; }
.facebook { background: #4267B2; }
.twitter { background: #1DA1F2; }
.copy { background: #6C757D; }

.detailberita-share-disclaimer {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 15px;
  color: #888;
}

.detailberita-share-disclaimer a {
  font-style: italic;
  color: #0456f9;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

.detailberita-share-disclaimer a:hover {
  text-decoration: underline;
  color: #033a57;
}

/* ===== RESPONSIF UNTUK MOBILE ===== */
@media (max-width: 768px) {
  .detailberita-share-popup {
    max-width: 90%;
    width: auto;
    padding: 20px;
    padding-top: 40px;
  }

  .detailberita-share-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .detailberita-share-btn {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .detailberita-share-disclaimer {
    font-size: 0.8rem;
    margin-top: 10px;
  }
}

/* ===== ARTIKEL ===== */
.detailberita-article {
  max-width: 720px;
  margin: 0 auto;
}

.detailberita-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  color: #222;
}

/* ✅ PERBAIKAN UTAMA: BYLINE SEJAJAR */
.detailberita-byline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: #777;
  margin-bottom: 1.75rem;
}

.detailberita-author img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  object-fit: cover;
  vertical-align: middle;
}

.detailberita-author .author-name {
  font-weight: 500;
  color: #222;
}

.detailberita-author .separator {
  color: #ccc;
}

.detailberita-author time {
  margin-left: 0;
  color: #777;
}

/* ===== ACTION BAR ===== */
.detailberita-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.detailberita-actions-bar--bottom {
  margin-top: 2.5rem;
}

.detailberita-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #05525f;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.detailberita-action-btn:hover {
  color: #033a42;
}

/* ===== GAMBAR & CAPTION ===== */
.detailberita-figure {
  margin: 2rem 0;
}

.detailberita-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.detailberita-img:hover {
  transform: scale(1.02);
}

.detailberita-caption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #414040;
  text-align: left;
  font-style: italic;
}

/* ===== ISI ARTIKEL ===== */
.detailberita-body {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #2d2d2d;
  margin-bottom: 1.5rem;
}

.detailberita-body p {
  margin: 1rem 0;
  padding: 0;
}

.detailberita-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
}

/* ===== ISI ARTIKEL: PENANGANAN LIST DARI TINYMCE ===== */
.detailberita-body ul,
.detailberita-body ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.detailberita-body ul {
  list-style-type: disc;
}

.detailberita-body ol {
  list-style-type: decimal;
}

.detailberita-body li {
  margin-bottom: 0.5rem;
}

.detailberita-body ul ul,
.detailberita-body ol ol,
.detailberita-body ul ol,
.detailberita-body ol ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

/* ===== KUTIPAN ===== */
.detailberita-kutipan {
  font-family: 'Crimson Pro', serif;
  font-size: 1.375rem;
  line-height: 1.5;
  color: #333;
  font-style: italic;
  margin: 2rem 0;
  padding: 0 1.5rem;
  border-left: 3px solid #05525f;
  position: relative;
}

/* ===== KOMENTAR ===== */
.detailberita-comments-section h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1.25rem;
  color: #222;
}

.detailberita-comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-family: inherit;
}

.detailberita-comment-form button {
  background: #05525f;
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 24px;
  cursor: pointer;
}

/* ===== KOMENTAR - TAMPILAN PROFESIONAL ===== */
.detailberita-comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detailberita-comment-item {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.detailberita-comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #222;
}

.detailberita-comment-author {
  font-size: 0.9375rem;
  color: #05525f;
}

.detailberita-comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.detailberita-love-btn,
.detailberita-reply-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: #777;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.detailberita-love-btn:hover,
.detailberita-reply-btn:hover {
  background-color: #e9e9e9;
}

.detailberita-love-btn i {
  font-size: 0.875rem;
}

.detailberita-love-btn.active i {
  color: #e74c3c;
}

.detailberita-comment-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #2d2d2d;
  margin: 0.5rem 0 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ===== BALASAN (REPLY) ===== */
.detailberita-replies {
  margin-top: 1rem;
  padding-left: 1.5rem;
  border-left: 2px solid #ddd;
}

.detailberita-reply-form {
  margin-top: 1rem;
  display: none;
}

.detailberita-reply-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.detailberita-reply-form button {
  background: #05525f;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.detailberita-reply-form button:hover {
  background: #033a42;
}

/* ===== TOMBOL LIHAT BALASAN ===== */
.detailberita-toggle-replies {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: #05525f;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-weight: 500;
  margin-top: 0.5rem;
}

.detailberita-toggle-replies:hover {
  background-color: #e9e9e9;
}

/* --- Gambar Utama Artikel --- */
.detailberita-figure {
  margin: 20px 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.detailberita-figure:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.detailberita-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.detailberita-img:hover {
  transform: scale(1.02);
}

.detailberita-caption {
  font-style: italic;
  font-size: 0.9em;
  color: #666;
  text-align: center;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  margin: 0;
}

.comment-count{
  font-size: 15px;
  color: #034f66;
}
/* --- Responsif --- */
@media (max-width: 768px) {
  .detailberita-figure {
    margin: 16px 0;
    border-radius: 6px;
  }

  .detailberita-img {
    border-radius: 6px;
  }

  .detailberita-caption {
    font-size: 0.85em;
    padding: 10px 12px;
  }
}

/* ===== POPUP LOGIN KHUSUS KOMENTAR (MIRIP KOMPAS) ===== */
#commentLoginModal .modal-content {
  background: #fff;
  padding: 25px 20px 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}


#commentLoginModal h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #181818;
  margin: 0 0 15px 0;
}

#commentLoginModal p {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  margin: 0 0 15px 0;
}

.comment-login-google-btn {
  width: 100%;
  max-width: 360px; /* Optional: agar tidak terlalu lebar di desktop */
  padding: 16px 16px;
  background: transparent;
  color: #0a0a0a;
  border: 1px solid #05525f;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin: 10px auto; /* Rata tengah horizontal */
  transition: all 0.3s;
  font-weight: 600;
  justify-content: center;
  display: flex; /* 👈 Aktifkan flexbox */
  align-items: center; /* 👈 Sejajarkan vertikal */
  gap: 3px; /* Jarak antara icon dan teks */
  text-decoration: none; /* Jika pakai <a> tag */
}

.comment-login-google-btn img {
  width: 20px;
  height: 20px;
  vertical-align: middle; /* Tambahan jika perlu */
}

.comment-login-google-btn:hover {
  background: #5bcbfb;
}

.comment-login-email-btn {
  width: 70%;
  padding: 12px;
  background: transparent;
  color: #0a0a0a;
  border: 1px solid #05525f;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin: 10px 0;
  transition: all 0.3s;
  font-weight: 600;
}

.comment-login-email-btn:hover {
   background: #5bcbfb;
}

#commentLoginModal .close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 22px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

#commentLoginModal .close-modal:hover {
  color: #333;
}

#commentLoginModal .terms

/* ===== LOGO DI POPUP KOMENTAR ===== */
.modal-logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.modal-logo {
  width: 180px; /* Sesuaikan ukuran */
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border: none;
  padding: 0;
  margin: 0;
  
}


/* Optional: jika ingin rata tengah dan responsif */
@media (max-width: 480px) {
  .modal-logo {
    width: 150px;
  }
  .modal{
  width: 100%;
  justify-content: left;
}
}
  
/* ===== LOGO DI POPUP KOMENTAR — RATA TENGAH ===== */
.modal-logo-wrapper {
  display: flex;
  justify-content: center; /* 👈 Rata tengah horizontal */
  align-items: center;
  margin-bottom: 15px;
  width: 100%;
}



.modal-logo {
  width: 180px;
  height: auto;
  max-width: 90%;
  object-fit: contain;
  border: none;
  padding: 0;
  margin: 0;
  display: block; /* 👈 Penting agar margin: 0 auto bisa bekerja */
}

/* Jika ingin lebih rapi di mobile */
@media (max-width: 480px) {
  .modal-logo {
    width: 150px;
  }
}

/* ===== TOMBOL "TULIS KOMENTAR" UNTUK USER BELUM LOGIN ===== */
.detailberita-login-to-comment-btn {
  background: #02bef7;
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  margin: 0.5rem 0 0.9rem;
  transition: background-color 0.2s, transform 0.2s;
  display: inline-block;
}

.detailberita-login-to-comment-btn:hover {
  background: #38befc;
  transform: translateY(-1px);
}
}