/* =========================================================
   Q&A Modul – Stilovi (osnova)
   ========================================================= */

.qa-section { margin-top: 40px; }
.qa-toolbar { display: flex; justify-content: space-between; margin-bottom: 20px; }
.qa-search input { border: 1px solid #ddd; border-radius: 6px; padding: 6px 10px; }
.qa-sort-btn { border: 1px solid #ddd; border-radius: 6px; padding: 6px 12px; background: #fff; cursor: pointer; }
.qa-loadmore-btn { background: #000; color: #fff; border: none; border-radius: 8px; padding: 10px 20px; cursor: pointer; }


/* =========================================================
   💬 Customer Q&A – Sekcija u stilu Review modula
   ========================================================= */

.qa-section {
  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 40px 30px;
  margin-top: 40px;
}

.qa-inner {
  max-width: 880px;
  margin: 0 auto;
}

.qa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.qa-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.qa-ask-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.qa-ask-btn:hover {
  background: #222;
  transform: translateY(-1px);
}

/* 🔹 TOOLBAR */
.qa-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
}

.qa-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.qa-search input {
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  width: 220px;
}

.qa-search input:focus { outline: none; }

.qa-search button {
  border: none;
  background: #f2f2f2;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease;
}
.qa-search button:hover {
  background: #e8e8e8;
}

/* 🔹 SORT */
.qa-sort-wrapper { position: relative; }
.qa-sort-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.qa-sort-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  width: 220px;
  display: none;
  z-index: 10;
  list-style-type: none;
  padding-left: 0;
}
.qa-sort-menu.open { display: block; }
.qa-sort-menu li {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.qa-sort-menu li:hover { background: #f8f8f8; }
.qa-sort-menu li.active { background: #f5f5f5; font-weight: 600; }
.qa-sort-menu li.qa-reset-option {
  text-align: center;
  font-style: italic;
  color: #888;
}

/* 🔹 AKTIVNI SORT INDIKATOR */
.qa-active-sort {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  font-weight: 500;
}

/* 🔹 LOAD MORE */
.qa-loadmore-wrapper { text-align: center; margin-top: 25px; }
.qa-loadmore-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}
.qa-loadmore-btn:hover { background: #222; transform: translateY(-1px); }
.qa-loadmore-btn:active { transform: scale(0.98); }

/* 🔹 OPŠTI STILOVI */
.qa-section .review-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.qa-section .review-author {
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}
.qa-section .review-content {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

/* =========================================================
   💬 Customer Q&A – Forma za postavljanje pitanja
   ========================================================= */

.qa-form-modal {
  background: rgba(0, 0, 0, 0.55);
  position: fixed;
  inset: 0;
  display: none; /* aktivira se .fadeIn() iz JS-a */
  justify-content: center;
  align-items: center;
  z-index: 99999;
  /* omogućava glatku tranziciju */
  transition: opacity 0.25s ease;
}

.qa-form-modal.active {
  display: flex !important; /* koristi flex layout */
  opacity: 1;
}


.qa-form-container {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  padding: 35px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  animation: qaPopupFade 0.25s ease;
}

@keyframes qaPopupFade {
  0% {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}


.qa-form-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: left;
  color: #111;
}

.qa-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: #333;
}

#qa-question {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  resize: vertical;
  margin-bottom: 20px;
}

.qa-profile h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111;
}

.qa-social-login {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.qa-btn {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.qa-btn.fb:hover { background: #f5f5f5; }
.qa-btn.google:hover { background: #f5f5f5; }

.qa-divider {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin: 10px 0 16px;
  position: relative;
}
.qa-divider span { background: #fff; padding: 0 10px; position: relative; z-index: 2; }
.qa-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: #ddd;
}

.qa-profile input[type="text"],
.qa-profile input[type="email"] {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 14px;
}

.qa-upload label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}
.qa-upload input[type="file"] {
  width: 100%;
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
}

.qa-submit-btn {
  display: block;
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.qa-submit-btn:hover { background: #222; transform: translateY(-1px); }

.qa-privacy-note {
  text-align: center;
  font-size: 12px;
  color: #777;
  margin-top: 15px;
}
.qa-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 26px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}
.qa-close-btn:hover { color: #111; }

.qa-thankyou {
  text-align: center;
  padding: 40px 20px;
}
.qa-thankyou h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}
.qa-thankyou p {
  font-size: 15px;
  color: #555;
}
.qa-answers { margin-top:10px; border-left:2px solid #eee; padding-left:15px; }
.qa-answer { background:#fafafa; border-radius:8px; margin-bottom:8px; padding:10px 12px; }
.qa-answer-author { font-weight:600; margin-bottom:4px; color:#222; }
.qa-inline-answer textarea { width:100%; border:1px solid #ddd; border-radius:6px; padding:6px; }
.qa-inline-submit { margin-top:6px; background:#111; color:#fff; border:none; border-radius:6px; padding:6px 12px; }

/* =========================================================
   💬 Add Answer dugme – Luen stil
   ========================================================= */
.qa-add-answer-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  display: inline-block;
  margin-top: 10px;
}
.qa-add-answer-btn:hover {
  background: #222;
  transform: translateY(-1px);
}
.qa-add-answer-btn:active {
  transform: scale(0.98);
}
.qa-answer-form {
  margin-top: 10px;
  display: none;
}
.qa-inline-answer textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}
.qa-inline-submit {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.qa-inline-submit:hover {
  background: #222;
  transform: translateY(-1px);
}
.qa-answer-footer {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qa-vote-btn {
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s;
}

.qa-vote-btn:hover {
  transform: scale(1.1);
  color: #222;
}

.qa-vote-btn.voted {
  color: var(--accent-color, #3ba776);
  cursor: default;
}


/* =========================================================
   💅 Q&A UI Enhancements (Sort + Search + Votes)
   ========================================================= */

/* 🔹 SORT WRAPPER */
.qa-sort-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 10px;
}

.qa-sort-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qa-sort-btn:hover {
  background: #f7f7f7;
}

.qa-sort-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 10;
  width: 200px;
}

.qa-sort-menu.open {
  display: block;
}

.qa-sort-menu li {
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qa-sort-menu li:hover {
  background: #f5f5f5;
}

.qa-sort-menu li.active {
  background: #eef6ff;
  color: #0073aa;
  font-weight: 600;
}

.qa-active-sort {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}

/* 🔹 SEARCH BAR */
.qa-search {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.qa-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 14px;
}

.qa-search button {
  background: #0073aa;
  border: none;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.qa-search button:hover {
  background: #005c8f;
}

/* 🔹 VOTE BUTTONS */
.qa-vote-btn {
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.1s ease, color 0.2s ease;
  user-select: none;
}

.qa-vote-btn:hover {
  transform: scale(1.2);
}

.qa-vote-btn.like:hover {
  color: #008800;
}

.qa-vote-btn.dislike:hover {
  color: #cc0000;
}

.qa-vote-btn.voted {
  opacity: 0.6;
  pointer-events: none;
}

.qa-vote-btn.voted.like {
  color: #00a000;
}

.qa-vote-btn.voted.dislike {
  color: #d00000;
}

/* 🔹 ANSWER FORM */
.qa-inline-answer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa-inline-answer textarea {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  resize: vertical;
}

.qa-inline-submit {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s ease;
}

.qa-inline-submit:hover {
  background: #005c8f;
}

/* 🔹 LOAD STATE */
#qa-list.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* 🔹 THANK YOU MESSAGE */
.qa-thankyou {
  text-align: center;
  padding: 30px 20px;
  background: #f9f9f9;
  border-radius: 10px;
}

.qa-thankyou h3 {
  color: #0073aa;
  margin-bottom: 8px;
}

.nsl-button {
  width: 100%;
  margin-bottom: 8px;
  border-radius: 6px !important;
  font-size: 14px;
}

.nsl-button-facebook {
  background-color: #3b5998 !important;
  color: #fff !important;
}

.nsl-button-google {
  background-color: #fff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
}
