/* ==========================================================================
   TOLA S6 — KIOSK PERSONA (تولين) MANAGEMENT STYLES
   REV-B Component Styles
   ========================================================================== */

.persona-mgmt-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.persona-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .persona-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Previews */
.persona-preview-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.persona-hero-stage {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #2a2e24 0%, #15160F 100%);
  border: 1px solid rgba(201, 169, 97, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  cursor: crosshair;
}

.persona-hero-stage img.stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.persona-hero-stage .stage-mouth-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 2px solid #FFD56B;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 213, 107, 0.8), inset 0 0 6px rgba(255, 213, 107, 0.6);
  pointer-events: none;
  z-index: 5;
}

.persona-hero-stage .stage-mouth-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  background: #FFD56B;
  border-radius: 50%;
}

.stage-jaw-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  opacity: 0;
  transition: transform 90ms ease-out, opacity 45ms linear;
  z-index: 2;
}

.stage-jaw-overlay.testing {
  opacity: 1;
  animation: s6JawTest 0.38s ease-in-out infinite alternate;
}

@keyframes s6JawTest {
  0% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(3px) scaleY(1.05); }
  100% { transform: translateY(6px) scaleY(1.10); }
}

/* Upload dropzone */
.persona-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  background: var(--surface-alt);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.persona-dropzone:hover, .persona-dropzone.dragover {
  border-color: var(--brand-gold);
  background: var(--brand-gold-light);
}

.persona-dropzone .drop-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-color);
  display: grid;
  place-items: center;
  color: var(--brand-gold);
  border: 1px solid var(--border-color);
}

/* Calibration Sliders */
.calibration-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calib-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calib-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 0 0 140px;
}

.calib-row input[type="range"] {
  flex: 1;
  accent-color: var(--brand-gold);
}

.calib-row span.val {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--text-primary);
  min-width: 45px;
  text-align: end;
}

/* Library items grid */
.persona-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.persona-lib-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.persona-lib-card.active {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 2px var(--brand-gold-border);
}

.persona-lib-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #15160F;
  border: 1px solid var(--border-color);
}

.persona-lib-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.persona-lib-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.persona-lib-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.persona-lib-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Publish bar */
.persona-publish-bar {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.publish-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 280px;
}

.publish-input-group input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  background: var(--surface-alt);
}
