/* APC components table override styles – non-destructive, only visual refinements
   Scope: single product page components table (.apc-components-form)
   Note: loaded after apc-style.css and only overrides visuals, no layout-breaking rules */

/* Container spacing and subtle section divider */
.woocommerce div.product form.cart .apc-components-form {
  /* border-bottom: 1px solid #E5E7EB; */
  padding-bottom: 16px;
  margin-bottom: 16px;
}

/* Remove heavy table borders; use row separators */
.woocommerce div.product form.cart .apc-components-form table {
  border: none !important;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Force-remove all borders coming from theme (.table, .table-bordered, etc.) */
.woocommerce div.product form.cart .apc-components-form table,
.woocommerce div.product form.cart .apc-components-form table th,
.woocommerce div.product form.cart .apc-components-form table td,
.woocommerce div.product form.cart .apc-components-form table.table-bordered,
.woocommerce div.product form.cart .apc-components-form table.table-bordered th,
.woocommerce div.product form.cart .apc-components-form table.table-bordered td{
  border: none !important;
}


.woocommerce div.product form.cart .apc-components-form thead {
  display: none; /* Design shows no header row */
}

.woocommerce div.product form.cart .apc-components-form tbody tr {
  border-bottom: 1px solid #E5E7EB;
}

.woocommerce div.product form.cart .apc-components-form tbody tr:last-child {
  border-bottom: none;
}

.woocommerce div.product form.cart .apc-components-form table th,
.woocommerce div.product form.cart .apc-components-form table td {
  padding: 14px 8px !important;
  vertical-align: middle !important;
  background: #fff !important;
}

/* First column width similar to design */
.woocommerce div.product form.cart .apc-components-form table th:first-child,
.woocommerce div.product form.cart .apc-components-form table td:first-child {
  width: 60% !important;
}

/* Align the quantity cell content to the right (stepper aligned to the right edge) */
.woocommerce div.product form.cart .apc-components-form tbody td {
  text-align: right !important;
}

/* Label row: title left, price right */
.woocommerce div.product form.cart .apc-components-form .form-control-label { margin-bottom: 8px; }
.woocommerce div.product form.cart .apc-components-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.woocommerce div.product form.cart .apc-components-form .apc-component-title {
  display: block;
  text-align: left !important;
  color: #111827;
  font-weight: 600;
}

/* Price on the right – keep Woo amount markup, just refine visuals */
.woocommerce div.product form.cart .apc-components-form .apc-component-price,
.woocommerce div.product form.cart .apc-components-form .apc-component-price bdi,
.woocommerce div.product form.cart .apc-components-form .apc-component-price .woocommerce-Price-currencySymbol {
  color: #6B7280 !important; /* grey */
  font-weight: 500;
  white-space: nowrap;
}

/* Number input styled like a pill stepper; keep native behavior */
.woocommerce div.product form.cart .apc-components-form input[type="number"] {
  width: 120px !important;
  height: 44px !important;
  border: 2px solid #E5E7EB !important;
  border-radius: 12px !important;
  text-align: center !important;
  font-weight: 500 !important;
  color: #111827 !important;
  background: #FFFFFF !important;
  box-shadow: none !important;
}

/* Remove native spin buttons for a cleaner look (keeps keyboard input) */
.woocommerce div.product form.cart .apc-components-form input[type="number"]::-webkit-outer-spin-button,
.woocommerce div.product form.cart .apc-components-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.woocommerce div.product form.cart .apc-components-form input[type="number"] {
  -moz-appearance: textfield;
}

/* Focus/active state highlighting (blue like in design) */
.woocommerce div.product form.cart .apc-components-form input[type="number"]:focus {
  outline: none !important;
  border-color: #2563EB !important; /* blue */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}




/* Custom stepper UI for quantity ( +/- buttons ) */
.woocommerce div.product form.cart .apc-components-form .apc-qty-stepper{
  display:grid; grid-template-columns:40px 1fr 40px; align-items:center;
  border:2px solid #E5E7EB; border-radius:8px; background:#fff; overflow:hidden;
  width:123px; box-sizing:border-box;
}
.woocommerce div.product form.cart .apc-components-form .apc-qty-btn{
  width:40px; height:40px; border:0; background:transparent; cursor:pointer; user-select:none; padding:0 !important;
  display:flex; align-items:center; justify-content:center; font-size:16px; line-height:1; color:#111827; text-align:center;
}
.woocommerce div.product form.cart .apc-components-form .apc-qty-dec{ grid-column:1; padding-left:0 !important; }
.woocommerce div.product form.cart .apc-components-form .apc-qty-inc{ grid-column:3; padding-right:0 !important; }
.woocommerce div.product form.cart .apc-components-form .apc-qty-btn:hover{ background:#F3F4F6; }
.woocommerce div.product form.cart .apc-components-form .apc-qty-btn:focus{ outline:none; box-shadow:inset 0 0 0 2px #2563EB33; }

/* Input inside stepper: centered cell */
.woocommerce div.product form.cart .apc-components-form .apc-qty-stepper .apc-component-input{
  grid-column:2; width:100% !important; height:40px !important; border:0 !important; border-radius:0 !important;
  text-align:center !important; padding:4px !important; box-shadow:none !important; background:transparent !important;
}

/* Focus ring when input focused */
.woocommerce div.product form.cart .apc-components-form .apc-qty-stepper:focus-within{
  border-color:#2563EB;
}



/* Align stepper to the right edge of the quantity cell */
.woocommerce div.product form.cart .apc-components-form tbody td .apc-qty-stepper{
  margin-left: auto; /* push to right */
  display: inline-grid; /* keep intrinsic width (123px) */
}

/* Remove inner padding to stick to edges: left on label(th), right on quantity(td) */
.woocommerce div.product form.cart .apc-components-form tbody th{
  padding-left: 0 !important;
}
.woocommerce div.product form.cart .apc-components-form tbody td{
  padding-right: 0 !important;
}



/* === APC total (Spolu) styling: left aligned label and amount === */
.woocommerce div.product form.cart .apc-components-form tfoot th{
  text-align:left !important; padding:0 !important; border:0 !important;
}
.woocommerce div.product form.cart .apc-components-form tfoot th:first-child{
  display:block; color:#6B7280; font-weight:500; font-size:12px; line-height:1.2; margin:0 0 4px 0; margin-top:48px;
}
/* Ensure the table is the positioning context for absolute button */
.woocommerce div.product form.cart .apc-components-form table{ position:relative; }

/* Last total cell layout + ensure it's not positioning context */
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child{
  display:flex; align-items:center; justify-content:flex-start;
  gap:16px; flex-wrap:nowrap; width:100%;
  position:static !important;
}
/* Force Add-to-cart button to the far right edge regardless of table column width */
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button{
  position:absolute; right:0; top:auto; transform:none;
  margin-left:0 !important;
}
/* Make tfoot cells full-width so the button can align to table right edge */
.woocommerce div.product form.cart .apc-components-form tfoot{ display:block; }
.woocommerce div.product form.cart .apc-components-form tfoot tr{ display:block; }
.woocommerce div.product form.cart .apc-components-form tfoot th{ display:block; width:100%; }
/* Keep 30px gap above total row */

.woocommerce div.product form.cart .apc-components-form tfoot .woocommerce-Price-amount,
.woocommerce div.product form.cart .apc-components-form tfoot .woocommerce-Price-amount bdi{
  color:#111827 !important; font-weight:700; font-size:28px; line-height:1.1;
}
.woocommerce div.product form.cart .apc-components-form tfoot .woocommerce-Price-amount{
  display:inline-block; padding-bottom:4px;
}


/* Hide section label above components table ("Kategória vstupenky" / "Ticket category") */
.woocommerce div.product form.cart .apc-components-form > .form-control-label{
  display:none !important;
}




/* === Add to Cart button styling (APC total row) === */
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button{
  /* layout */
  display:inline-flex; align-items:center; gap:8px;
  padding:16px 32px;
  /* visuals */
  background:#3B5BFF !important; color:#fff !important; border:none !important;
  border-radius:8px; box-shadow:none; text-transform:none; font-weight:600; font-family:'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size:16px; font-style:normal; line-height:24px;
  /* interaction */
  transition:background-color .15s ease, transform .05s ease;
}
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button:hover{
  background:#2841CF !important;
}
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button:active{
  transform:translateY(1px);
}
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button:focus{
  outline:2px solid #CED6FF; outline-offset:2px;
}
/* Disabled states */
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button[disabled],
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button.disabled{
  background:#B7C2FF !important; color:#fff !important; opacity:1; cursor:not-allowed;
}
/* Icon (shopping bag) on the right */
.woocommerce div.product form.cart .apc-components-form tfoot th:last-child .single_add_to_cart_button::after{
  content:""; display:inline-block; width:18px; height:18px;
  background-repeat:no-repeat; background-size:contain;
  background-image:url("https://shop.aquacity.sk/wp-content/uploads/2025/10/white-cart.svg");
}
