/*
Theme Name: Bw Craftxtore Child
Theme URI: https://bw-craftxtore.bzotech.com/intro/
Author: BZOTech
Author URI: https://bzotech.com/
Description: CraftXtore WooCommerce theme lets you create a fantastic, magnificent web presentation for your pottery studio, handcrafted workshops, or alluring new craft goods store.
Version: 1.7
Template: bw-craftxtore
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bw-craftxtore
*/

/* Container */
.warranty-ui { max-width: 980px; margin: 0 auto; padding: 8px 12px; }

/* Grid rows */
.w-row { display: grid; gap: 18px 24px; align-items: start; }
.w-row.w-3 { grid-template-columns: repeat(3, 1fr); }
.w-row.w-2-1 { grid-template-columns: 1fr 2fr; }
.w-row.w-submit { display: flex; justify-content: center; }

/* Labels & inputs */
.warranty-ui label { display: block; font-weight: 600; margin: 0 0 .45rem; text-align: left; }
.warranty-ui input[type="text"],
.warranty-ui input[type="email"],
.warranty-ui input[type="tel"],
.warranty-ui input[type="date"],
.warranty-ui select,
.warranty-ui textarea {
  width: 100%;
  height: 44px;
  line-height: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.warranty-ui input:focus,
.warranty-ui select:focus {
  outline: none;
  border-color: #6ab7c8;
  box-shadow: 0 0 0 3px rgba(106,183,200,.2);
}

/* ---- Serial numbers (normalize CF7 <p> wrapper) ---- */
#serial-numbers-container { display: flex; flex-direction: column; gap: 10px; }

/* Always a 2-column grid: [input | button] */
.warranty-ui .serial-number-field{
  display: grid !important;
  grid-template-columns: 1fr 44px;
  column-gap: 0;
  align-items: center;
  width: 100%;
}

/* CF7 wraps controls in <p>; flatten it so children become grid items */
.warranty-ui .serial-number-field > p{ display: contents; margin: 0 !important; }
.warranty-ui .serial-number-field > p > br{ display: none; }

/* Input merges with button edge */
.warranty-ui .serial-number-field input[name="serial_number[]"]{
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* + / − button (same look, same size) */
.warranty-ui .serial-number-field #add-serial-btn,
.warranty-ui .serial-number-field .serial-btn,
.warranty-ui .serial-number-field .remove-serial-btn{
  box-sizing: border-box;
  height: 44px;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd8dc;
  border-left: 0;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: #e9f6f8;
}
.warranty-ui .serial-number-field .remove-serial-btn{ background: #fdeaea; }

/* ---- Last row vertical alignment (Use / Date / Serial) ---- */
.warranty-ui .w-row:has(#serial-numbers-container) .w-col{
  display: flex;              /* each column is a flex column */
  flex-direction: column;
}
.warranty-ui .w-row:has(#serial-numbers-container) .w-col > label{
  min-height: 40px;           /* equal label height so inputs align */
  display: flex;
  align-items: flex-end;
  margin-bottom: 8px;
}

/* Submit button */
.warranty-ui .elbzotech-bt-default{
  max-width: 280px; height: 48px; border-radius: 10px; font-weight: 600;
  background: #a8d2d3; border: none; color: #222;
  transition: background .2s, transform .05s;
}
.warranty-ui .elbzotech-bt-default:hover{ background: #96c4c5; }
.warranty-ui .elbzotech-bt-default:active{ transform: scale(.98); }

/* CF7 error tips */
.warranty-ui .wpcf7-not-valid-tip{
  margin-top: 6px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  color: #d93025 !important;
}

/* Responsive */
@media (max-width: 900px){
  .w-row{ grid-template-columns: 1fr !important; }
}
