/*
Theme Name: ToqueCerto Checkout
Description: Minimal brand theme for the headless WooCommerce backend. Customers only see the hosted checkout, order confirmation and lost-password pages — this theme makes those match the Next.js storefront design (cream/ink/rose palette, Elms Sans + Playfair Display).
Version: 1.0.2
Author: ToqueCerto
License: GPL-2.0-or-later
Text Domain: toquecerto-checkout
*/

:root {
  --tc-ink: #352522;
  --tc-muted: #756862;
  --tc-rose: #dc5b61;
  --tc-rose-dark: #bb4048;
  --tc-blush: #f8e9e6;
  --tc-cream: #fffaf6;
  --tc-linen: #f5eee8;
  --tc-edge: #eadbd4;
  --tc-shadow: 0 20px 60px rgba(92, 54, 45, 0.11);
  --tc-font-sans: "Elms Sans", -apple-system, "Segoe UI", sans-serif;
  --tc-font-serif: "Playfair Display", Georgia, serif;
}

/* ----- Base ----- */

body {
  margin: 0;
  background: var(--tc-cream);
  color: var(--tc-ink);
  font-family: var(--tc-font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--tc-rose-dark);
}

.tc-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 96px;
}

/* ----- Brand header / footer ----- */

.tc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 20px;
  border-bottom: 1px solid var(--tc-edge);
  background: var(--tc-cream);
}

.tc-header img,
.tc-header .custom-logo {
  height: 44px;
  width: auto;
}

.tc-header a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--tc-ink);
  font-family: var(--tc-font-serif);
  font-size: 26px;
  font-weight: 700;
}

.tc-footer {
  border-top: 1px solid var(--tc-edge);
  padding: 28px 20px 40px;
  text-align: center;
  color: var(--tc-muted);
  font-size: 14px;
}

.tc-footer a {
  color: var(--tc-muted);
}

/* ----- Page headings ----- */

.tc-page h1,
.wp-block-post-title {
  font-family: var(--tc-font-serif);
  font-weight: 700;
  color: var(--tc-ink);
}

/* ----- Checkout block: typography & layout ----- */

.wc-block-checkout,
.wc-block-components-form,
.wc-block-components-sidebar {
  font-family: var(--tc-font-sans);
  color: var(--tc-ink);
}

.wc-block-components-title,
.wc-block-components-checkout-step__title {
  font-family: var(--tc-font-sans);
  font-weight: 800;
  color: var(--tc-ink);
}

.wc-block-components-checkout-step__description,
.wc-block-components-product-metadata__description,
.wc-block-components-product-details {
  color: var(--tc-muted);
}

/* ----- Inputs ----- */

.wc-block-components-text-input input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-textarea,
.wc-block-components-form .wc-block-components-text-input input[type="text"],
.wc-block-components-form .wc-block-components-text-input input[type="email"],
.wc-block-components-form .wc-block-components-text-input input[type="tel"] {
  background: #fff;
  border: 1px solid var(--tc-edge);
  border-radius: 7px;
  color: var(--tc-ink);
  font-family: var(--tc-font-sans);
}

.wc-block-components-text-input input:focus,
.wc-block-components-combobox .components-combobox-control__input:focus,
.wc-block-components-textarea:focus {
  border-color: var(--tc-rose);
  box-shadow: 0 0 0 1px var(--tc-rose);
  outline: none;
}

.wc-block-components-text-input label,
.wc-block-components-combobox .components-base-control__label {
  color: var(--tc-muted);
}

.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
  background: var(--tc-rose);
  border-color: var(--tc-rose);
}

/* ----- Buttons ----- */

.wc-block-components-button:not(.is-link),
.wc-block-components-checkout-place-order-button,
button.wp-element-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  background: var(--tc-rose);
  border: 1px solid var(--tc-rose);
  border-radius: 7px;
  color: #fff;
  font-family: var(--tc-font-sans);
  font-weight: 800;
  text-transform: none;
  box-shadow: none;
}

.wc-block-components-button:not(.is-link):hover,
.wc-block-components-checkout-place-order-button:hover,
button.wp-element-button:hover,
.wp-block-button__link:hover {
  background: var(--tc-rose-dark);
  border-color: var(--tc-rose-dark);
  color: #fff;
}

.wc-block-components-button:not(.is-link):disabled {
  opacity: 0.55;
}

/* ----- Order summary sidebar ----- */

.wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-components-sidebar .wc-block-components-totals-wrapper,
.wc-block-components-sidebar .wc-block-components-panel {
  background: transparent;
}

.wc-block-components-sidebar {
  background: #fff;
  border: 1px solid var(--tc-edge);
  border-radius: 16px;
  box-shadow: var(--tc-shadow);
  padding: 24px;
}

/* The sidebar is already a card — strip the summary block's own inner box. */
.wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-components-sidebar .wc-block-components-totals-wrapper:first-child,
.is-large.wc-block-checkout .wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-block {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Hide the product short-description line in the order summary. */
.wc-block-components-order-summary-item__description,
.wc-block-components-order-summary-item__description p {
  display: none;
}

/* Quantity badge in the accent colour (override WooCommerce defaults). */
.wc-block-components-order-summary-item__quantity {
  background: var(--tc-rose) !important;
  border-color: var(--tc-rose) !important;
  color: #fff !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
  font-weight: 800;
  color: var(--tc-ink);
}

/* ----- Payment options ----- */

.wc-block-components-radio-control__option {
  border-color: var(--tc-edge);
}

.wc-block-components-radio-control__input:checked {
  border-color: var(--tc-rose);
  background: radial-gradient(var(--tc-rose) 0 6px, transparent 7px);
}

.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  box-shadow: inset 0 0 0 2px var(--tc-rose);
  border-radius: 7px;
}

/* ----- Classic checkout / order received fallback ----- */

.woocommerce-order,
.woocommerce-customer-details,
.woocommerce-order-details {
  font-family: var(--tc-font-sans);
}

.woocommerce-order-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 18px 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--tc-edge);
  border-radius: 16px;
}

.woocommerce table.shop_table {
  border: 1px solid var(--tc-edge);
  border-radius: 12px;
  border-collapse: separate;
  background: #fff;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: var(--tc-edge);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  background: #fff;
  border: 1px solid var(--tc-edge);
  border-radius: 7px;
  padding: 12px 14px;
  font-family: var(--tc-font-sans);
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--tc-rose);
  border-radius: 7px;
  color: #fff;
  font-weight: 800;
  font-family: var(--tc-font-sans);
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--tc-rose-dark);
  color: #fff;
}

.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--tc-rose);
  background: var(--tc-blush);
  color: var(--tc-ink);
}

/* Hide the WP "coming soon"/admin footer clutter for a clean checkout */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
