select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("../assets/icons/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px 20px;
  padding-inline-end: 48px;
  cursor: pointer;
}

select:disabled {
  cursor: not-allowed;
}

body .cart-actions,
body .modal-actions,
body .settings-save {
  justify-content: center;
  align-items: center;
}

body .cart-actions > .btn,
body .modal-actions > .btn,
body .settings-save > .btn,
body .settings-panel form > .btn {
  width: 220px;
  max-width: 100%;
  min-height: 48px;
  flex: 0 1 220px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-inline: 16px;
  white-space: normal;
}

body .settings-panel form > .btn {
  display: flex;
  margin-inline: auto;
}

body .settings-save {
  width: min(100%, 760px);
}

.modal .modal-card {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.modal .modal-card > * { min-width: 0; }
.modal.login-modal #modalBody {
  overflow: auto;
  overflow-x: hidden;
}
.modal.login-modal #modalDesc,
.modal.login-modal .notice { overflow-wrap: anywhere; }
.modal.login-modal .social-login-stack,
.modal.login-modal #googleSignInButton,
.modal.login-modal .social-login,
.modal.login-modal .field { min-width: 0; max-width: 100%; }
.modal.login-modal .social-login { width: 100%; justify-content: center; }
.modal.login-modal .social-login > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.modal.login-modal #modalActions {
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
body .modal.login-modal #modalActions > .btn {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
  flex: none;
}
@media(max-width: 700px) {
  .modal.login-modal #modalActions { gap: 8px; }
  body .modal.login-modal #modalActions > .btn { font-size: 14px; }
}

.ui-feedback {
  position: fixed;
  z-index: 25000;
  top: max(20px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(480px, calc(100% - 32px));
  padding: 16px 20px;
  border: 1px solid #a7cbb9;
  border-radius: 8px;
  background: #fff;
  color: #173e2d;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  font: 600 16px/1.5 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.ui-feedback[hidden] { display: none; }
.ui-feedback-text { overflow-wrap: anywhere; }
.ui-feedback-confirm {
  flex-shrink: 0;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 16px;
}
.ui-feedback-confirm[hidden] { display: none; }
.ui-feedback-confirm:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.ui-feedback-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5f4eb;
}
.ui-feedback[data-state="error"] { border-color: #d9a8a8; color: #8a2222; }
.ui-feedback[data-state="error"] .ui-feedback-icon { background: #fbe9e9; }
.ui-feedback[data-state="saving"] { border-color: #c7d3dc; color: #354953; }
.ui-feedback[data-state="saving"] .ui-feedback-icon {
  background: transparent;
  border: 2px solid #d9e1e7;
  border-top-color: #354953;
  animation: ui-feedback-spin .8s linear infinite;
}
@keyframes ui-feedback-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ui-feedback[data-state="saving"] .ui-feedback-icon { animation: none; }
}

@media (forced-colors: active) {
  select:not([multiple]):not([size]),
  select:not([multiple])[size="1"] {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
  }
}
.platform-service-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  border-block: 1px solid #d9dedb;
}
.platform-service-offer h3 { margin: 0 0 8px; }
.platform-service-offer p { margin: 0; }
.platform-service-offer .btn { flex: 0 0 220px; text-align: center; }
@media (max-width: 600px) {
  .platform-service-offer { flex-direction: column; align-items: stretch; }
  .platform-service-offer .btn { flex: none; width: min(220px, 100%); margin-inline: auto; }
}
.role-permission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #d8dce0;
}
.role-permission-row label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.role-permission-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
@media(max-width: 600px) {
  .role-permission-row { grid-template-columns: minmax(0, 1fr) 70px 70px; gap: 8px; }
}
body .sidebar nav a[hidden],
body [data-crud-create][hidden],
body [data-action][hidden],
body .settings-tabs button[hidden] { display: none !important; }
.settings-panel .cart-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
