/**
 * ============================================================
 *  TRAKITA VERIFICATION CSS
 *  Styling untuk modul verifikasi mitra:
 *  - Kamera (wajah & usaha)
 *  - Lingkaran panduan wajah
 *  - OTP input
 *  - Status cards
 *  - Admin review UI
 * ============================================================
 */

/* ==================== VERIFY SECTION ==================== */
.tv-verify-section {
  margin: 16px 0;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.tv-verify-header {
  margin-bottom: 12px;
}

.tv-verify-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3e8ff;
  margin-bottom: 8px;
}

.tv-verify-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.tv-verify-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ==================== CAMERA ==================== */
.tv-camera-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.tv-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tv-camera-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.tv-camera-preview.has-photo {
  z-index: 10;
}

.tv-camera-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* ==================== FACE GUIDE OVAL ==================== */
.tv-face-guide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.tv-face-oval {
  width: 65%;
  height: 75%;
  border: 3px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.15);
  animation: tv-pulse-oval 2s ease-in-out infinite;
}

@keyframes tv-pulse-oval {
  0%, 100% { border-color: rgba(255, 255, 255, 0.5); }
  50% { border-color: rgba(255, 255, 255, 0.9); }
}

.tv-face-guide-text {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  z-index: 4;
}

/* ==================== BUSINESS FRAME ==================== */
.tv-business-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.tv-frame-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(255, 255, 255, 0.8);
  border-style: solid;
  border-width: 0;
}

.tv-frame-tl { top: 12px; left: 12px; border-top-width: 3px; border-left-width: 3px; border-radius: 6px 0 0 0; }
.tv-frame-tr { top: 12px; right: 12px; border-top-width: 3px; border-right-width: 3px; border-radius: 0 6px 0 0; }
.tv-frame-bl { bottom: 12px; left: 12px; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 6px; }
.tv-frame-br { bottom: 12px; right: 12px; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 6px 0; }

/* ==================== CAMERA CONTROLS ==================== */
.tv-camera-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
  padding: 8px 0;
}

.tv-btn-camera-switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 11px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

.tv-btn-camera-switch:active {
  background: #f3f4f6;
}

.tv-btn-capture {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #1f2937;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tv-capture-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tv-capture-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1f2937;
  transition: all 0.15s ease;
}

.tv-btn-capture:active .tv-capture-ring {
  border-color: #6b7280;
  transform: scale(0.95);
}

.tv-btn-capture:active .tv-capture-btn {
  background: #6b7280;
}

/* ==================== PHOTO RESULT ==================== */
.tv-photo-result {
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.tv-photo-preview-wrap {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
}

.tv-photo-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv-photo-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.tv-btn-retake {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tv-btn-retake:active {
  background: #f9fafb;
}

.tv-photo-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #22c55e;
  font-size: 12px;
  font-weight: 600;
}

/* ==================== STATUS CARDS ==================== */
.tv-verify-status-section {
  margin: 12px 0;
}

.tv-status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.tv-status-card.tv-status-pending {
  border-color: #fbbf24;
  background: #fffbeb;
}

.tv-status-card.tv-status-verified {
  border-color: #22c55e;
  background: #f0fdf4;
}

.tv-status-card.tv-status-rejected {
  border-color: #ef4444;
  background: #fef2f2;
}

.tv-status-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-status-pending .tv-status-icon {
  background: #fef3c7;
}

.tv-status-verified .tv-status-icon {
  background: #dcfce7;
}

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

.tv-status-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.tv-status-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.tv-status-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.tv-status-btn:active {
  background: #f9fafb;
}

.tv-resend-btn {
  margin-top: 8px;
}

/* ==================== OTP INPUT ==================== */
.tv-otp-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tv-otp-input {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  padding: 0 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.tv-otp-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.tv-otp-verify-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: none;
  background: #a855f7;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.tv-otp-verify-btn:active {
  background: #9333ea;
}

.tv-otp-timer {
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
}

/* ==================== ADMIN REVIEW UI ==================== */
.tv-admin-verify-section {
  margin: 16px 0;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.tv-admin-verify-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-admin-verify-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.tv-admin-photo-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.tv-admin-photo-label {
  padding: 6px 10px;
  background: #f9fafb;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.tv-admin-photo-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f4f6;
}

.tv-admin-photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv-admin-photo-img .tv-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9ca3af;
  font-size: 12px;
}

.tv-admin-verify-details {
  margin-bottom: 12px;
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
}

.tv-admin-verify-details strong {
  color: #1f2937;
}

.tv-admin-verify-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.tv-admin-verify-status.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.tv-admin-verify-status.status-approved {
  background: #dcfce7;
  color: #166534;
}

.tv-admin-verify-status.status-rejected {
  background: #fef2f2;
  color: #991b1b;
}

.tv-admin-verify-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tv-admin-btn-approve {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: #22c55e;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.tv-admin-btn-approve:active { background: #16a34a; }

.tv-admin-btn-reject {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid #ef4444;
  background: #fff;
  color: #ef4444;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}

.tv-admin-btn-reject:active { background: #fef2f2; }

.tv-admin-reject-reason {
  margin-top: 8px;
  display: none;
}

.tv-admin-reject-reason textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

.tv-admin-reject-reason textarea:focus {
  border-color: #ef4444;
}

/* ==================== VERIFIED BADGE ==================== */
.tv-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 600;
  color: #2563eb;
}

.tv-verified-badge svg {
  width: 12px;
  height: 12px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 360px) {
  .tv-camera-container {
    max-width: 260px;
  }

  .tv-camera-controls {
    gap: 16px;
  }

  .tv-capture-ring {
    width: 52px;
    height: 52px;
  }

  .tv-capture-btn {
    width: 40px;
    height: 40px;
  }

  .tv-admin-verify-photos {
    grid-template-columns: 1fr;
  }

  .tv-otp-input {
    font-size: 16px;
    letter-spacing: 4px;
  }
}

@media (min-width: 361px) and (max-width: 420px) {
  .tv-camera-container {
    max-width: 290px;
  }
}
