/* Photo Prep: the tool's page (the family look of the Occlusal view). */
#dq-photo-prep { font-size: 15px; line-height: 1.45; }
#dq-photo-prep h3 { font-size: 24px; margin: 0 0 6px; text-align: center; }
#dq-photo-prep h4 { font-size: 14px; margin: 0 0 4px; color: #1f5f7a; text-align: center; }
.dqpp-title-version { font-size: .5em; font-weight: 400; color: #6b7280; margin-left: .3em; }
.dqpp-privacy { text-align: center; font-size: 13px; color: #4b5563; }
.dqpp-centre { text-align: center; }
[hidden] { display: none !important; }

.dqpp-btn { padding: 5px 12px; font-size: 14px; border: 1px solid #9aa6bd; background: #fff; border-radius: 4px; cursor: pointer; }
.dqpp-btn:hover { background: #eef5f8; }
.dqpp-btn:focus-visible, .dqpp-tile:focus-visible, .dqpp-thumb:focus-visible { outline: 3px solid #2d8fb3; outline-offset: 2px; }
.dqpp-primary { background: #1f5f7a; color: #fff; border-color: #1f5f7a; padding: 8px 16px; }
.dqpp-primary:hover { background: #17495e; }
.dqpp-btn:disabled { opacity: .55; cursor: default; }

/* Upload */
.dqpp-upload { margin: 0 0 14px; }
.dqpp-dropzone { text-align: center; padding: 22px 12px 16px; border: 1px dashed #8fb3c4; border-radius: 6px; background: #e8f1f6; }
.dqpp-dropzone.over { background: #cfe3ee; border-color: #1f5f7a; }
.dqpp-drop-text { margin: 8px 0 0; font-size: 13px; color: #4b5563; }
.dqpp-refusal { border-left: 4px solid #b91c1c; background: #fef2f2; padding: .6em 1em; margin: 10px 0 0; }

.dqpp-progress { margin: 0 0 12px; }
.dqpp-bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.dqpp-bar span { display: block; height: 100%; width: 0; background: #1f5f7a; transition: width .2s; }
.dqpp-progress-text { margin: 4px 0 0; font-size: 13px; color: #4b5563; text-align: center; }

/* Slot screen */
.dqpp-slots { border: 1px solid #ead9b0; background: #fffbeb; border-radius: 6px; padding: 12px 14px; margin: 0 0 16px; }
.dqpp-slots-why { color: #92400e; text-align: center; margin: 0 0 4px; }
.dqpp-slots-help { text-align: center; font-size: 13px; color: #4b5563; margin: 0 0 10px; }
.dqpp-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 12px; }
.dqpp-cell { border: 1px solid #c7d7e0; border-radius: 6px; background: #f4f8fa; padding: 8px; min-height: 120px; text-align: center; }
.dqpp-unused { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 60px; margin: 0 0 12px; }
.dqpp-optional { font-weight: 400; color: #6b7280; }
.dqpp-empty { color: #9ca3af; font-size: 13px; margin: 24px 0 0; }
.dqpp-thumb { border: 2px solid transparent; background: #fff; padding: 2px; border-radius: 4px; cursor: grab; }
.dqpp-thumb canvas { display: block; max-width: 100%; height: auto; }
.dqpp-thumb.picked { border-color: #1f5f7a; box-shadow: 0 0 0 3px rgba(31, 95, 122, .25); }

/* Name and form */
.dqpp-namerow { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 12px; margin: 0 0 16px; align-items: start; }
@media (max-width: 700px) { .dqpp-namerow { grid-template-columns: 1fr; } }
.dqpp-namebox { padding: 12px 14px; border: 1px solid #ead9b0; border-radius: 6px; background: #fff7e6; }
.dqpp-namebox label { display: block; font-weight: 600; }
.dqpp-name { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 0; padding: 6px 8px; font-size: 16px; font-weight: 400; }
.dqpp-req { color: #b91c1c; font-weight: 400; }
.dqpp-name-help { font-size: 12px; color: #6b7280; margin: 6px 0 0; }
.dqpp-name-continue { margin-top: 10px; min-width: 9em; }
/* Continue pulses once a name is typed (the family's flash). */
@keyframes dqpp-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 95, 122, .7); background: #1f5f7a; } 50% { box-shadow: 0 0 0 10px rgba(31, 95, 122, 0); background: #2d8fb3; } }
.dqpp-flash { animation: dqpp-flash 1.1s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .dqpp-flash { animation: none; } }
/* A Check badge pulses until its picture is opened and saved. */
@keyframes dqpp-check-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .7); } 50% { box-shadow: 0 0 0 7px rgba(217, 119, 6, 0); } }
.dqpp-check.dqpp-flash { animation: dqpp-check-flash 1.1s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .dqpp-check.dqpp-flash { animation: none; } }
.dqpp-patient-line { text-align: center; font-size: 15px; margin: 0 0 8px; }
.dqpp-link { background: none; border: 0; padding: 0; font: inherit; color: #1f5f7a; text-decoration: underline; cursor: pointer; }
.dqpp-form { border: 1px solid #c7d7e0; border-radius: 6px; padding: 8px; background: #fff; }
.dqpp-form-canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; border-radius: 4px; }
.dqpp-form-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 6px 0 0; }
.dqpp-form-note { font-size: 12px; color: #6b7280; }

/* Review grid */
.dqpp-review-help { text-align: center; font-size: 13px; color: #4b5563; margin: 0 0 10px; }
/* Rows: four faces; four bites (right, front, open, left); the two occlusals centred under the bites. */
.dqpp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.dqpp-tile[data-slot="occlusal-upper"] { grid-column: 2; }
.dqpp-tile[data-slot="occlusal-lower"] { grid-column: 3; }
@media (max-width: 480px) {
  .dqpp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dqpp-tile[data-slot="occlusal-upper"] { grid-column: 1; }
  .dqpp-tile[data-slot="occlusal-lower"] { grid-column: 2; }
}
.dqpp-tile.dqpp-empty-place { cursor: default; background: #f9fafb; border-style: dashed; }
.dqpp-not-provided { color: #6b7280; font-size: 14px; }
.dqpp-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; }
.dqpp-tile:hover { border-color: #1f5f7a; }
.dqpp-tile.edited { border-color: #1f5f7a; }
.dqpp-tile-pic { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.dqpp-tile canvas { display: block; max-width: 100%; height: auto; }
.dqpp-tile-label { font-size: 13px; color: #1f2937; }
.dqpp-check, .dqpp-check-sample { background: #fde68a; color: #92400e; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.dqpp-check { position: absolute; top: 6px; right: 6px; }
.dqpp-download-note { font-size: 13px; color: #92400e; }

/* Editor */
.dqpp-editor { position: fixed; inset: 0; z-index: 99999; background: rgba(17, 24, 39, .6); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 16px; }
.dqpp-editor-box { background: #fff; border-radius: 8px; padding: 14px 16px; max-width: 820px; width: 100%; box-sizing: border-box; font-size: 14px; }
.dqpp-editor-title { font-size: 20px; margin: 0 0 8px; text-align: center; }
.dqpp-stage { position: relative; margin: 0 auto 10px; width: max-content; max-width: 100%; }
.dqpp-view { display: block; max-width: 100%; height: auto; cursor: crosshair; }
.dqpp-frame { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 2px solid #1f5f7a; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); cursor: move; touch-action: none; }
.dqpp-frame:focus-visible { outline: 3px solid #2d8fb3; }
.dqpp-stage { overflow: hidden; }
.dqpp-handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #1f5f7a; border-radius: 3px; box-sizing: border-box; }
.dqpp-handle[data-h="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.dqpp-handle[data-h="n"] { left: calc(50% - 7px); top: -8px; cursor: ns-resize; }
.dqpp-handle[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.dqpp-handle[data-h="e"] { right: -8px; top: calc(50% - 7px); cursor: ew-resize; }
.dqpp-handle[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.dqpp-handle[data-h="s"] { left: calc(50% - 7px); bottom: -8px; cursor: ns-resize; }
.dqpp-handle[data-h="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.dqpp-handle[data-h="w"] { left: -8px; top: calc(50% - 7px); cursor: ew-resize; }
.dqpp-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #f59e0b; border: 2px solid #fff; pointer-events: none; }
.dqpp-editor-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 0 0 6px; }
.dqpp-tilt { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.dqpp-tilt-range { width: 160px; }
.dqpp-tilt-read { min-width: 3.5em; font-weight: 400; color: #4b5563; }
.dqpp-editor-hint { text-align: center; color: #92400e; min-height: 1.2em; margin: 0 0 6px; font-size: 13px; }
.dqpp-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dqpp-spacer { flex: 1; }

/* The beta and the fees (above the tool), and the packs offered without a credit. */
.dqpp-beta { display: inline-block; vertical-align: middle; margin-left: .35em; padding: 1px 8px; border-radius: 10px; background: #fde68a; color: #92400e; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.dqpp-fee { text-align: center; margin: 0 0 14px; color: #374151; }
.dqpp-buy { max-width: 36em; margin: 0 auto 14px; padding: 10px 14px; border-left: 4px solid #d97706; background: #fffbeb; }
.dqpp-buy p { margin: .4em 0; }
.dqpp-buy ul { margin: .2em 0 .6em 1.2em; }
