/* =========================================================================
   dopic.app - Water Reflection Studio (iOS Mobile Styles)
   ========================================================================= */

.m-app-container {
  padding-bottom: 90px;
}

/* Preset Choice Buttons (Natural Lake / Flat Mirror) */
.choice-row-2 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}
.choice-row-2 .choice-btn {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  padding: 0.55rem 0.5rem !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

/* Water Tint 4 Buttons */
.choice-row-4 {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  gap: 5px !important;
  box-sizing: border-box !important;
}
.choice-row-4 .choice-btn {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  padding: 0.48rem 0.2rem !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.choice-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
.choice-btn.active {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
  font-weight: 800 !important;
}

/* Mobile Drag Hint Banner */
.m-drag-hint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 1rem;
  padding: 5px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 0.72rem;
  color: #1e40af;
  font-weight: 600;
  gap: 8px;
}
.m-btn-reset-pos {
  flex-shrink: 0;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

/* Mobile Canvas Stage Container */
.m-canvas-wrap {
  margin: 0 1rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 2rem) !important;
  max-width: 440px !important;
  min-height: 320px;
  max-height: 480px;
  position: relative;
  overflow: hidden;
  touch-action: none;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

#canvasReflection {
  max-width: 100% !important;
  max-height: 440px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  touch-action: none;
  display: block;
}

/* Mobile Interactive Waterline Guideline */
.waterline-guide {
  position: absolute;
  height: 48px;
  margin-top: -24px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  touch-action: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.waterline-core-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 23px;
  height: 2px;
  background: #0284c7;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.95);
  pointer-events: none;
}
.waterline-handle {
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.5);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.handle-arrow {
  font-size: 0.75rem;
  opacity: 0.9;
  pointer-events: none;
}
.handle-label {
  pointer-events: none;
}

/* Mobile Canvas Actions (Upload & Camera) */
.m-canvas-actions {
  display: flex;
  gap: 8px;
  margin: 0.5rem 1rem 1rem;
}
.m-btn-action {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0 0.75rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.m-btn-upload {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.m-btn-upload:active {
  background: #1e293b;
  transform: scale(0.98);
}
.m-btn-camera {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.m-btn-camera:active {
  background: #f8fafc;
  transform: scale(0.98);
}

/* Parameters iOS Card */
.m-config-card {
  margin: 0 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.m-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.m-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}
.m-val-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 5px;
}
.m-slider {
  width: 100%;
  accent-color: #0284c7;
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

/* Bottom Export Bar */
.m-bottom-export-bar {
  margin: 0 1rem 1.5rem;
}
.m-btn-export-main {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  cursor: pointer;
}
.m-btn-export-main:active {
  transform: scale(0.98);
}
