/* Screen Recorder Theme - Compatible with shared.css layout */

.zbrec-theme {
  --zbrec-primary: #0d9488;
  --zbrec-primary-strong: #0f766e;
  --zbrec-secondary: #f59e0b;
  --zbrec-text: #1d2a33;
  --zbrec-muted: #5f7280;
  --zbrec-border: rgba(29, 42, 51, 0.1);
}

.zbrec-card {
  margin-left: 14px;
  padding: 20px;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 24px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

.zbrec-card .tags {
  flex-wrap: wrap;
}

.zbrec-card .tags span {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  background: #4e5d71;
  border-radius: 4px;
  padding: 8px 12px;
}

.zbrec-intro-head {
  margin-bottom: 8px;
}

/* Support panel */
.zbrec-support-panel {
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid var(--zbrec-border) !important;
  border-radius: 16px !important;
}

.zbrec-support-panel p {
  margin: 0;
  color: var(--zbrec-muted);
  line-height: 1.7;
}

/* Notice panel (VIP/Login) */
.zbrec-notice-panel {
  margin-top: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255, 248, 232, 0.92) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
  border-radius: 16px !important;
}

.zbrec-notice-panel div {
  margin: 0;
  color: var(--zbrec-muted);
  line-height: 1.7;
}

.zbrec-notice-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: #1d2a33;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

/* Work grid customization for screencap */
.zbrec-work-grid {
  margin-top: 16px;
  gap: 16px;
}

.zbrec-work-grid-bottom {
  grid-template-columns: 1.1fr 0.9fr;
}

/* Panel styling */
.zbrec-panel {
  padding: 20px;
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid var(--zbrec-border) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(10px);
}

.zbrec-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.zbrec-panel-head h2,
.zbrec-subhead,
.zbrec-panel > h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid rgba(78, 93, 113, 0.18) !important;
  border-left: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%) !important;
  color: var(--zbrec-text) !important;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-indent: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.zbrec-timer-wrap {
  color: var(--zbrec-muted);
  font-size: 14px;
}

/* Form grid */
.zbrec-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.zbrec-field-wide {
  grid-column: 1 / -1;
}

/* Switch styling */
.zbrec-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(29, 42, 51, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.zbrec-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--zbrec-primary);
  cursor: pointer;
}

.zbrec-switch span {
  font-size: 14px;
  color: var(--zbrec-text);
}

/* Field styling */
.zbrec-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.zbrec-field span {
  font-size: 13px;
  color: var(--zbrec-muted);
}

.zbrec-field select,
.zbrec-field input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(29, 42, 51, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--zbrec-text);
  font: inherit;
  font-size: 14px;
}

.zbrec-field select:focus,
.zbrec-field input[type="text"]:focus {
  outline: none;
  border-color: var(--zbrec-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

/* Actions */
.zbrec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.zbrec-actions button,
.zbrec-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #e7edf0;
  color: var(--zbrec-text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.zbrec-actions button.primary,
.zbrec-download {
  background: linear-gradient(135deg, var(--zbrec-primary), var(--zbrec-primary-strong));
  color: #fff;
}

.zbrec-download.secondary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.zbrec-actions button:hover:not(:disabled),
.zbrec-download:hover {
  transform: translateY(-1px);
}

.zbrec-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Preview and Result stages */
.zbrec-preview-stage,
.zbrec-result-stage {
  position: relative;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(13, 148, 136, 0.18), rgba(13, 148, 136, 0) 38%),
    linear-gradient(180deg, #15232d, #0a1217);
}

.zbrec-preview-stage video,
.zbrec-result-stage video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  background: transparent;
}

.zbrec-stage-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  line-height: 1.8;
  pointer-events: none;
}

.zbrec-stage-empty[hidden] {
  display: none !important;
}

.zbrec-stage-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.54);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.zbrec-stage-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.zbrec-stage-badge.is-recording::before {
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.16);
}

.zbrec-stage-badge.is-paused::before {
  background: var(--zbrec-secondary);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
}

/* Status and meta */
.zbrec-status,
.zbrec-result-meta {
  margin: 14px 0 0;
  color: var(--zbrec-muted);
  line-height: 1.7;
  font-size: 14px;
}

/* Downloads */
.zbrec-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.zbrec-theme .zbtool-social-bar {
  margin-top: 14px !important;
}

/* Lists */
.zbrec-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
  color: var(--zbrec-text);
}

.zbrec-list.muted {
  color: var(--zbrec-muted);
}

.zbrec-subhead {
  position: relative;
  left: 12px;
  margin: 18px 0 10px !important;
  font-size: 16px;
  color: var(--zbrec-text);
}

.zbrec-panel-features .zbrec-panel-head h2 {
  position: relative;
  left: 12px;
}

/* Responsive adjustments */
@media (max-width: 980px) {
  .zbrec-work-grid,
  .zbrec-work-grid-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .zbrec-card {
    border-radius: 16px !important;
  }

  .zbrec-panel {
    padding: 16px;
    border-radius: 16px !important;
  }

  .zbrec-form-grid {
    grid-template-columns: 1fr;
  }

  .zbrec-preview-stage,
  .zbrec-result-stage,
  .zbrec-preview-stage video,
  .zbrec-result-stage video {
    min-height: 240px;
  }

  .zbrec-actions button,
  .zbrec-download {
    width: 100%;
  }

  .zbrec-notice-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}
