/**
 * SimpleGallery WebOS - Template App Stylesheet
 * Fully responsive, theme-adaptive CSS using standard WebOS design tokens.
 */

.template-app-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  box-sizing: border-box;
}

.template-card {
  background: var(--bg-card, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.template-card h2,
.template-card h3 {
  margin: 0;
  color: var(--text-main, #0f172a);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-card p {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  line-height: 1.5;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* File Picker Preview Box */
.template-file-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-main, rgba(0, 0, 0, 0.03));
  border: 1px dashed var(--border-color, rgba(0, 0, 0, 0.15));
  border-radius: 10px;
}

.template-file-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-card, rgba(0,0,0,0.05));
  border: 1px solid var(--border-color, rgba(0,0,0,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.template-file-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.template-file-name {
  font-weight: 600;
  color: var(--text-main, #0f172a);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-file-details {
  font-size: 0.775rem;
  color: var(--text-muted, #64748b);
}

/* Notepad Section */
.template-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.template-note-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-main, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.template-note-item:hover {
  border-color: var(--accent-primary, #3b82f6);
  transform: translateY(-1px);
}

.template-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-note-title {
  font-weight: 600;
  color: var(--text-main, #0f172a);
  font-size: 0.875rem;
}

.template-note-date {
  font-size: 0.725rem;
  color: var(--text-muted, #64748b);
}

.template-note-content {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Event Log Console */
.template-event-log {
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-main, rgba(0,0,0,0.06));
  border: 1px solid var(--border-color, rgba(0,0,0,0.1));
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.775rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-event-row {
  display: flex;
  gap: 8px;
  color: var(--text-main, #0f172a);
}

.template-event-time {
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
}

.template-event-name {
  color: var(--accent-primary, #3b82f6);
  font-weight: 600;
}
