/*
 Theme Name:   Neve Child
 Theme URI:    https://dashboard.smarttraffic.app/
 Description:  Child theme của Neve (gallery slideshow với SVG pagination)
 Author:       ADz
 Author URI:   https://dashboard.smarttraffic.app/
 Template:     neve
 Version:      1.2.5
*/

/* ------------------------------
   RESET & KHUNG CHUNG
------------------------------ */
.custom-gallery,
.gallery-image,
.gallery-pagination,
.post-text {
    box-sizing: border-box;
}
.gallery-pagination .nav-btn.next-post {
  display: none; /* chỉ hiện khi tới ảnh cuối */
}

.custom-gallery {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* ------------------------------
   HÌNH ẢNH TRONG GALLERY
------------------------------ */
.gallery-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 20px 0;
    transition: opacity 0.5s ease;
}

.gallery-image img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    border-radius: 12px;
    object-fit: contain;
    background: #f9f9f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.gallery-image img:hover {
    transform: scale(1.02);
}

.gallery-image.fade-out {
    opacity: 0;
}

/* ------------------------------
   PAGINATION BUTTONS (TOP & BOTTOM)
------------------------------ */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 12px 0;
    flex-wrap: wrap;
    font-size: 1.1rem;
}

/* Nút điều hướng (Prev / Next) */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
    color: #0073aa;
    transition: all 0.3s ease;
}

/* SVG icon bo tròn */
.nav-btn svg {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 50%;
    background: #0073aa;
    color: #fff;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.4);
}

/* Hover */
.nav-btn:hover svg {
    background: #005f8b;
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 95, 139, 0.5);
}

.nav-btn span {
    color: #0073aa;
}

.nav-btn:hover span {
    color: #005f8b;
}

/* Disable */
.nav-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-num {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

/* ------------------------------
   TEXT NỘI DUNG BÀI VIẾT
------------------------------ */
.post-text {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    line-height: 1.8;
    color: #222;
    font-size: 1rem;
}

.post-text h2, .post-text h3, .post-text h4 {
    margin-top: 1.5em;
    color: #111;
}

.post-text p {
    margin-bottom: 1.1em;
}

.post-text a {
    color: #0073aa;
    text-decoration: underline;
}

.post-text a:hover {
    color: #005f8b;
}

/* ------------------------------
   RESPONSIVE (MOBILE)
------------------------------ */
@media (max-width: 768px) {
    .gallery-image img {
        max-height: 60vh;
    }

    .gallery-pagination {
        gap: 12px;
    }

    .nav-btn svg {
        width: 32px;
        height: 32px;
        padding: 5px;
    }

    .post-text {
        padding: 20px;
    }

    .page-num {
        font-size: 0.95rem;
    }
}

/* ------------------------------
   NGĂN NEVE GHI ĐÈ
------------------------------ */
.nv-single-post-wrap .entry-content {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ------------------------------
   PHÂN BIỆT NÚT NEXT (XANH LÁ)
------------------------------ */
.nav-btn.next-post span {
    color: #28a745;
}
.nav-btn.next-post svg {
    background: #28a745;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.4);
}
.nav-btn.next-post:hover svg {
    background: #218838;
}

/* ------------------------------
   VIDEO DẠNG DỌC (NO LOGO)
------------------------------ */
.video-embed {
    position: relative;
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.video-embed.loaded {
    opacity: 1;
    transform: translateY(0);
}

.video-embed.vertical {
    aspect-ratio: 9 / 16;
    max-width: 420px;
    min-height: 480px;
}

@media (min-width: 1024px) {
    .video-embed.vertical {
        max-width: 360px;
        aspect-ratio: 9 / 16;
    }
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.yt-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.yt-wrapper iframe {
    pointer-events: auto;
}

/* ------------------------------
   NÚT BẬT TIẾNG (UNMUTE BUTTON)
------------------------------ */
.unmute-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.unmute-btn:hover {
    background: rgba(255,255,255,0.85);
    color: #000;
}
/* ========== CHATBOX ONLYFANS STYLE ========== */

#chatToggle {
  position: fixed;
  bottom: 22px;
  right: 24px;
  background: linear-gradient(145deg, #007bff, #00c6ff);
  color: #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 26px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: 0.3s ease;
}
#chatToggle:hover { transform: scale(1.1); }

/* ========== MAIN BOX ========== */
#chatBox.chatbox {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 360px;
  height: 520px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border-radius: 22px;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: fadeIn 0.4s ease;
  z-index: 9998;
}

/* HEADER */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.chat-header img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00bfff;
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.4);
}
.chat-header .chat-title {
  font-weight: 600;
  color: #222;
}

/* MESSAGES AREA */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: #00bfff transparent;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb {
  background-color: #00bfff;
  border-radius: 3px;
}

/* MESSAGE BUBBLES */
.msg-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.msg-wrapper.bot { justify-content: flex-start; }
.msg-wrapper.user { justify-content: flex-end; }

.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 78%;
  white-space: pre-wrap;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  word-break: break-word;
  transition: 0.2s ease;
}

/* BOT MESSAGES */
.chat-bubble.bot {
  background: rgba(255, 255, 255, 0.8);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* USER MESSAGES */
.chat-bubble.user {
  background: linear-gradient(145deg, #007bff, #00bfff);
  color: #fff;
  border-radius: 20px 20px 0 20px;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
}

/* AVATAR ALIGN */
.msg-wrapper.bot img,
.msg-wrapper.user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ========== INPUT AREA ========== */
.chat-input {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

/* Hàng chứa emoji + input + nút gửi */
.chat-input .input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Ô nhập */
.chat-input input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 8px 10px;
  outline: none;
  color: #333;
  border-radius: 20px;
}

/* Nút emoji và gửi */
.chat-input button {
  background: linear-gradient(145deg, #00bfff, #007bff);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: white;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 191, 255, 0.3);
  transition: transform 0.2s ease;
}
.chat-input button:hover {
  transform: scale(1.1);
}

/* Ô email (ẩn khi đã đăng nhập) */
.chat-input input[type="email"] {
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.85);
  outline: none;
  font-size: 14px;
  color: #333;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}


/* EMOJI PICKER */
#emojiPicker {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 8px;
  max-height: 120px;
  overflow-y: auto;
}

/* TYPING EFFECT */
.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background: #00bfff;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
#chatToggle:hover {
  transform: scale(1.1) rotate(10deg);
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-wrapper img {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.chat-bubble {
  transition: all 0.2s ease;
}
.chat-bubble.user:hover,
.chat-bubble.bot:hover {
  transform: scale(1.02);
}

.typing-dots {
  display: flex;
  gap: 4px;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  background: #777;
  border-radius: 50%;
  animation: blink 1s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%,80%,100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
