/* =========================================================================
   dopic.app - Mockup Studio Flagship (Mobile iOS Light Studio Styles)
   ========================================================================= */

.m-app-container {
  padding-bottom: 96px;
  background: #f8fafc;
}

/* Sample Demos Switcher Bar */
.m-demo-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0.5rem 1rem 0.25rem;
  scrollbar-width: none;
}
.m-demo-bar::-webkit-scrollbar {
  display: none;
}
.sample-pill-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}
.sample-pill-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}

/* Canvas Stage Box */
.m-stage-container {
  margin: 0.5rem 1rem 0.75rem;
  background: #f1f5f9;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 380px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
}

.m-beautify-canvas {
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Canvas Bottom Actions */
.m-canvas-actions {
  display: flex;
  gap: 8px;
  margin: 0 1rem 0.75rem;
}
.m-btn-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.m-btn-action:active {
  background: #f1f5f9;
}
.m-btn-action.m-btn-primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

/* Mobile Tabs Switcher */
.m-tabs-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 1rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.m-tab-btn {
  padding: 0.45rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
}
.m-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Controls Light Card */
.m-config-card {
  margin: 0 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.m-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.m-sec-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Templates Grid */
.m-templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.template-card-btn {
  padding: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  text-align: left;
  cursor: pointer;
}
.template-card-btn.active {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

/* Choice Pills Row */
.choice-pills-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.choice-pills-row::-webkit-scrollbar {
  display: none;
}
.pill-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.pill-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* Frame Styles Grid */
.m-frame-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.frame-btn {
  padding: 0.45rem 0.3rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #334155;
  text-align: center;
  cursor: pointer;
}
.frame-btn.active {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

/* Background Palette */
.bg-palette-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.bg-swatch {
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.bg-swatch.active {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7;
}
.swatch-transparent {
  background: repeating-conic-gradient(#cbd5e1 0% 25%, #f1f5f9 0% 50%) 50% / 10px 10px !important;
}

/* Switch Toggle Component */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-toggle-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 20px;
}
.slider-toggle-round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
input:checked + .slider-toggle-round {
  background-color: #0284c7;
}
input:checked + .slider-toggle-round:before {
  transform: translateX(16px);
}

.studio-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.74rem;
  color: #0f172a;
  outline: none;
}
.studio-text-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
