/* ==========================================================================
   Feselle Guard — Wish Box modal, trigger button, and admin badges
   ========================================================================== */

/* Trigger button (rendered by the theme footer partial) */
.feselle-guard-wishbox-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.feselle-guard-wishbox-button:hover,
.feselle-guard-wishbox-button:focus-visible {
  background: currentColor;
  color: #ffffff;
}

.feselle-guard-wishbox-button .feselle-guard-wishbox-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
}

/* Body lock when modal open */
body.feselle-guard-wishbox-modal-open {
  overflow: hidden;
}

/* Modal overlay */
.feselle-guard-wishbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
}

.feselle-guard-wishbox-modal[hidden] {
  display: none !important;
}

.feselle-guard-wishbox-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.58);
  backdrop-filter: blur(4px);
}

.feselle-guard-wishbox-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  overflow-y: scroll;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 34px);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 60px rgba(17, 17, 17, 0.22);
}

.feselle-guard-wishbox-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f2f2f2;
  color: #111111;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.feselle-guard-wishbox-modal__close:hover,
.feselle-guard-wishbox-modal__close:focus-visible {
  background: #e2e2e2;
}

.feselle-guard-wishbox-modal__header {
  margin-bottom: 22px;
  padding-right: 42px;
}

.feselle-guard-wishbox-modal__title {
  margin: 0;
  color: #111111;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.feselle-guard-wishbox-modal__description {
  margin: 10px 0 0;
  color: #5f5f5f;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Login prompt (unverified users) */
.feselle-guard-wishbox-modal__login-prompt {
  text-align: center;
  padding: 20px 0;
}

.feselle-guard-wishbox-modal__login-prompt p {
  color: #5f5f5f;
  font-size: 1rem;
  margin: 0 0 16px;
}

.feselle-guard-wishbox-modal__login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.feselle-guard-wishbox-modal__login-link:hover,
.feselle-guard-wishbox-modal__login-link:focus-visible {
  background: #2a2a2a;
  color: #ffffff;
}

/* Form */
.feselle-guard-wishbox-form {
  display: grid;
  gap: 16px;
}

.feselle-guard-wishbox-form__field {
  margin: 0;
}

.feselle-guard-wishbox-form__field label {
  display: block;
  margin: 0 0 6px;
  color: #111111;
  font-size: 0.9rem;
  font-weight: 600;
}

.feselle-guard-wishbox-form__field input,
.feselle-guard-wishbox-form__field select,
.feselle-guard-wishbox-form__field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  background: #ffffff;
  color: #111111;
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: inherit;
}

.feselle-guard-wishbox-form__field textarea {
  resize: vertical;
  min-height: 120px;
}

.feselle-guard-wishbox-form__field input:focus,
.feselle-guard-wishbox-form__field select:focus,
.feselle-guard-wishbox-form__field textarea:focus {
  border-color: #111111;
  outline: 2px solid rgba(17, 17, 17, 0.15);
  outline-offset: 1px;
}

.feselle-guard-wishbox-form__actions {
  margin: 0;
}

.feselle-guard-wishbox-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border: 0;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.feselle-guard-wishbox-form__submit:hover,
.feselle-guard-wishbox-form__submit:focus-visible {
  background: #2a2a2a;
}

.feselle-guard-wishbox-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Notice (success / error) */
.feselle-guard-wishbox-form__notice {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.feselle-guard-wishbox-form__notice[hidden] {
  display: none;
}

.feselle-guard-wishbox-form__notice.is-success {
  background: #e8f5e9;
  color: #1b5e20;
}

.feselle-guard-wishbox-form__notice.is-error {
  background: #fbe9e7;
  color: #b71c1c;
}

/* ==========================================================================
   Admin status badges (shared with order-request.css when both loaded)
   ========================================================================== */

.feselle-guard-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  text-transform: capitalize;
}

.feselle-guard-status-new {
  background: #e3f2fd;
  color: #0d47a1;
}

.feselle-guard-status-read {
  background: #f5f5f5;
  color: #616161;
}

.feselle-guard-status-replied {
  background: #e8f5e9;
  color: #1b5e20;
}

.feselle-guard-status-closed {
  background: #eceff1;
  color: #263238;
}

.feselle-guard-status-flagged {
  background: #fbe9e7;
  color: #b71c1c;
}

/* Admin meta box message */
.feselle-guard-request-message {
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  white-space: pre-wrap;
  color: #333333;
  font-size: 0.9rem;
  line-height: 1.6;
}

.feselle-guard-public-wishbox {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feselle-guard-public-wishbox__item {
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}

.feselle-guard-public-wishbox__item:last-child {
  border-bottom: 0;
}

.feselle-guard-public-wishbox__category {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #333333;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.feselle-guard-public-wishbox__date {
  display: block;
  margin-top: 4px;
  color: #757575;
  font-size: 0.8rem;
}

.feselle-guard-public-wishbox__message {
  margin-top: 8px;
  color: #111111;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Responsive */
@media (max-width: 600px) {
  .feselle-guard-wishbox-modal__dialog {
    padding: 20px;
  }
}
