/* ==========================================================================
   AI ICON GENERATOR - COMPONENTS & MODALS (components.css)
   ========================================================================== */

/* Modal Backdrop & Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
}

.modal-header h3 {
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Form Inputs in Modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-violet);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Tool Mockups (Phone Frame, Browser Tab) */
.device-mockup-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2.5rem 0;
}

.phone-frame {
  width: 290px;
  height: 560px;
  background: #111420;
  border: 12px solid #232838;
  border-radius: 44px;
  box-shadow: var(--shadow-lg), 0 0 0 2px #3b4259;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 110px;
  height: 22px;
  background: #232838;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  margin: 0 auto 1.5rem;
}

.phone-screen {
  flex: 1;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 64px;
  gap: 1.25rem 0.75rem;
  align-content: start;
}

.mockup-app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.mockup-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  background: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-app-label {
  font-size: 0.65rem;
  color: #FFF;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56px;
}

/* Browser Tab Simulation */
.browser-tab-simulation {
  background: #1E293B;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 600px;
  margin: 1.5rem auto;
}

.browser-header-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0F172A;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.browser-dots {
  display: flex;
  gap: 6px;
  margin-right: 0.5rem;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-dot.dot-red { background: #EF4444; }
.browser-dot.dot-yellow { background: #F59E0B; }
.browser-dot.dot-green { background: #10B981; }

.browser-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1E293B;
  padding: 0.35rem 0.85rem;
  border-radius: 6px 6px 0 0;
  font-size: 0.75rem;
  color: var(--text-primary);
  max-width: 200px;
}

.browser-tab-favicon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.browser-address-bar {
  flex: 1;
  background: #0F172A;
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Style Catalog Showroom Cards */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.catalog-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.2s ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg);
}

.catalog-preview {
  height: 160px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
}

.catalog-preview svg {
  width: 96px;
  height: 96px;
}

.catalog-meta h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.catalog-prompt-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.4;
}

/* Action Button Row in Catalog */
.catalog-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  flex: 1;
}

.btn-secondary:hover {
  border-color: var(--border-medium);
  background: var(--border-medium);
}
