/* SnapCopy - Main/Home Page Styles */

.qr-container {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chat-button { display: none; }
.message-placeholder { font-family: monospace; letter-spacing: 2px; }
.reveal-btn { margin-left: 8px; }

.stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item { text-align: center; flex: 1; min-width: 120px; }
.stat-value { font-size: 2rem; font-weight: bold; color: #0d6efd; }
.stat-label { font-size: 0.875rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.5px; }

.id-cell { font-family: monospace; font-size: 0.875rem; color: #6c757d; }
.content-cell { max-width: 300px; word-wrap: break-word; }
.timestamp-cell { white-space: nowrap; }

.edit-content-btn:hover { background-color: #0d6efd; color: white; }
.save-content-btn { transition: all 0.3s ease; }
.save-content-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); }
.cancel-edit-btn:hover { background-color: #6c757d; color: white; }
.editable-content { transition: border-color 0.3s ease; }
.editable-content:focus { border-color: #0d6efd; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); }

.download-btn { padding: 0.25rem 0.75rem; font-size: 0.875rem; margin: 2px; }
.download-btn i { margin-right: 4px; }

audio, video { border-radius: 0.5rem; background-color: #f8f9fa; }
audio { max-width: 300px; }
video { max-width: 400px; height: auto; }
.media-container { margin-top: 0.5rem; display: inline-block; width: 100%; }

.detail-container { background-color: var(--detail-container-bg); border: 1px solid var(--detail-container-border); }
.detail-container textarea { background-color: var(--input-bg); color: var(--input-text); font-family: monospace; font-size: 0.875rem; border-color: var(--input-border); }

#w3review:focus { border-color: #667eea !important; box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important; }

.submit-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none; border-radius: 12px; padding: 12px 28px; font-weight: 600;
  transition: all 0.3s; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.submit-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6); }
.submit-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }

/* Card-based Message and File List Styles */
.message-list, .file-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.message-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.message-card-header:hover {
  background: #f0f1f2;
}

.message-card-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.message-preview-text {
  font-size: 0.95rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.message-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.message-time-badge {
  font-size: 0.8rem;
  color: #6c757d;
  white-space: nowrap;
}

.message-card-details {
  padding: 1.25rem;
  background: white;
  border-top: 1px solid #e0e0e0;
}

.message-content-section {
  margin-bottom: 1rem;
}

.message-content-wrapper textarea {
  resize: vertical;
  min-height: 80px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.message-meta-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
}

.meta-item {
  margin-bottom: 0.5rem;
}

.meta-item:last-child {
  margin-bottom: 0;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.meta-value {
  font-size: 0.9rem;
  color: #333;
  word-break: break-word;
}

.message-actions-section {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.expand-message-btn {
  transition: transform 0.3s ease;
}

.expand-message-btn i {
  transition: transform 0.3s ease;
}

/* Dark mode support */
.dark-mode .message-card {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .message-card-header {
  background: #4a5568;
  border-bottom-color: #4a5568;
}

.dark-mode .message-card-header:hover {
  background: #4a5568;
}

.dark-mode .message-preview-text {
  color: #e2e8f0;
}

.dark-mode .message-card-details {
  background: #2d3748;
  border-top-color: #4a5568;
}

.dark-mode .message-meta-section {
  background: #4a5568;
}

.dark-mode .meta-label {
  color: #a0aec0;
}

.dark-mode .meta-value {
  color: #e2e8f0;
}

.dark-mode .message-time-badge {
  color: #a0aec0;
}

.dark-mode .editable-content {
  background: #1a202c;
  color: #e2e8f0;
  border-color: #4a5568;
}

.dark-mode .editable-content:focus {
  border-color: #667eea;
}
