/* ============================================
   Dakzhou Theme - Forms
   表单、输入框、选择器样式
   ============================================ */

/* ===== 基础输入框 ===== */
input, select, textarea{
  font-family:inherit;
  font-size:.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select{
  width:100%;
  padding:12px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:#fff;
  color:var(--ink);
  font-size:.95rem;
  transition:border-color .2s, box-shadow .2s;
  box-sizing:border-box;
}

/* ===== 输入框Focus效果 ===== */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:var(--emerald);
  box-shadow:0 0 0 3px rgba(4,120,87,.12);
}

/* ===== 文本域 ===== */
textarea{
  resize:vertical;
  min-height:120px;
  line-height:1.6;
}

/* ===== 下拉选择器 ===== */
select{
  cursor:pointer;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  padding-right:36px;
}

/* ===== 数量选择器 ===== */
.qty-selector{
  display:flex;
  align-items:center;
  border:1.5px solid var(--border);
  border-radius:6px;
  overflow:hidden;
}
.qty-selector button{
  width:36px;
  height:36px;
  border:none;
  background:var(--bg-soft);
  cursor:pointer;
  font-size:1.1rem;
  color:var(--ink-2);
  transition:background .2s;
  display:flex;
  align-items:center;
  justify-content:center;
}
.qty-selector button:hover{background:var(--border);}
.qty-selector input{
  width:50px;
  text-align:center;
  border:none;
  border-left:1px solid var(--border);
  border-right:1px solid var(--border);
  border-radius:0;
  padding:8px 0;
  font-weight:600;
}
.qty-selector input:focus{
  box-shadow:none;
  border-color:var(--border);
}

/* ===== WooCommerce 表单 ===== */
.woocommerce form .form-row{
  margin-bottom:16px;
}
.woocommerce form .form-row label{
  display:block;
  font-size:.88rem;
  font-weight:600;
  color:var(--ink-2);
  margin-bottom:6px;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea{
  width:100%;
  padding:12px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  font-size:.95rem;
  box-sizing:border-box;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus{
  outline:none;
  border-color:var(--emerald);
  box-shadow:0 0 0 3px rgba(4,120,87,.12);
}

/* ===== 复选框 ===== */
.woocommerce-form__label-for-checkbox{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:.88rem;
  color:var(--ink-2);
  cursor:pointer;
}
.woocommerce-form__label-for-checkbox input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:var(--emerald);
  cursor:pointer;
}

/* ===== 忘记密码链接 ===== */
.woocommerce-LostPassword{
  display:block;
  text-align:center;
  margin-top:12px;
  font-size:.85rem;
}
.woocommerce-LostPassword a{
  color:var(--emerald);
  text-decoration:none;
}
.woocommerce-LostPassword a:hover{
  text-decoration:underline;
}

/* ===== Contact Form 7 ===== */
.wpcf7-form{
  max-width:600px;
}
.wpcf7-form p{
  margin-bottom:16px;
}
.wpcf7-form label{
  display:block;
  font-size:.88rem;
  font-weight:600;
  color:var(--ink-2);
  margin-bottom:6px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select{
  width:100%;
  padding:12px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  font-size:.95rem;
  box-sizing:border-box;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus{
  outline:none;
  border-color:var(--emerald);
  box-shadow:0 0 0 3px rgba(4,120,87,.12);
}
.wpcf7-form textarea{
  resize:vertical;
  min-height:120px;
}
.wpcf7-submit{
  background:var(--emerald);
  color:#fff;
  border:none;
  padding:14px 32px;
  border-radius:var(--radius);
  font-size:1rem;
  font-weight:600;
  cursor:pointer;
  transition:background .2s;
}
.wpcf7-submit:hover{
  background:var(--emerald-deep);
}

/* ===== Shop 排序下拉 ===== */
.shop-toolbar select,
.woocommerce-ordering select{
  padding:8px 14px;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:.88rem;
  cursor:pointer;
  width:auto;
}

/* ===== 表单提示信息 ===== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error{
  padding:14px 18px;
  border-radius:var(--radius);
  margin-bottom:20px;
  font-size:.92rem;
}
.woocommerce-message{
  background:#ecfdf5;
  border-left:4px solid var(--emerald);
  color:#065f46;
}
.woocommerce-info{
  background:#eff6ff;
  border-left:4px solid #3b82f6;
  color:#1e40af;
}
.woocommerce-error{
  background:#fef2f2;
  border-left:4px solid #ef4444;
  color:#991b1b;
}
