/**
 * SURVEYS MODULE STYLES
 * Version: 1.0
 * Date: November 23, 2025
 */

/* ========================================
   SURVEYS CONTAINER
   ======================================== */

.surveys-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   HEADER
   ======================================== */

.surveys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #dee2e6;
}

.surveys-header .header-left h2 {
  margin: 0 0 5px 0;
  color: #343a40;
  font-size: 1.8rem;
  font-weight: 600;
}

.surveys-header .header-left i {
  color: #17a2b8;
  margin-right: 10px;
}

.surveys-header .header-left p {
  margin: 0;
  font-size: 0.95rem;
}

.surveys-header .header-right {
  display: flex;
  gap: 10px;
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-container .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: #f8f9fa;
  border-radius: var(--lr-r-md, 6px);
  border: 2px dashed #dee2e6;
}

.empty-state-icon {
  margin-bottom: 20px;
}

.empty-state-icon i {
  opacity: 0.3;
}

.empty-state h4 {
  font-size: 1.5rem;
  color: #495057;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 30px;
}

/* ========================================
   SURVEYS GRID
   ======================================== */

.surveys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* ========================================
   SURVEY CARD
   ======================================== */

.survey-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: var(--lr-r-md, 6px);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.survey-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Card Header */
.survey-card-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--lr-grad-from, #3b82f6) 0%, var(--lr-grad-to, #8b5cf6) 100%);
  color: white;
  overflow: hidden;
}

.survey-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.survey-title h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  flex: 1;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.survey-title .badge {
  margin-left: 10px;
  padding: 5px 10px;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
}

.survey-type {
  margin-top: 5px;
}

.survey-type .badge {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.8rem;
}

/* Card Body */
.survey-card-body {
  padding: 20px;
}

.survey-description {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Stats */
.survey-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: var(--lr-r-sm, 4px);
  font-size: 0.85rem;
}

.stat-item i {
  margin-right: 8px;
  color: #17a2b8;
  font-size: 1rem;
}

.stat-item span {
  color: #495057;
  font-weight: 500;
}

/* Survey Link */
.survey-link {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
}

.survey-link label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 5px;
  display: block;
}

.survey-link .input-group input {
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  background: #f8f9fa;
}

.survey-link .copy-link-btn {
  padding: 0.25rem 0.75rem;
}

/* Card Footer */
.survey-card-footer {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.survey-card-footer .btn-group {
  width: 100%;
}

.survey-card-footer .btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 8px 12px;
}

.survey-card-footer .btn i {
  margin-right: 4px;
}

/* ========================================
   STATUS BADGES
   ======================================== */

.badge-draft {
  background-color: #6c757d;
}

.badge-active {
  background-color: #28a745;
}

.badge-paused {
  background-color: #ffc107;
  color: #212529;
}

.badge-closed {
  background-color: #dc3545;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
  .surveys-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .surveys-grid {
    grid-template-columns: 1fr;
  }

  .surveys-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .surveys-header .header-right {
    width: 100%;
  }

  .surveys-header .header-right .btn {
    width: 100%;
  }

  .survey-stats {
    grid-template-columns: 1fr;
  }

  .survey-card-footer .btn-group {
    flex-direction: column;
  }

  .survey-card-footer .btn {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.survey-card {
  animation: fadeIn 0.3s ease-out;
}

.survey-card:nth-child(1) { animation-delay: 0.05s; }
.survey-card:nth-child(2) { animation-delay: 0.1s; }
.survey-card:nth-child(3) { animation-delay: 0.15s; }
.survey-card:nth-child(4) { animation-delay: 0.2s; }
.survey-card:nth-child(5) { animation-delay: 0.25s; }
.survey-card:nth-child(6) { animation-delay: 0.3s; }

/* ========================================
   DARK MODE OVERRIDES
   ======================================== */
body.dark-mode .survey-card {
    background: #16213e;
    border-color: #2d3748;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode .survey-card-body {
    color: #e2e8f0;
}

body.dark-mode .survey-description {
    color: #a0aec0;
}

body.dark-mode .stat-item {
    background: #1a1a2e;
    color: #e2e8f0;
}

body.dark-mode .stat-item i {
    color: #63b3ed;
}

body.dark-mode .stat-item span {
    color: #e2e8f0;
}

body.dark-mode .survey-card-footer {
    background: #1a1a2e;
    border-top-color: #2d3748;
}

body.dark-mode .survey-link {
    border-top-color: #2d3748;
}

body.dark-mode .survey-link label {
    color: #a0aec0;
}

body.dark-mode .survey-link .input-group input {
    background: #1a1a2e;
    color: #e2e8f0;
    border-color: #2d3748;
}

body.dark-mode .surveys-header {
    border-bottom-color: #2d3748;
}

body.dark-mode .surveys-header .header-left h2 {
    color: #e2e8f0;
}

body.dark-mode .empty-state {
    background: #16213e;
    border-color: #2d3748;
}

body.dark-mode .empty-state h4 {
    color: #e2e8f0;
}

