/* Project: Shrinkpictures  Version: 1.00.000 */

.sp-form fieldset { border: 1px solid #ccc; margin: 0 0 1em; padding: 0.6em 1em; }
.sp-form legend { color: #903; font-weight: 600; }
.sp-form label { display: inline-block; margin: 0.2em 0.6em 0.2em 0; }
.sp-form input[type="number"] { width: 6em; }
.sp-form optgroup { font-style: normal; }
.dropzone { border: 2px dashed #903; padding: 0.8em; text-align: center; background: #FAFAFA; }
.dropzone.over { background: #EEE; }
.sp-drop-title { font-weight: 600; margin: 0.3em 0; }
.sp-choose { display: inline-flex; align-items: center; gap: 0.5em; border: 0; border-radius: 4px; background: #903; color: #FFF; font: inherit; font-weight: 600; padding: 0.6em 1.3em; cursor: pointer; }
.sp-choose:hover { background: #7a0029; }
.sp-js .dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.dropzone:focus-within .sp-choose { outline: 2px solid #000; outline-offset: 2px; }
html:not(.sp-js) .sp-choose { background: none; color: #000; padding: 0; font-weight: normal; }
html:not(.sp-js) .sp-choose .ico { display: none; }
.sp-hero { max-width: 34em; }
.sp-eyebrow { color: #903; font-weight: 600; font-size: x-small; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.5em; }
.sp-hero h1 { font-size: xx-large; line-height: 1.15; margin: 0 0 0.4em; }
.sp-how { list-style: none; counter-reset: how; margin: 0 0 1em; padding: 0; }
.sp-how li { counter-increment: how; position: relative; padding: 0.25em 0 0.25em 2.4em; margin: 0 0 0.4em; }
.sp-how li::before { content: counter(how); position: absolute; left: 0; top: 0.1em; width: 1.6em; height: 1.6em; line-height: 1.5em; text-align: center; border: 1px solid #903; border-radius: 4px; font-size: x-small; font-weight: 600; color: #000; }
.sp-small { color: #666; font-size: x-small; border-top: 1px dotted #999; padding-top: 0.7em; }
.sp-info { max-width: 60em; margin: 0 auto; }
.sp-info .sp-cards { max-width: none; }
.sp-home { max-width: 60em; margin: 0 auto; }
.sp-formcol { min-width: 0; }
.sp-textbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: #903; cursor: pointer; text-decoration: underline; }
.sp-recipe { border: 1px solid #ccc; border-radius: 6px; background: #FFF; padding: 0.6em 0.9em; margin: 0.6em 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3em 0.7em; }
.sp-recipe span { color: #666; font-size: x-small; }
.sp-recipe strong { flex: 1 1 12em; }
.sp-recipe .sp-textbtn { text-decoration: none; }
.sp-sample { text-align: center; margin: 0.8em 0; }
.sp-btn2 { display: inline-flex; align-items: center; gap: 0.4em; border: 1px solid #999; border-radius: 6px; background: #FFF; color: #000; font: inherit; font-weight: 600; padding: 0.45em 0.9em; cursor: pointer; }
.sp-btn2:hover { border-color: #903; color: #903; }
.sp-btn2[aria-pressed="true"] { background: #903; border-color: #903; color: #FFF; }
/* Picture view, option panel */
.sp-stage { background: #EEE; border: 1px solid #ddd; border-radius: 8px; padding: 1em; display: flex; align-items: center; justify-content: center; min-height: 18em; }
.sp-stage[data-show="result"] .sp-preview-wrap, .sp-stage[data-show="original"] .sp-result { display: none; }
.sp-preview-wrap { width: 100%; max-width: 100%; }
.sp-preview-wrap img { display: block; max-width: 100%; max-height: max(14em, calc(100vh - 21em)); margin: 0 auto; }
.sp-result { text-align: center; max-width: 100%; }
.sp-result canvas { max-width: 100%; max-height: max(14em, calc(100vh - 21em)); width: auto; height: auto; background: #EEE; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.sp-empty { text-align: center; color: #666; }
.sp-viewbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5em 1em; margin: 0.7em 0 0.3em; }
.sp-fileinfo { display: inline-flex; align-items: center; gap: 0.5em; min-width: 0; font-size: x-small; color: #666; }
.sp-fileinfo strong { color: #000; font-size: small; overflow-wrap: anywhere; }
.sp-viewbtns { display: inline-flex; gap: 0.5em; }
.sp-crop-active [data-sp="crop-numbers"], .sp-crop-active [data-sp="crop-help"] { display: none; }
.sp-panel .sp-tabs { display: flex; gap: 0.2em; margin: 0 0 0.6em; }
.sp-tabs a { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25em; min-height: 3.6em; padding: 0.4em 0.2em; border-radius: 8px; color: #666; font-size: x-small; font-weight: 600; }
.sp-tabs a:hover, .sp-tabs a:focus { color: #000; background: #F3F3F3; }
.sp-tabs a.sp-on { color: #903; background: #F8EDF1; }
.sp-tabs .dot { position: absolute; top: 0.45em; right: calc(50% - 1.6em); width: 7px; height: 7px; border-radius: 50%; background: #903; }
.sp-started { display: flex; align-items: center; gap: 0.5em; color: #666; font-size: x-small; margin: 0 0 0.6em; padding: 0.5em 0.8em; background: #F6F6F6; border-radius: 6px; }
.sp-started .ico { color: #903; }
.sp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5em; margin: 0 0 0.8em; }
.sp-tile { display: block; text-align: left; border: 1px solid #ccc; border-radius: 6px; background: #FFF; color: #000; font: inherit; padding: 0.5em 0.7em; cursor: pointer; }
.sp-tile strong { display: block; }
.sp-tile span { display: block; color: #666; font-size: x-small; }
.sp-tile:last-child { grid-column: 1 / -1; }
.sp-two { margin: 0 0 0.6em; }
.sp-two select { margin-top: 0.1em; }
.sp-social-on .sp-social-native { display: none !important; }
.sp-tile:hover { border-color: #903; }
.sp-tile.sp-on { border-color: #903; background: #F8EDF1; box-shadow: inset 0 0 0 1px #903; }
.sp-tile.sp-on strong { color: #903; }
.sp-estimate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2em 0.6em; margin: 0 0 0.6em; }
.sp-estimate s { color: #666; font-size: x-small; }
.sp-estimate strong { font-size: x-large; }
.sp-saving { margin-left: auto; color: #903; font-weight: 600; font-size: x-small; }
.sp-gonote { text-align: center; color: #666; }
.sp-form [data-sp="status"].ok { font-size: 1.1em; font-weight: 600; line-height: 1.35; }
/* Plain form: the tab links are jump links, the preview side is empty, so both are left out of the way */
.sp-work { display: block; }
html:not(.sp-js) .sp-view { display: none; }
html:not(.sp-js) .sp-tabs { flex-wrap: wrap; }
/* With the script: chooser first, then picture view and tabbed panel */
.sp-picking .sp-work { display: none; }
.sp-editing .sp-pick { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.sp-editing .sp-hero, .sp-editing .sp-info { display: none; }
.sp-editing, .sp-editing.sp-home { max-width: none; }
.sp-editing .sp-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20em, 26em); gap: 1.2em; align-items: start; }
.sp-editing .sp-view { position: sticky; top: 0.6em; }
.sp-editing .sp-panel { border: 1px solid #ccc; border-radius: 8px; background: #FFF; padding: 0.6em 0.8em 1em; }
.sp-picking.sp-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "hero form" "info info"; gap: 2em 3em; align-items: center; max-width: 66em; padding-top: 2em; }
.sp-picking .sp-hero { grid-area: hero; justify-self: end; }
.sp-picking .sp-formcol { grid-area: form; }
.sp-picking .sp-info { grid-area: info; max-width: none; }
.sp-picking .dropzone { padding: 2.5em 1em; border-radius: 8px; }
.sp-picking .sp-pick { border: 0; padding: 0; margin: 0; }
.sp-picking .sp-pick legend, .sp-tabs-on .sp-num { display: none; }
.sp-tabs-on .sp-tabpanel { display: none; border: 0; margin: 0; padding: 0.4em 0.4em 0.2em; }
.sp-tabs-on .sp-tabpanel.sp-on { display: block; }
.sp-tabs-on .sp-tabpanel legend { padding: 0; font-size: medium; }
.sp-tiles-on .sp-moderow, .sp-tiles-on [data-sp-group="preset"] { display: none; }
.sp-foot { border-top: 1px solid #ddd; margin-top: 0.8em; padding-top: 0.8em; }
.sp-form .sp-panel label { display: block; margin: 0.5em 0 0.2em; }
.sp-form .sp-panel label:has(input[type="checkbox"]), .sp-form .sp-panel label:has(input[type="radio"]) { display: flex; align-items: flex-start; gap: 0.5em; }
.sp-panel select { width: 100%; max-width: 100%; }
.sp-panel .sp-crop-numbers label, .sp-panel [data-sp="crop-numbers"] label { display: inline-block; }
/* Offer to re-use last time's settings */
.sp-reuse { border: 1px solid #903; background: #FAFAFA; padding: 0.4em 1em; margin: 0 0 1em; }
.sp-btn { display: inline-block; border: 1px solid #903; padding: 0.3em 0.9em; margin-right: 0.5em; color: #903; background: #FFF; }
.sp-btn:first-child { background: #903; color: #FFF; }
/* Sliders (added by the page script) */
.sp-slider { display: inline-flex; align-items: flex-start; gap: 0.5em; vertical-align: top; min-width: 10em; }
.sp-track { position: relative; display: inline-block; padding-top: 0.9em; }
.sp-track .sp-range { display: block; margin: 0; }
.sp-marks { position: absolute; left: 0; right: 0; top: 0; height: 0.8em; pointer-events: none; }
.sp-mark { position: absolute; top: 0; left: calc(8px + (100% - 16px) * var(--at)); transform: translateX(-50%); width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 6px solid #666; }
.sp-zero { border-left-width: 5px; border-right-width: 5px; border-top: 8px solid #903; }
.sp-slider output { margin-top: 0.1em; font-size: x-small; color: #666; min-width: 8em; }
.sp-range { width: 12em; max-width: 100%; accent-color: #903; }
.sp-panel .sp-slider { display: flex; flex-direction: column; gap: 0; width: 100%; }
.sp-panel .sp-track { display: block; width: 100%; }
.sp-panel .sp-range { width: 100%; }
.sp-panel .sp-slider output { min-width: 0; }
.sp-covered { display: none; }
/* Tablets and phones: one column, picture on top and kept in view while the options are changed */
@media (max-width: 760px) {
  .sp-picking.sp-home { display: block; padding-top: 0.5em; }
  .sp-picking .sp-hero { max-width: none; margin-bottom: 1.2em; }
  .sp-hero h1 { font-size: x-large; }
  .sp-editing .sp-work { display: block; }
  .sp-editing .sp-view { position: sticky; top: 0; z-index: 3; background: #FFF; padding: 0.3em 0 0.1em; margin-bottom: 0.6em; }
  .sp-editing .sp-stage { min-height: 8em; padding: 0.4em; }
  .sp-editing .sp-result canvas { max-height: 32vh; }
  .sp-editing .sp-viewbar { margin: 0.4em 0 0; }
  .sp-editing .sp-fileinfo { flex: 1 1 100%; }
  [data-sp="result-note"] { display: none; }
  .sp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-form select, .sp-form input[type="number"] { font-size: 16px; }
  .sp-foot { position: sticky; bottom: 0; background: #FFF; padding-bottom: 0.5em; }
  .cga { float: none; max-width: 100%; margin-left: 0; }
  #social { float: none; }
  .adv, .f { margin-left: 0; margin-right: 0; }
}
/* Rotate and flip icon buttons */
.sp-turn { display: flex; flex-wrap: wrap; gap: 0.6em; align-items: stretch; }
.sp-turn[hidden] { display: none; }
.sp-icobtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3em; min-width: 5.2em; border: 1px solid #999; border-radius: 8px; background: #FFF; color: #000; font: inherit; font-size: x-small; font-weight: 600; padding: 0.7em 0.8em; cursor: pointer; }
.sp-icobtn:hover { border-color: #903; color: #903; }
.sp-icobtn[aria-pressed="true"] { background: #903; border-color: #903; color: #FFF; }
.sp-icobtn .ico { stroke: currentColor; fill: none; stroke-width: 1.8; }
.sp-turnstate { flex: 1 1 100%; margin: 0.2em 0 0; color: #333; }
/* Headings in the home page text */
.sp-info h2 { font-size: 1.3em; text-align: left; margin: 1.6em 0 0.4em; }
.sp-info h3 { margin: 1.2em 0 0.3em; }
/* Drop-down lists in the option panel: one look for the size, social, shape, format and quality choices */
.sp-panel select { appearance: none; -webkit-appearance: none; display: block; width: 100%; box-sizing: border-box; font: inherit; font-weight: 600; color: #222; background: #FFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23990033' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.8em center / 1em; border: 1px solid #bbb; border-radius: 8px; padding: 0.65em 2.6em 0.65em 0.9em; line-height: 1.3; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); transition: border-color 0.15s, box-shadow 0.15s; }
.sp-panel select:hover:not(:disabled) { border-color: #903; }
.sp-panel select:focus-visible { outline: none; border-color: #903; box-shadow: 0 0 0 3px rgba(153, 0, 51, 0.2); }
.sp-panel select:disabled { color: #888; background-color: #F4F4F4; cursor: not-allowed; box-shadow: none; }
.sp-panel select option, .sp-panel select optgroup { font-weight: 400; color: #000; }
.sp-panel select optgroup { font-weight: 700; }
.sp-two { display: block; margin: 0 0 0.9em; }
.sp-two label { display: block; margin: 0 0 0.3em; font-size: small; font-weight: 700; color: #903; text-transform: uppercase; letter-spacing: 0.04em; }
.sp-two[hidden] { display: none; }
