/* =====================================================
   FAQ DB MANAGER v1.7.8
   Admin + Frontend Styles
   ===================================================== */

/* ===== ADMIN PAGE ===== */
.wrap h1 {
  margin-bottom: 15px;
}

.wrap form[method="get"] {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wrap form[method="get"] input[type="search"] {
  padding: 7px 10px;
  font-size: 14px;
  min-width: 280px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wrap form[method="get"] input[type="search"]:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0,115,170,0.25);
}

.wrap form[method="get"] .button {
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 3px;
  cursor: pointer;
}

.wrap form[method="get"] .button-primary {
  background-color: #0073aa;
  color: #fff;
}

.wrap form[method="get"] .button-primary:hover {
  background-color: #005a87;
}

.widefat th a {
  text-decoration: none;
  color: #0073aa;
}

.widefat th a:hover {
  text-decoration: underline;
}

.widefat td, .widefat th {
  vertical-align: middle;
}

/* ===== FRONTEND FAQ SHORTCODE ===== */
.faq-db-frontend {
  max-width: 900px;
  margin: 0 auto;
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* Filter area */
.faq-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.faq-filters select,
.faq-filters input[type="text"] {
  padding: 8px 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  height: 50px;
  border-radius: 6px;
  min-width: 200px;
  transition: all 0.2s ease;
}

.faq-filters select:focus,
.faq-filters input[type="text"]:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

/* Subcategory Group Box */
.faq-subcategory-group {
  margin-bottom: 30px;
  background: #f8faff;
  border: 1px solid #dce9f7;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.faq-subcategory-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #005a9e;
  margin: 0 0 10px;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 6px;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  background: linear-gradient(to right, #eaf5ff, #ffffff);
  padding: 8px 12px;
  border-radius: 4px 4px 0 0;
}

/* Questions */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 8px;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  color: #0073aa;
  cursor: pointer;
  margin: 0;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #005c8e;
  text-decoration: underline;
}

/* Answers */
.faq-answer {
  di/splay: none;
  margin-top: 8px;
  padding-left: 15px;
  border-left: 3px solid #cce4f7;
  color: #333;
}

.faq-question.active + .faq-answer {
  display: block;
}

/* Variations textarea */
textarea[name="variations"] {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  font-family: monospace;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
}

#faq-view-modal h2 {
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}
#faq-view-modal p {
  margin-bottom: 10px;
}
.faq-view {
  color: #0073aa;
  cursor: pointer;
}
.faq-view:hover {
  text-decoration: underline;
}

#faq-view-modal h2 {
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}
#faq-view-modal p {
  margin-bottom: 12px;
  line-height: 1.5;
}
.faq-view {
  color: #0073aa;
  cursor: pointer;
}
.faq-view:hover {
  text-decoration: underline;
}


/* Responsive adjustments */
@media (max-width: 640px) {
  .faq-filters {
    flex-direction: column;
  }

  .wrap form[method="get"] {
    flex-direction: column;
    align-items: flex-start;
  }

  .wrap form[method="get"] input[type="search"] {
    width: 100%;
  }

  .faq-filters select,
  .faq-filters input[type="text"] {
    width: 100%;
  }
}
