/* Button Base Styles */
.ptg-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  line-height: 1.5;
}

.ptg-btn-primary {
  background-color: #2563eb;
  color: white;
}

.ptg-btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
}

.ptg-btn-secondary {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.ptg-btn-secondary:hover {
  background-color: #e5e7eb;
  color: #1f2937;
}

.ptg-btn-small {
  padding: 6px 12px;
  font-size: 12px;
  background-color: #4b5563;
  color: white;
}

.ptg-btn-small:hover {
  background-color: #374151;
}

/* Header Styles */
.ptg-qna-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.ptg-qna-header h2 {
  margin: 0;
  font-size: 24px;
  color: #111827;
}

/* List Styles */
.ptg-qna-list {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ptg-qna-list-header {
  display: flex;
  background-color: #f9fafb;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #4b5563;
  font-size: 14px;
}

.ptg-qna-item {
  display: flex;
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
  transition: background-color 0.2s;
}

.ptg-qna-item:last-child {
  border-bottom: none;
  font-size: 14px;
}

.col-date {
  width: 100px;
  flex-shrink: 0;
  color: #9ca3af;
  font-size: 13px;
  text-align: right;
}

.col-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px; /* Space between badge and title */
  min-width: 0; /* Enable truncation if needed */
}

.col-title a {
  color: #111827;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.col-title a:hover {
  color: #2563eb;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.status-answered {
  background-color: #dcfce7;
  color: #166534;
}

.status-waiting {
  background-color: #fef9c3;
  color: #854d0e;
}

.ptg-no-data {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 12px;
}

/* Pagination */
.ptg-pagination {
  margin-top: 30px;
  text-align: center;
}

.ptg-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #4b5563;
  font-size: 14px;
  background: white;
}

.ptg-pagination .page-numbers.current {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Form Styles */
.ptg-qna-form-wrapper {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.ptg-qna-form-wrapper h3 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 24px;
  color: #111827;
}

/* Original Form Group Styles */
.ptg-form-group {
  margin-bottom: 24px;
}

.ptg-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 15px;
}

.ptg-form-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.ptg-form-group input[type="text"]:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

.ptg-login-required {
  text-align: center;
  padding: 40px;
  background: #f9fafb;
  border-radius: 12px;
  color: #4b5563;
}

.ptg-login-required a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

/* Single View Styles */
.ptg-qna-single {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.qna-single-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 24px;
  margin-bottom: 30px;
}

.qna-status-wrap {
  margin-bottom: 16px;
}

.qna-single-header h3 {
  margin: 0 0 12px 0;
  font-size: 28px;
  color: #111827;
  line-height: 1.3;
}

.qna-meta {
  color: #6b7280;
  font-size: 14px;
}

.qna-meta span {
  margin-right: 20px;
}

.box-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 700;
  margin-bottom: 12px;
}

.qna-content-box {
  margin-bottom: 40px;
}

.qna-content {
  line-height: 1.7;
  color: #374151;
  font-size: 16px;
}

.qna-answer-box {
  background-color: #f0f9ff;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #bae6fd;
  margin-bottom: 30px;
}

.qna-answer-box .box-label {
  color: #0369a1;
}

.answer-content {
  color: #0c4a6e;
  line-height: 1.7;
}

.qna-no-answer {
  background-color: #f9fafb;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
  margin-bottom: 30px;
}

.admin-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}

.qna-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
  .ptg-qna-list-header {
    display: none;
  }

  .ptg-qna-item {
    flex-wrap: wrap;
    position: relative;
    padding: 16px;
  }

  .col-status {
    margin-right: 12px;
  }

  .col-date {
    text-align: left;
  }
}

/* Error Report Form Specifics */
.ptg-qna-form-wrapper .ptg-form-group {
    margin-bottom: 25px; /* Spacing */
}

.ptg-input-select,
.ptg-textarea,
.ptg-input-text {
  width: 100%;
  padding: 14px 16px; /* Slightly larger padding */
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.5;
  background-color: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ptg-input-select:focus,
.ptg-textarea:focus,
.ptg-input-text:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ptg-textarea {
  resize: vertical;
  min-height: 150px;
  font-family: inherit;
}
