/**
 * Scranton Magnets Photo Uploader Stylesheet
 * Works standalone with any WordPress theme
 */

.scranton-uploader-wrapper .mono {
  font-family: "SF Mono", Monaco, "Courier New", Courier, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scranton-uploader-wrapper .sm-btn {
  display: inline-block;
  font-family: "SF Mono", Monaco, "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 24px;
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #000000 !important;
  border-radius: 0 !important;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  line-height: 1;
}

.scranton-uploader-wrapper .sm-btn:hover {
  background-color: #FFC72C !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

.scranton-uploader-wrapper .sm-btn-secondary {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
}

.scranton-uploader-wrapper .sm-btn-secondary:hover {
  background-color: #FFC72C !important;
  color: #000000 !important;
}

/* Standalone Hero Block Styles (when previewing or using any third-party WordPress theme) */
.scranton-standalone-front-wrap {
  max-width: 1040px;
  margin: 0 auto;
  color: #000000;
}

.scranton-standalone-front-wrap .product-header-block {
  border-bottom: 1px solid #000000;
  padding-bottom: 28px;
  margin-bottom: 32px;
}

.scranton-standalone-front-wrap .hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.scranton-standalone-front-wrap .hero-title-col {
  flex: 1;
  min-width: 260px;
}

.scranton-standalone-front-wrap .product-headline {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 10px 0;
  color: #DA291C;
}

.scranton-standalone-front-wrap .product-subhead {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: #000000;
  max-width: 600px;
}

.scranton-standalone-front-wrap .hero-video-box {
  width: 300px;
  flex-shrink: 0;
  border: 1px solid #000000;
  background: #000000;
}

.scranton-standalone-front-wrap .hero-video-player {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000000;
}

.scranton-standalone-front-wrap .hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 20px;
}

.scranton-standalone-front-wrap .product-price-tag {
  font-family: "SF Mono", Monaco, "Courier New", Courier, monospace;
  font-size: 28px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
}

.scranton-standalone-front-wrap .price-red {
  color: #DA291C;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.scranton-standalone-front-wrap .shipping-free-label {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-left: 12px;
}

.scranton-standalone-front-wrap .sm-btn-cta-primary {
  display: inline-block;
  font-family: "SF Mono", Monaco, "Courier New", Courier, monospace;
  padding: 14px 28px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  background-color: #FFC72C !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  border-radius: 0 !important;
  cursor: pointer;
}

@media (max-width: 768px) {
  .scranton-standalone-front-wrap .hero-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .scranton-standalone-front-wrap .hero-video-box {
    width: 100%;
    max-width: 400px;
  }
}

.scranton-uploader-wrapper {
  margin: 32px 0 48px;
  border: 1px solid #111111;
  background: #ffffff;
  padding: 24px;
}

/* Header bar */
.uploader-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid #111111;
}

.uploader-status-text {
  font-size: 13px;
}

.bold {
  font-weight: 700;
}

/* 6-Slot Grid */
.uploader-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.magnet-slot {
  border: 1px solid #111111;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.magnet-slot.ready {
  background: #ffffff;
}

.magnet-slot.dragover {
  border-color: #000000;
  background: #f0f0f0;
  outline: 2px dashed #000000;
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #111111;
  background: #ffffff;
  font-family: var(--sm-font-mono, monospace);
  font-size: 11px;
}

.slot-number {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.slot-state {
  font-size: 10px;
  padding: 1px 4px;
  background: #eee;
  color: #000000;
}

.magnet-slot.ready .slot-state {
  background: #000000;
  color: #ffffff;
}

/* Slot preview box (1:1 square) */
.slot-preview-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: #f5f5f5;
}

.slot-empty-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #000000;
  text-align: center;
  padding: 16px;
  user-select: none;
}

.slot-empty-prompt .plus-icon {
  font-size: 32px;
  line-height: 1;
  font-family: var(--sm-font-mono, monospace);
  color: #000000;
}

.slot-empty-prompt span {
  font-size: 11px;
  letter-spacing: 0.05em;
}

.slot-preview-box:hover .slot-empty-prompt {
  color: #000000;
}

.slot-image-tag {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Slot footer */
.slot-footer {
  display: flex;
  border-top: 1px solid #111111;
}

.slot-btn {
  flex: 1;
  padding: 8px 4px;
  font-family: var(--sm-font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #ffffff;
  color: #111111;
  border: none;
  border-right: 1px solid #111111;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.slot-btn:last-child {
  border-right: none;
}

.slot-btn:hover {
  background: #FFC72C;
  color: #111111;
}

/* Submission bar */
.uploader-submission-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid #111111;
}

.submission-info {
  font-size: 12px;
  color: #000000;
}

.submission-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#sm-add-to-cart-btn,
#sm-preview-confirm-btn {
  background-color: #FFC72C !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

/* Modals */
.sm-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.sm-modal-container {
  background: #ffffff;
  border: 2px solid #111111;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.preview-modal-width {
  max-width: 800px;
}

.sm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #111111;
  background: #f8f8f8;
}

.sm-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  font-family: var(--sm-font-mono, monospace);
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.sm-cropper-body {
  padding: 24px;
}

/* Cropper Viewport */
.cropper-viewport-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.cropper-viewport {
  width: 320px;
  height: 320px;
  border: 2px solid #111111;
  position: relative;
  overflow: hidden;
  background: #222222;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cropper-viewport:active {
  cursor: grabbing;
}

#cropper-target-img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  pointer-events: none;
  max-width: none;
}

.cropper-safe-guide {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 6px;
}

.guide-label {
  font-size: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 4px;
}

/* Controls Panel */
.cropper-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zoom-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zoom-btn {
  padding: 6px 12px !important;
  font-size: 16px !important;
  width: 36px;
}

#sm-zoom-range {
  flex: 1;
  accent-color: #111111;
  cursor: pointer;
  height: 6px;
}

.telemetry-box {
  background: #f4f4f4;
  border: 1px solid #000000;
  padding: 8px 12px;
  font-size: 11px;
  color: #000000;
}

.res-warning-banner {
  background: #fff8e1;
  border: 1px solid #000000;
  color: #000000;
  padding: 10px 14px;
  font-family: var(--sm-font-mono, monospace);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 6px;
}

.control-row-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  border-top: 1px solid #eeeeee;
  padding-top: 16px;
}

/* Knolled 6-magnet preview modal */
.knolled-magnets-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 32px;
  background: #eaeaea;
  border: 1px solid #111111;
}

.knolled-magnet-item {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
  border: 1px solid #cccccc;
}

.knolled-magnet-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.knolled-magnet-number {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-family: var(--sm-font-mono, monospace);
  font-size: 9px;
  padding: 1px 4px;
}

.preview-spec-caption {
  font-size: 11px;
  text-align: center;
  color: #000000;
  margin-top: 16px;
}

.sm-preview-body {
  padding: 24px;
}

.sm-modal-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #111111;
  background: #f8f8f8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .scranton-uploader-wrapper {
    padding: 16px;
  }
  .uploader-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .knolled-magnets-display {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .cropper-viewport {
    width: 260px;
    height: 260px;
  }
  .uploader-header-bar,
  .uploader-submission-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .submission-buttons {
    width: 100%;
  }
  .submission-buttons .sm-btn {
    width: 100%;
  }
}

.magnet-slot.is-loading .slot-state,
.magnet-slot.is-scanning .slot-state {
  background: #111111;
  color: #ffffff;
}

.magnet-slot.is-rejected {
  border-color: #DA291C;
  box-shadow: 0 0 0 2px #DA291C;
}

.magnet-slot.is-rejected .slot-state {
  background: #DA291C;
  color: #ffffff;
}

/* Content Safety & NSFW Rejection Banner */
.sm-content-policy-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff5f5;
  border: 2px solid #DA291C;
  color: #111111;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-family: var(--sm-font-mono, monospace);
  font-size: 12px;
  line-height: 1.5;
}

.sm-content-policy-alert strong {
  color: #DA291C;
}

.sm-policy-alert-close {
  background: transparent;
  border: 1px solid #DA291C;
  color: #DA291C;
  font-family: var(--sm-font-mono, monospace);
  font-size: 16px;
  line-height: 1;
  padding: 2px 8px;
  cursor: pointer;
}

.sm-policy-alert-close:hover {
  background: #DA291C;
  color: #ffffff;
}

.uploader-content-policy-bar {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8f8f8;
  border: 1px solid #cccccc;
  font-size: 11px;
  line-height: 1.45;
  color: #333333;
}


