/* Compact Template Interface Styles */

/* Global overrides for template pages */
.main-section {
  padding: 0 !important;
}

.content-container {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Main Container */
.compact-template-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  overflow: hidden;
}

/* Compact Header */
.compact-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.header-left {
  flex: 1;
}

.template-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.template-description {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.template-badges {
  display: flex;
  gap: 0.5rem;
}

.template-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.2s ease;
}

.template-badge.image {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.template-badge.video {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  border-color: #bbf7d0;
}

.template-badge.beginner {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  color: #92400e;
  border-color: #fde68a;
}

.workflow-indicator {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
  text-align: right;
}

/* Scrollable Styles Section */
.styles-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  margin: 1rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
}

.section-title-bar {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.section-title-bar h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.05em;
}

.section-title-bar p {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.styles-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Compact Styles Grid */
.compact-styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.compact-style-card {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  position: relative;
}

.compact-style-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.compact-style-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Gallery item selected state for template styles */
.gallery-item.selected {
  border: 3px solid #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.gallery-item.selected:hover {
  transform: translateY(-2px); /* Override hover transform when selected */
}

.style-image-container {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.style-image,
.style-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.compact-style-card:hover .style-image,
.compact-style-card:hover .style-video {
  transform: scale(1.03);
}

.style-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #94a3b8;
}

.style-placeholder svg {
  width: 2rem;
  height: 2rem;
}

/* Style overlay with text on image */
.style-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 1.5rem 1rem 1rem;
  color: white;
}

.style-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.style-check-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #10b981;
  color: white;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.2s ease;
}

.compact-style-card.selected .style-check-indicator {
  display: flex;
}

/* Upload Section */
.upload-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
  flex-shrink: 0;
}

.compact-uploads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.compact-upload-zone {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.upload-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.required {
  color: #ef4444;
}

.compact-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.compact-upload-area:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
}

.upload-prompt svg {
  width: 1.5rem;
  height: 1.5rem;
}

.upload-prompt span {
  font-size: 0.75rem;
  font-weight: 500;
}

.file-input-hidden {
  display: none;
}

.compact-uploaded-files {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.uploaded-file-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

.uploaded-file-preview:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.file-preview-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-icon {
  flex-shrink: 0;
  color: #64748b;
}

.file-icon svg {
  width: 1rem;
  height: 1rem;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.1rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.6rem;
  color: #64748b;
  margin: 0;
}

.remove-file-btn {
  flex-shrink: 0;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-file-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.remove-file-btn svg {
  width: 0.6rem;
  height: 0.6rem;
}

/* Fixed Bottom Prompt Area */
.bottom-prompt-area {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 -4px 15px rgba(15, 23, 42, 0.08);
}

.prompt-container {
  max-width: 1200px;
  margin: 0 auto;
}

.prompt-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt-header {
  text-align: center;
}

.prompt-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.05em;
}

.prompt-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-input-group {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.compact-prompt-input {
  flex: 1;
  min-height: 60px;
  padding: 0.875rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  resize: none;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  background: #ffffff;
  transition: all 0.3s ease;
  color: #1e293b;
}

.compact-prompt-input::placeholder {
  color: #94a3b8;
}

.compact-prompt-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.prompt-actions {
  flex-shrink: 0;
}

.compact-generate-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
  min-width: 140px;
  justify-content: center;
}

.compact-generate-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.compact-generate-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(148, 163, 184, 0.3);
}

.generate-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.generate-text {
  font-weight: 700;
}

.generate-credits {
  font-size: 0.75rem;
  opacity: 0.8;
}

.prompt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.prompt-tip {
  color: #64748b;
  font-weight: 500;
}

.char-counter {
  color: #94a3b8;
  font-weight: 600;
}

/* Scrollbar Styling */
.styles-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.styles-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

.styles-scroll-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.styles-scroll-area::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .header-right {
    align-items: flex-start;
  }
  
  .workflow-indicator {
    text-align: left;
  }
  
  .compact-styles-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .compact-header {
    padding: 1rem;
  }
  
  .template-title {
    font-size: 1.5rem;
  }
  
  .template-description {
    font-size: 0.8rem;
  }
  
  .styles-section {
    margin: 0.75rem;
  }
  
  .compact-styles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .prompt-input-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .compact-generate-btn {
    width: 100%;
  }
  
  .bottom-prompt-area {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .template-title {
    font-size: 1.25rem;
  }
  
  .compact-styles-grid {
    grid-template-columns: 1fr;
  }
  
  .compact-uploads {
    grid-template-columns: 1fr;
  }
  
  .template-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
} 