/* frontend/css/modules/preview.css */

.nextlist-preview-checklist {
  width: 100%;
  padding: 20px 0;
}

/* Header */
.nextlist-preview-checklist .preview-header {
  margin-bottom: 2rem;
}

.nextlist-preview-checklist .preview-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nextlist-preview-checklist .preview-title i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.nextlist-preview-checklist .preview-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

/* Preview Controls */
.nextlist-preview-checklist .preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
}

.nextlist-preview-checklist .preview-tabs {
  display: flex;
  gap: 0.5rem;
}

.nextlist-preview-checklist .preview-tab {
  background-color: var(--btn-secundary-color);
  color: var(--btn-secundary-text-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
}

.nextlist-preview-checklist .preview-tab:hover {
  opacity: 0.9;
}

.nextlist-preview-checklist .preview-tab.active {
  background-color: var(--primary-color);
  color: var(--btn-secundary-text-color);
  border: none;
}

.nextlist-preview-checklist .preview-tab i {
  font-size: 0.875rem;
}

.nextlist-preview-checklist .preview-options {
  display: flex;
  gap: 1rem;
}

.nextlist-preview-checklist .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary, #1f2937);
}

.nextlist-preview-checklist .form-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

/* Preview Container */
.nextlist-preview-checklist .preview-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  min-height: 600px;
}

/* Device Frame */
.nextlist-preview-checklist .preview-device {
  background-color: #1f2937;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.nextlist-preview-checklist .preview-device.mobile {
  width: 375px;
  height: 667px;
}

.nextlist-preview-checklist .preview-device.tablet {
  width: 768px;
  height: 1024px;
}

.nextlist-preview-checklist .preview-device.desktop {
  width: 100%;
  max-width: 1200px;
  height: 700px;
  border-radius: 12px;
}

.nextlist-preview-checklist .device-frame {
  width: 100%;
  height: 100%;
  background-color: var(--card-bg, #ffffff);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Device Header */
.nextlist-preview-checklist .device-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background-color: var(--card-bg, #ffffff);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.nextlist-preview-checklist .device-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background-color: #1f2937;
  border-radius: 0 0 16px 16px;
}

.nextlist-preview-checklist .device-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
}

.nextlist-preview-checklist .device-icons {
  display: flex;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-primary, #1f2937);
}

/* Device Content */
.nextlist-preview-checklist .device-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* App Header */
.nextlist-preview-checklist .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nextlist-preview-checklist .app-back-btn,
.nextlist-preview-checklist .app-menu-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.nextlist-preview-checklist .app-back-btn:hover,
.nextlist-preview-checklist .app-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nextlist-preview-checklist .app-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* App Content */
.nextlist-preview-checklist .app-content {
  flex: 1;
  overflow-y: auto;
  background-color: var(--surface-hover, #f9fafb);
}

.nextlist-preview-checklist .preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  height: 100%;
}

.nextlist-preview-checklist .preview-empty i {
  font-size: 4rem;
  color: var(--text-secondary, #9ca3af);
  margin-bottom: 1rem;
}

.nextlist-preview-checklist .preview-empty p {
  font-size: 0.95rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

/* App Footer */
.nextlist-preview-checklist .app-footer {
  background-color: var(--card-bg, #ffffff);
  border-top: 1px solid var(--border, #e5e7eb);
  padding: 1rem 1.25rem;
}

.nextlist-preview-checklist .progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.nextlist-preview-checklist .progress-text {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
}

.nextlist-preview-checklist .progress-percentage {
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 700;
}

.nextlist-preview-checklist .progress-bar {
  height: 6px;
  background-color: var(--border, #e5e7eb);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.nextlist-preview-checklist .progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.nextlist-preview-checklist .footer-actions {
  display: flex;
  gap: 0.75rem;
}

.nextlist-preview-checklist .btn-footer {
  flex: 1;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.nextlist-preview-checklist .btn-primary {
  background-color: var(--primary-color);
  color: var(--btn-secundary-text-color);
}

.nextlist-preview-checklist .btn-secondary {
  background-color: var(--btn-secundary-color);
  color: var(--btn-secundary-text-color);
}

/* Device Footer */
.nextlist-preview-checklist .device-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  background-color: var(--card-bg, #ffffff);
}

.nextlist-preview-checklist .device-home-indicator {
  width: 120px;
  height: 4px;
  background-color: var(--text-secondary, #9ca3af);
  border-radius: 2px;
}

/* Preview Info */
.nextlist-preview-checklist .preview-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.nextlist-preview-checklist .info-card {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 1.5rem;
}

.nextlist-preview-checklist .info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.nextlist-preview-checklist .info-header i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.nextlist-preview-checklist .info-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nextlist-preview-checklist .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.nextlist-preview-checklist .info-label {
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
}

.nextlist-preview-checklist .info-value {
  color: var(--text-primary, #1f2937);
  font-weight: 600;
}

/* Dark Theme */
html.dark-theme .nextlist-preview-checklist .preview-title,
html.dark-theme .nextlist-preview-checklist .info-header,
html.dark-theme .nextlist-preview-checklist .info-value,
html.dark-theme .nextlist-preview-checklist .checkbox-label {
  color: #f0f0f0;
}

html.dark-theme .nextlist-preview-checklist .preview-subtitle,
html.dark-theme .nextlist-preview-checklist .info-label {
  color: #b0b0b0;
}

html.dark-theme .nextlist-preview-checklist .preview-controls,
html.dark-theme .nextlist-preview-checklist .info-card,
html.dark-theme .nextlist-preview-checklist .device-frame,
html.dark-theme .nextlist-preview-checklist .device-header,
html.dark-theme .nextlist-preview-checklist .app-footer,
html.dark-theme .nextlist-preview-checklist .device-footer {
  background-color: #2c2c2c;
  border-color: #555555;
}

html.dark-theme .nextlist-preview-checklist .app-content {
  background-color: #1e1e1e;
}

html.dark-theme .nextlist-preview-checklist .device-time,
html.dark-theme .nextlist-preview-checklist .device-icons {
  color: #f0f0f0;
}

html.dark-theme .nextlist-preview-checklist .progress-bar {
  background-color: #555555;
}

html.dark-theme .nextlist-preview-checklist .device-home-indicator {
  background-color: #666666;
}

/* Responsive */
@media (max-width: 1024px) {
  .nextlist-preview-checklist .preview-device.desktop {
    width: 100%;
    height: auto;
    min-height: 600px;
  }
}

@media (max-width: 768px) {
  .nextlist-preview-checklist {
    padding: 15px;
  }

  .nextlist-preview-checklist .preview-container {
    padding: 1rem;
  }

  .nextlist-preview-checklist .preview-device.mobile,
  .nextlist-preview-checklist .preview-device.tablet {
    width: 100%;
    max-width: 375px;
    height: auto;
    min-height: 600px;
  }

  .nextlist-preview-checklist .preview-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .nextlist-preview-checklist .preview-tabs {
    flex-wrap: wrap;
  }

  .nextlist-preview-checklist .preview-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nextlist-preview-checklist .preview-device {
    border-radius: 0;
    padding: 0;
  }

  .nextlist-preview-checklist .device-frame {
    border-radius: 0;
  }
}

/* Preview Sections */
.nextlist-preview-checklist .preview-section {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.nextlist-preview-checklist .preview-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.nextlist-preview-checklist .preview-section-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0;
  flex: 1;
}

.nextlist-preview-checklist .preview-section-count {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  background: var(--surface-hover, #f3f4f6);
  padding: 4px 12px;
  border-radius: 12px;
}

.nextlist-preview-checklist .preview-section-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nextlist-preview-checklist .preview-field {
  background: var(--surface-hover, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 1rem;
}

.nextlist-preview-checklist .preview-field-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.nextlist-preview-checklist .preview-field-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary, #1f2937);
  flex: 1;
}

.nextlist-preview-checklist .preview-field-type {
  font-size: 0.8125rem;
  color: var(--text-secondary, #9ca3af);
  letter-spacing: 0.5px;
}

.nextlist-preview-checklist .preview-field-placeholder {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  font-style: italic;
  margin-top: 0.5rem;
}

.nextlist-preview-checklist .field-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.nextlist-preview-checklist .badge-required {
  background: #fef3c7;
  color: #92400e;
}

.nextlist-preview-checklist .no-fields {
  text-align: center;
  color: var(--text-secondary, #9ca3af);
  font-size: 0.875rem;
  padding: 2rem;
}