/* Swiss Art Gallery — public preparation palette, 17 October 2026.
   Load after the existing styles in oeuvre.php and expertise.php.
   Scoped to purchase/reservation/offer dialogs, their entry actions, checkout,
   payment instructions and room preparation. No public-gallery recoloring,
   geometry, form behaviour, hidden state or image-pixel changes. */

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) {
  --gold: #88621f;
  --gold2: #7a541c;
  --ivory: #4f473a;
  --muted: #665d4d;
  --line: #d7c7a8;
  background: rgba(214, 200, 172, .58);
  color: #4f473a;
  color-scheme: light;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) .reservation-dialog {
  background: #fffdf8;
  color: #4f473a;
  border-color: #b18a4b;
  box-shadow: 0 30px 90px rgba(83, 64, 30, .18), inset 0 0 0 1px rgba(177, 138, 75, .12);
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(h2, h3, legend, .reservation-result strong, .reservation-reference, .purchase-total .grand, .offer-price-box strong, .offer-status-card strong) {
  color: #7a541c;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(p, small, .offer-price-box span, .offer-discretion) {
  color: #665d4d;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(label, .offer-amount, .offer-status-card) {
  color: #4f473a;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-consent, .purchase-option, .purchase-total, .offer-note, .offer-price-box, .offer-status-card, .checkout-account-note, .sag-payment-choice, .sag-bank-instructions) {
  background: #f7f0e1;
  color: #4f473a;
  border-color: #d7c7a8;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-reference, .offer-discretion, .offer-public-price, .purchase-total .grand) {
  border-color: #d7c7a8;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-consent:hover, .purchase-option:hover) {
  background: #f3ead7;
  border-color: #88621f;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-consent, .purchase-option):has(input:checked) {
  background: #e7d5ad;
  color: #4f473a;
  border-color: #88621f;
  box-shadow: inset 0 0 0 1px rgba(136, 98, 31, .12);
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
  background: #fffdf8;
  color: #4f473a;
  border-color: #88621f;
  color-scheme: light;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select):focus {
  background: #fffdf8;
  color: #4f473a;
  border-color: #88621f;
  box-shadow: 0 0 0 3px rgba(136, 98, 31, .14);
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(input, textarea)::placeholder {
  color: #665d4d;
  opacity: 1;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: #88621f;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) .reservation-consent input[type="checkbox"] {
  background: #fffdf8;
  border-color: #88621f;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) .reservation-consent input[type="checkbox"]:checked {
  background: #e7d5ad;
  border-color: #88621f;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) .reservation-consent input[type="checkbox"]::before {
  border-color: #674616;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button, .payment-copy) {
  background: #fffdf8;
  color: #674616;
  border-color: #88621f;
  text-shadow: none;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button, .payment-copy):hover:not(:disabled) {
  background: #f3e6ca;
  color: #674616;
  border-color: #88621f;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-submit, .twint-button) {
  background: #e7d5ad;
  color: #674616;
  border-color: #88621f;
  text-shadow: none;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-submit, .twint-button):hover:not(:disabled) {
  background: #dfca9b;
  color: #674616;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(a, summary) {
  color: #7a541c;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button, a, input, textarea, select, summary):focus-visible {
  outline-color: #88621f;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.sag-payment-choice small, .sag-bank-instructions dt) {
  color: #665d4d;
  opacity: 1;
}

/* Semantic actions and messages retain their purpose on a light surface. */
:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(.reservation-error, .error, [data-tone="error"]) {
  color: #9a352e;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button.danger, button.reject) {
  background: #fff0ed;
  color: #9a352e;
  border-color: #9a352e;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button.danger, button.reject):hover:not(:disabled) {
  background: #f7dfda;
  color: #9a352e;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button.confirm, button.approve),
#offerDecisionOverlay #offerAcceptButton {
  background: #edf4ec;
  color: #24643d;
  border-color: #24643d;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button.confirm, button.approve):hover:not(:disabled),
#offerDecisionOverlay #offerAcceptButton:hover:not(:disabled) {
  background: #dfecdc;
  color: #24643d;
}

:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(button, input, textarea, select):disabled,
:is(#purchaseOverlay, #reservationOverlay, #offerOverlay, #offerDecisionOverlay) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select):disabled,
#offerDecisionOverlay #offerAcceptButton:disabled {
  background: #f2ecdc;
  color: #706552;
  border-color: #c3b69c;
  opacity: 1;
}

/* Access to checkout already has a light card; soften its veil and actions. */
#sag-checkout-access {
  background: #fffdf8;
  color: #4f473a;
  border-color: #b18a4b;
  color-scheme: light;
}
#sag-checkout-access::backdrop { background: rgba(214, 200, 172, .58); }
#sag-checkout-access h2 { color: #7a541c; }
#sag-checkout-access p { color: #665d4d; }
#sag-checkout-access .checkout-access-actions :is(a, button) { background: #fffdf8; color: #674616; border-color: #88621f; }
#sag-checkout-access .checkout-access-actions :is(a, button):hover:not(:disabled) { background: #f3e6ca; }
#sag-checkout-access .checkout-access-actions .checkout-access-primary { background: #e7d5ad; color: #674616; }
#sag-checkout-access .checkout-access-actions .checkout-access-primary:hover:not(:disabled) { background: #dfca9b; }
#sag-checkout-access :focus-visible { outline-color: #88621f; }
#sag-checkout-access .checkout-access-actions button:disabled { background: #f2ecdc; color: #706552; opacity: 1; }

/* The artwork itself and gallery presentation retain their original styling. */
:is(#buyArtwork, #mobileBuyArtwork, #makeOffer, #reserveArtwork, #mobileOfferArtwork) {
  background: #e7d5ad !important;
  color: #674616 !important;
  border-color: #88621f !important;
  text-shadow: none;
  box-shadow: none !important;
}
:is(#buyArtwork, #mobileBuyArtwork, #makeOffer, #reserveArtwork, #mobileOfferArtwork):hover:not(:disabled) {
  background: #dfca9b !important;
  color: #674616 !important;
  filter: none;
}
:is(#buyArtwork, #mobileBuyArtwork, #makeOffer, #reserveArtwork, #mobileOfferArtwork):focus-visible { outline-color: #88621f; filter: none; }
:is(#buyArtwork, #mobileBuyArtwork, #makeOffer, #reserveArtwork, #mobileOfferArtwork):disabled { background: #f2ecdc !important; color: #706552 !important; border-color: #c3b69c !important; opacity: 1; }

/* Room preview and interactive preparation: preserve images, canvas pixels,
   the transparency checker and all existing sizing and interaction rules. */
#room-preview.room-preview { background: linear-gradient(120deg, #fffdf8, #f3ead7); color: #4f473a; border-color: #b18a4b; }
#room-preview.room-preview::after { color: rgba(136, 98, 31, .12); }
#room-preview :is(h2, h3, h4, .eyebrow) { color: #7a541c; }
#room-preview p { color: #665d4d; }

.sag-interior:not(#sagInteriorAdmin) { --iv-gold: #7a541c; --iv-line: #d7c7a8; --iv-ink: #4f473a; background: #fffdf8; color: #4f473a; border-color: #d7c7a8; color-scheme: light; }
.sag-interior:not(#sagInteriorAdmin) :is(h3, h4, legend, .iv-eyebrow, summary, .iv-meta, .iv-buy) { color: #7a541c; }
.sag-interior:not(#sagInteriorAdmin) :is(p, label, .iv-hint, .iv-status, .iv-home-status) { color: #665d4d; }
.sag-interior:not(#sagInteriorAdmin) :is(.iv-cutout, .iv-file-label) { background: #f7f0e1; color: #4f473a; border-color: #d7c7a8; }
.sag-interior:not(#sagInteriorAdmin) :is(.iv-stage, .iv-home-stage, .iv-crop) { background-color: #ece8df; }
.sag-interior:not(#sagInteriorAdmin) .iv-stage:fullscreen { background: #ece8df; }
.sag-interior:not(#sagInteriorAdmin).iv-large .iv-stage { background: #ece8df; box-shadow: 0 0 0 30px rgba(214, 200, 172, .68); }
.sag-interior:not(#sagInteriorAdmin) :is(input:not([type="checkbox"]):not([type="range"]), select) { background: #fffdf8; color: #4f473a; border-color: #88621f; }
.sag-interior:not(#sagInteriorAdmin) input[type="checkbox"] { accent-color: #88621f; }
.sag-interior:not(#sagInteriorAdmin) button { background: #fffdf8; color: #674616; border-color: #88621f; }
.sag-interior:not(#sagInteriorAdmin) button:hover:not(:disabled) { background: #f3e6ca; }
.sag-interior:not(#sagInteriorAdmin) :is(button.iv-primary, button[aria-pressed="true"]) { background: #e7d5ad; color: #674616; border-color: #88621f; }
.sag-interior:not(#sagInteriorAdmin) :is(button.iv-primary, button[aria-pressed="true"]):hover:not(:disabled) { background: #dfca9b; }
.sag-interior:not(#sagInteriorAdmin) button:disabled { background: #f2ecdc; color: #706552; border-color: #c3b69c; opacity: 1; }
.sag-interior:not(#sagInteriorAdmin) :is(button, input, select):focus-visible { outline-color: #88621f; }
.sag-interior:not(#sagInteriorAdmin) :is(.iv-error, .iv-status.iv-error, .iv-home-status.iv-error), #room-preview .iv-error { color: #9a352e; }

/* Expertise: its panels are already light. Correct only the small gold labels
   and the white-on-gold actions found in the public audit. */
body.ex-page #expertise-content .ex-button.ex-button-gold { background: #e7d5ad; color: #674616 !important; border-color: #88621f; }
body.ex-page #expertise-content .ex-button.ex-button-gold:hover { background: #dfca9b; color: #674616 !important; }
body.ex-page #expertise-content .ex-button.ex-button-gold span { color: inherit !important; }
body.ex-page #expertise-content :is(.ex-kicker, .ex-number),
body.ex-page #expertise-content .ex-option-gold .ex-kicker,
body.ex-page #expertise-content .ex-service-grid .ex-number { color: #7a541c !important; }
body.ex-page #expertise-content .ex-button.ex-button-gold:focus-visible { outline-color: #88621f; }


/* Final live check: the room-preview label uses .section-kicker. */
#room-preview .section-kicker { color: #7a541c; }
#room-preview .cta.gold { background: #e7d5ad; color: #674616; border-color: #88621f; box-shadow: 0 10px 35px rgba(136, 98, 31, .12); }
#room-preview .cta.gold:hover { background: #dfca9b; color: #674616; }
#room-preview .cta.gold:focus-visible { outline-color: #88621f; }
