/* ========================================================================== */
/* SMS Wishlists — frontend styles                                            */
/* ========================================================================== */

/* --------------------------- Product page widget -------------------------- */

.sms-wl-product {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
}

.sms-wl-product label { font-weight: 600; margin-right: .5rem; }

.sms-wl-select {
  min-width: 180px;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid #dcdcdc;
  background: #fff;
}

.sms-wl-product .button { margin-left: .5rem; }

/* ------------------------------ Account page ------------------------------ */

.sms-wl-account table.shop_table { border-radius: 10px; overflow: hidden; }

.sms-wl-account th,
.sms-wl-account td { padding: 8px 10px; text-align: left; vertical-align: middle; }

/* Header: 2-column grid (select | new list form). No clipping. */
.sms-wl-header{
  display:grid !important;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap:12px;
  align-items:center;
  margin:0 0 12px 0;
  overflow:visible !important;
}

.sms-wl-select-wrap select{ min-width:220px; }

.sms-wl-new{
  display:flex !important;
  gap:8px;
  align-items:center;
  justify-content:flex-start;
  width:auto !important;
  max-width:none !important;
  overflow:visible !important;
}

.sms-wl-new input[type="text"]{
  height:36px !important;
  padding:6px 10px !important;
  line-height:1.2 !important;
  box-sizing:border-box !important;
  min-width:220px;
  border-radius:6px;
  border:1px solid #dcdcdc;
  background:#fff;
}

/* Create button: no wrap, no shrink, no clipping */
.sms-wl-create{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:36px !important;
  padding:0 14px !important;
  line-height:1 !important;
  font-size:14px !important;
  white-space:nowrap !important;
  min-width:100px;
  box-sizing:border-box !important;
  flex:0 0 auto !important;
  overflow:visible !important;
}
.sms-wl-create::before,
.sms-wl-create::after{ display:none !important; }

/* Actions bar above table */
.sms-wl-actionsbar { margin: 8px 0 12px 0; }
.sms-wl-bulk-add { font-size: 13px; padding: 8px 14px; }

/* Thumbnail column */
.sms-wl-col-img { padding: 6px 8px; }
.sms-wl-thumb { display:inline-block; width:48px; height:48px; }
.sms-wl-thumb-img {
  width:48px; height:48px;
  object-fit:contain;
  border-radius:6px;
  background:#fff;
}

/* Actions column: compact button + text link under it */
.sms-wl-actions-cell { text-align:left; vertical-align:middle; }
.sms-wl-actions-cell .button.sms-wl-add-cart {
  display:block !important;
  width:120px !important;
  font-size:13px !important;
  padding:6px 10px !important;
  margin-bottom:4px !important;
}
.sms-wl-actions-cell a.sms-wl-remove {
  display:inline-block;
  font-size:13px;
  color:#c00;
  text-decoration:none;
}
.sms-wl-actions-cell a.sms-wl-remove:hover { text-decoration:underline; color:#900; }

/* General button tidy (within wishlist area only) */
.sms-wl-account .button { border-radius: 8px; padding: .55rem .9rem; line-height: 1.1; }

/* Tiny success pulse when adding to cart */
.sms-wl-added { animation: sms-wl-pulse .6s ease-in-out; }
@keyframes sms-wl-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Better taps on iOS */
.sms-wl-account .button,
.sms-wl-product .button { -webkit-tap-highlight-color: transparent; position: relative; z-index: 1; }

/* ------------------------------ Responsiveness ---------------------------- */

@media (max-width: 782px){
  .sms-wl-header{ grid-template-columns: 1fr; }
  .sms-wl-new input[type="text"]{ min-width: 0; width: 100%; }
  .sms-wl-actions-cell .button.sms-wl-add-cart{ width: 100% !important; }
}

@media (max-width: 480px){
  .sms-wl-thumb, .sms-wl-thumb-img { width:40px; height:40px; }
}

/* Delete list button */
.sms-wl-delete-form { margin-left: 0; }
.sms-wl-delete {
  background:#c0392b;
  border-color:#c0392b;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px;
  padding:0 12px;
  font-size:14px;
  line-height:1;
  white-space:nowrap;
}
.sms-wl-delete:hover { filter:brightness(0.95); color:#fff; }

/* Ensure wishlist content after header forms is always visible */
.sms-wl-body { clear: both; }

/* Some themes hide siblings after a form in My Account – force-show ours */
.woocommerce-MyAccount-content form ~ .sms-wl-actionsbar,
.woocommerce-MyAccount-content form ~ .sms-wl-table,
.woocommerce-MyAccount-content form ~ .sms-wl-body {
  display: block !important;
}

/* Make sure the bar and table actually render */
.sms-wl-actionsbar { display: block !important; margin: 8px 0 12px !important; }
.sms-wl-table { display: table !important; width: 100% !important; border-collapse: separate; }
.sms-wl-table tbody tr { visibility: visible !important; }

/* --- Wishlist header controls: tidy layout & consistent buttons --- */
.sms-wl-header{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px !important;
}

/* make the create form sit inline, no weird spacing */
.sms-wl-header form{ display:flex; gap:8px; align-items:center; margin:0 !important; }

/* input height matches buttons */
.sms-wl-header input[type="text"]{
  height:36px !important; padding:6px 10px !important; line-height:1.2; box-sizing:border-box; min-width:220px;
}

/* normalize buttons (beats theme + inline styles) */
.sms-wl-header .button,
.sms-wl-create,
.sms-wl-delete{
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  height:36px !important; line-height:1 !important; padding:0 14px !important; font-size:14px !important;
  white-space:nowrap; min-width:100px; box-sizing:border-box;
}

/* make delete look like a danger button but same size */
.sms-wl-delete{
  background:#c0392b !important; border-color:#c0392b !important; color:#fff !important;
}

/* slim the big blue bulk button a bit */
.sms-wl-bulk-add{
  font-size:14px !important; padding:10px 16px !important; border-radius:6px !important;
}

/* Header layout */
.woocommerce-MyAccount-content .sms-wl-header {
  display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px;
}

/* Input and select heights to match buttons */
.woocommerce-MyAccount-content .sms-wl-header .sms-wl-input,
.woocommerce-MyAccount-content .sms-wl-header .sms-wl-select {
  height:36px; padding:6px 10px; line-height:1.2; box-sizing:border-box; min-width:220px;
}

/* Create form inline */
.woocommerce-MyAccount-content .sms-wl-header .sms-wl-create-form {
  display:flex; gap:8px; align-items:center; margin:0;
}

/* Normalize buttons in header (beat theme styles) */
.woocommerce-MyAccount-content .sms-wl-header .button,
.woocommerce-MyAccount-content .sms-wl-header .sms-wl-create,
.woocommerce-MyAccount-content .sms-wl-header .sms-wl-delete {
  display:inline-flex; align-items:center; justify-content:center;
  height:36px; line-height:1; padding:0 14px; font-size:14px;
  white-space:nowrap; min-width:100px; box-sizing:border-box;
}

/* Danger style for delete, same size */
.woocommerce-MyAccount-content .sms-wl-header .sms-wl-delete {
  background:#c0392b; border-color:#c0392b; color:#fff;
}

/* Tidy the big bulk button */
.woocommerce-MyAccount-content .sms-wl-bulk-add {
  font-size:14px; padding:10px 16px; border-radius:6px;
}