/* Answer The Questions - Frontend Styles */

.atq-container {
  max-width: 1280px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

.atq-form {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 32px;
  margin-bottom: 40px;
  border: 1px solid #f1f3f4;
}

.atq-form h3 {
  color: #1a1a1a;
  margin: 0 0 28px 0;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

.atq-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.atq-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.atq-form-group {
  margin-bottom: 20px;
}

.atq-form-group label {
  display: block;
  margin-bottom: 6px;
  color: #5f6368;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.atq-form-group input,
.atq-form-group select,
.atq-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: #ffffff;
  color: #202124;
}

.atq-form-group input:focus,
.atq-form-group select:focus,
.atq-form-group textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
  background: #ffffff;
}

.atq-form-group input:hover,
.atq-form-group select:hover,
.atq-form-group textarea:hover {
  border-color: #b8b8b8;
}

.atq-form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.atq-submit-container {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.atq-submit-btn {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 10px 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
  min-width: 120px;
  text-transform: none;
  letter-spacing: 0.01em;
}

.atq-submit-btn:hover {
  background: #1557b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.atq-submit-btn:active {
  transform: translateY(0);
}

.atq-submit-btn:disabled {
  background: #dadce0;
  color: #5f6368;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Orta boyut ekranlar için responsive tasarım */
@media (max-width: 1024px) {
  .atq-form-row-3 {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .atq-form-row-3 .atq-form-group:last-child {
    grid-column: 1 / -1;
  }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
  .atq-form {
    padding: 24px;
    margin-bottom: 32px;
  }

  .atq-form h3 {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .atq-form-row,
  .atq-form-row-3 {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
  }

  .atq-form-group {
    margin-bottom: 16px;
  }

  .atq-form-group input,
  .atq-form-group select,
  .atq-form-group textarea {
    padding: 12px 16px;
    font-size: 16px; /* Mobile için daha büyük font */
  }

  .atq-submit-btn {
    padding: 12px 28px;
    font-size: 16px;
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .atq-form {
    padding: 20px;
    border-radius: 12px;
  }

  .atq-form h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .atq-form-group label {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .atq-form-group input,
  .atq-form-group select,
  .atq-form-group textarea {
    padding: 10px 14px;
    border-radius: 6px;
  }

  .atq-submit-btn {
    padding: 10px 24px;
    font-size: 15px;
    min-width: 120px;
  }
}

.atq-message {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-weight: 500;
}

.atq-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.atq-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.atq-questions {
  margin-top: 40px;
}

/* Soru listesi için grid layout */
.atq-questions-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

/* Büyük ekranlarda tek sütun */
@media (min-width: 1280px) {
  .atq-questions-list {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* Orta ekranlarda da tek sütun (tablet) */
@media (min-width: 768px) and (max-width: 1279px) {
  .atq-questions-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Küçük ekranlarda tek sütun (mobil) */
@media (max-width: 767px) {
  .atq-questions-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.atq-questions h3 {
  color: #2c3e50;
  margin: 0 0 25px 0;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}

.atq-question-item {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  padding: 25px;
  margin-bottom: 0; /* Grid gap kullandığımız için kaldırıldı */
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
}

.atq-question-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
}

.atq-question-item.answered {
  border-left-color: #27ae60;
}

.atq-question-item.pending {
  border-left-color: #f39c12;
}

.atq-question-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.atq-question-meta {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 13px;
  color: #7f8c8d;
}

.atq-question-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.atq-question-status.pending {
  background: #fff3cd;
  color: #856404;
}

.atq-question-status.answered {
  background: #d4edda;
  color: #155724;
}

.atq-question-content {
  color: #34495e;
  line-height: 1.6;
  margin-bottom: 20px;
}

.atq-question-user {
  font-size: 14px;
  color: #7f8c8d;
  font-style: italic;
}

.atq-question-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #3498db;
}

.atq-category-status {
  display: flex;
  gap: 10px;
  align-items: center;
}

.atq-status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.atq-status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.atq-status-badge.answered {
  background: #d4edda;
  color: #155724;
}

.atq-date-badge {
  font-size: 12px;
  color: #7f8c8d;
}

.atq-category-name {
  font-size: 13px;
  color: #3498db;
  font-weight: 600;
}

.atq-answer {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
  border-left: 3px solid #27ae60;
}

.atq-answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.atq-answer-label {
  font-weight: 600;
  color: #27ae60;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.atq-answer-date {
  font-size: 12px;
  color: #7f8c8d;
}

.atq-answer-content {
  color: #2c3e50;
  line-height: 1.6;
  margin-bottom: 15px;
}

.atq-answer-author {
  font-size: 13px;
  color: #7f8c8d;
  font-style: italic;
  padding-top: 10px;
  border-top: 1px solid #e1e8ed;
}

.atq-loading {
  text-align: center;
  padding: 40px;
  color: #7f8c8d;
}

.atq-loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e1e8ed;
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.atq-filter {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  padding: 20px;
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

/* Admin paneli için ek stiller - SADECE GEREKLİ OLAN */
.atq-control-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
  align-items: flex-end !important;
  width: 100% !important;
}

.atq-assignment-controls {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  padding: 25px;
  margin-bottom: 25px;
  width: 100%;
  overflow-x: auto; /* Yatay scroll ekledim */
}

/* Form grupları için label hizalama */
.atq-assignment-controls .atq-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2c3e50;
}

/* Select elementleri için stil */
.atq-assignment-controls select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.atq-assignment-controls select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* KULLANICI ATAMA - YAN YANA VE EŞİT SEVİYEDE */
.atq-assignment-controls .atq-control-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 20px !important;
  align-items: flex-end !important;
  width: 100% !important;
  justify-content: space-between !important;
}

.atq-assignment-controls .atq-form-group {
  flex: 1 !important;
  min-width: 200px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.atq-assignment-controls .atq-form-group:last-child {
  flex: 0 0 auto !important;
  min-width: auto !important;
  align-self: flex-end !important;
}

/* Label'ları eşit seviyede hizala */
.atq-assignment-controls .atq-form-group label {
  margin-bottom: 8px !important;
  font-weight: 500 !important;
  color: #2c3e50 !important;
  height: 20px !important;
  line-height: 20px !important;
}

/* Select elementlerini eşit seviyede hizala */
.atq-assignment-controls .atq-form-group select {
  height: 40px !important;
  padding: 8px 12px !important;
  border: 2px solid #e1e8ed !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  width: 100% !important;
}

/* Buton için özel stil */
.atq-assignment-controls .atq-form-group:last-child button {
  height: 40px !important;
  padding: 8px 20px !important;
  margin-top: 28px !important; /* Label yüksekliği + margin */
}

.atq-assigned-users {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  padding: 25px;
}

.atq-user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #f8f9fa;
}

.atq-user-info {
  flex: 1;
}

.atq-user-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.atq-user-email {
  font-size: 13px;
  color: #7f8c8d;
}

.atq-remove-user {
  padding: 8px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}

.atq-remove-user:hover {
  background: #c82333;
}

.atq-category-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.atq-category-btn {
  background: #ecf0f1;
  color: #7f8c8d;
  border: 2px solid #ecf0f1;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.atq-category-btn:hover {
  background: #d5dbdb;
  border-color: #d5dbdb;
  color: #2c3e50;
}

.atq-category-btn.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.atq-category-btn.active:hover {
  background: #2980b9;
  border-color: #2980b9;
}

.atq-filter-btn {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.atq-filter-btn:hover {
  background: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 1280px) {
  .atq-container {
    max-width: 95%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .atq-container {
    padding: 0 15px;
  }

  .atq-form {
    padding: 20px;
  }

  .atq-question-item {
    padding: 20px;
  }

  .atq-question-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .atq-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .atq-filter select {
    min-width: auto;
  }

  /* Admin paneli için responsive */
  .atq-control-row {
    flex-direction: column;
    gap: 15px;
  }

  .atq-control-row .atq-form-group {
    min-width: auto;
  }

  .atq-control-row .atq-form-group:last-child {
    align-self: stretch;
  }
}

/* Loading States */
.atq-form.loading .atq-submit-btn {
  opacity: 0.7;
  cursor: not-allowed;
}

.atq-form.loading .atq-submit-btn::after {
  content: "Gönderiliyor...";
}

/* Animations */
.atq-question-item {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Sistemi */
.atq-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.atq-modal-overlay.active {
  display: flex;
}

.atq-modal {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.atq-modal-header {
  padding: 25px 30px 20px;
  border-bottom: 1px solid #e1e8ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.atq-modal-title {
  margin: 0;
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
}

.atq-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.atq-modal-close:hover {
  background: #f8f9fa;
  color: #333;
}

.atq-modal-body {
  padding: 25px 30px;
  color: #333;
  line-height: 1.6;
  font-size: 15px;
}

.atq-modal-footer {
  padding: 20px 30px 25px;
  border-top: 1px solid #e1e8ed;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.atq-modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

.atq-modal-btn-primary {
  background: #3498db;
  color: white;
}

.atq-modal-btn-primary:hover {
  background: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.atq-modal-btn-secondary {
  background: #6c757d;
  color: white;
}

.atq-modal-btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.atq-modal-btn-danger {
  background: #e74c3c;
  color: white;
}

.atq-modal-btn-danger:hover {
  background: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.atq-modal-btn-success {
  background: #27ae60;
  color: white;
}

.atq-modal-btn-success:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Modal içeriği için özel stiller */
.atq-modal-content {
  margin-bottom: 20px;
}

.atq-modal-content strong {
  color: #2c3e50;
  font-weight: 600;
}

.atq-modal-content .question-text {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  margin: 15px 0;
  font-style: italic;
}

.atq-modal-content .user-info {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.atq-modal-content .category-info {
  color: #3498db;
  font-weight: 500;
  margin-bottom: 10px;
}
