/* Occlusal view: the tool's page. */
#dq-occlusal-view { font-size: 15px; line-height: 1.45; }
#dq-occlusal-view h3 { font-size: 15px; margin: 0 0 6px; }
.dqov-title-version { font-size: .55em; font-weight: 400; color: #6b7280; margin-left: .3em; }
/* One box: the name, the button, the box as the drop target, the slots. */
.dqov-upload { border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px 14px; margin: 0 0 14px; background: #fff; }
.dqov-upload.over .dqov-dropzone { background: #cfe3ee; border-color: #1f5f7a; }
/* Side by side: the name in a cream box, the upload in a blue one. */
.dqov-upload-row { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 10px; margin: 0 0 10px; align-items: stretch; }
@media (max-width: 700px) { .dqov-upload-row { grid-template-columns: 1fr; } }
.dqov-namebox { display: flex; align-items: center; padding: 12px 14px; border: 1px solid #ead9b0; border-radius: 6px; background: #fff7e6; }
.dqov-patient { display: block; width: 100%; max-width: 16em; margin: 0; font-weight: 600; }
.dqov-patient input { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 0; padding: 4px 8px; font-size: 14px; font-weight: 400; }
.dqov-req { color: #b91c1c; font-weight: 400; }
.dqov-dropzone { text-align: center; padding: 18px 10px 14px; margin: 0; border: 1px solid #c7d7e0; border-radius: 6px; background: #e8f1f6; }
.dqov-pick-btn { padding: 6px 16px; font-size: 14px; cursor: pointer; display: inline-block; }
.dqov-pick-text { margin: 8px 0 0; font-size: 13px; color: #4b5563; }
@keyframes dqov-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; } }
.dqov-flash { animation: dqov-flash 1.1s ease-out infinite; }
.dqov-slot-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 8px; font-size: 13px; color: #4b5563; }
.dqov-slot-list[hidden] { display: none; }
@media (max-width: 700px) { .dqov-slot-list { grid-template-columns: 1fr; } }
.dqov-slot { margin: 0; padding: 10px 8px; border: 1px solid #c7d7e0; border-radius: 6px; background: #f4f8fa; text-align: center; }
.dqov-slot h4 { margin: 0 0 4px; font-size: 14px; color: #1f5f7a; text-align: center; }
.dqov-slot.has .dqov-drop-file { color: #111827; }
.dqov-link { background: none; border: 0; padding: 0; margin-left: 6px; font-size: 12px; color: #1f5f7a; cursor: pointer; text-decoration: underline; }
.dqov-slot-note { font-size: 12px; color: #92400e; margin: 2px 0 0; }
.dqov-upload-note { display: block; margin-top: 8px; color: #4b5563; }

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

.dqov-error { border-left: 4px solid #b91c1c; background: #fef2f2; padding: .7em 1em; margin: 0 0 12px; }
.dqov-warnings { border-left: 4px solid #d97706; background: #fffbeb; padding: .6em 1em .6em 2em; margin: 0 0 12px; }

/* The straightening buttons and the base settings, centred. */
.dqov-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 14px; }
.dqov-nudges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center; }
.dqov-btn { padding: 5px 10px; font-size: 14px; border: 1px solid #9aa6bd; background: #fff; border-radius: 4px; cursor: pointer; user-select: none; touch-action: none; }
.dqov-btn:hover { background: #eef5f8; }
.dqov-primary { background: #1f5f7a; color: #fff; border-color: #1f5f7a; padding: 8px 14px; }
.dqov-primary:hover { background: #17495e; }
.dqov-btn:disabled { opacity: .6; cursor: default; }
.dqov-adjust-readout { font-size: 13px; color: #4b5563; margin-left: 6px; }
.dqov-jaw-pick label { margin-right: 8px; }

/* Two columns: the double picture on the left, the picture set (left,
   frontal, right / mandibular, maxillary; marked previews) on the right,
   each with its download button centred below. */
/* Two columns on one grid: heading, text, preview, button and note sit on
   the same rows on both sides, so the two previews end level and the
   buttons line up. */
.dqov-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; row-gap: 8px; margin: 0 0 16px; }
.dqov-col { display: contents; }
.dqov-main > .dqov-col:not(.dqov-set) > * { grid-column: 1; }
.dqov-main > .dqov-set > * { grid-column: 2; }
.dqov-col > h3 { grid-row: 1; text-align: center; }
.dqov-col > .dqov-col-text { grid-row: 2; text-align: center; }
.dqov-col > .dqov-pair, .dqov-col > .dqov-set-frame { grid-row: 3; min-width: 0; }
.dqov-col > .dqov-download { grid-row: 4; align-self: start; }
@media (max-width: 800px) {
  .dqov-main { display: block; }
  .dqov-col { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; }
}
/* The double picture fills its frame to the set's height, centred in it. */
.dqov-pair { display: flex; min-height: 0; }
.dqov-pair .dqov-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dqov-pair .dqov-view canvas { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; object-fit: contain; }
.dqov-views { align-content: start; }
.dqov-views[hidden], .dqov-base[hidden] { display: none; }
/* Both column headings large; the occlusal view's says it is free. */
#dq-occlusal-view .dqov-col h3 { margin: 0; font-size: 24px; font-weight: 600; }
.dqov-free-badge { display: inline-block; margin-left: 8px; padding: 2px 12px; border-radius: 999px; background: #15803d; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .03em; vertical-align: middle; }
.dqov-col-text { margin: 0; font-size: 13px; color: #4b5563; }
.dqov-views { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.dqov-view { grid-column: span 2; }
.dqov-view[data-view="mandibular-occlusal"], .dqov-view[data-view="maxillary-occlusal"] { grid-column: span 3; }
.dqov-view[data-view="occlusal-pair"] { grid-column: 1 / -1; }
@media (max-width: 800px) { .dqov-main { grid-template-columns: 1fr; } }
.dqov-view { margin: 0; border: 1px solid #e5e7eb; background: #fff; }
.dqov-view canvas { width: 100%; height: auto; display: block; }
.dqov-view.free canvas { cursor: grab; touch-action: none; }
.dqov-view figcaption { display: flex; gap: 8px; align-items: center; padding: 4px 8px; font-size: 12px; color: #374151; border-top: 1px solid #e5e7eb; flex-wrap: wrap; }
.dqov-view figcaption span { font-weight: 600; margin-right: auto; }
.dqov-view.dqov-failed canvas { min-height: 60px; background: #fef2f2; }

.dqov-set-note { margin: 6px 0; font-size: 14px; color: #374151; }
.dqov-set-error { margin: 6px 0; color: #b91c1c; }
.dqov-packs { display: flex; flex-wrap: wrap; gap: 8px; }
.dqov-packs a { text-decoration: none; }
.dqov-base { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; align-items: center; }
.dqov-download { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-top: 4px; }
.dqov-download small { color: #4b5563; max-width: 440px; }
/* "Free" under the occlusal view's button: large, green, pulsing. */
.dqov-download .dqov-free-note { font-size: 20px; font-weight: 700; color: #15803d; animation: dqov-free-pulse 1.4s ease-in-out infinite; }
@keyframes dqov-free-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .dqov-download .dqov-free-note { animation: none; } }
.dqov-set-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dqov-need-name { grid-row: 5; grid-column: 1 / -1; margin: 0; text-align: center; font-size: 13px; color: #92400e; }
.dqov-confirm { border: 1px solid #d97706; background: #fffbeb; padding: 10px 12px; border-radius: 4px; max-width: 520px; text-align: left; }
.dqov-confirm p { margin: 0 0 8px; font-size: 14px; }
.dqov-set-actions .dqov-set-note { margin: 0; }
.dqov-packs { justify-content: center; }
.dqov-name { padding: 5px 8px; border: 1px solid #9aa6bd; border-radius: 4px; }

.dqov-privacy { font-size: 13px; color: #6b7280; }

/* Credits and plans, under the tool (as on Model Print). */
.dqov-plans { border: 1px solid #c7d7e0; border-radius: 10px; background: #fff; padding: 14px 18px; margin: 0 auto 16px; max-width: 900px; }
.dqov-plans[hidden] { display: none; }
#dq-occlusal-view .dqov-plans h3 { font-size: 17px; margin: 0 0 4px; }
.dqov-plans h4 { font-size: 14px; margin: 10px 0 6px; color: #1f5f7a; }
.dqov-plans p { margin: 3px 0; font-size: 14px; }
.dqov-plans .dqov-plans-note { font-size: 13px; color: #6b7280; margin-top: 8px; }
.dqov-plan-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dqov-plan-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dqov-plan { display: flex; flex-direction: column; padding: 6px 12px; border: 1px solid #1f5f7a; border-radius: 8px; background: #fff; color: #1f5f7a; text-decoration: none; font-size: 15px; }
.dqov-plan:hover { background: #e3eff5; }
.dqov-plan.sub { background: #e3eff5; }
.dqov-plan.sub:hover { background: #cfe3ee; }
.dqov-plan span { color: #23282d; font-size: 14px; }
.dqov-plan.coming, .dqov-plan.coming:hover { border-color: #c7cdd4; background: #f3f4f6; color: #6b7280; cursor: default; }
.dqov-plan.coming span { color: #6b7280; font-style: italic; }
@media (max-width: 600px) { .dqov-plan-row, .dqov-plan-row.two { grid-template-columns: 1fr; } }
