/* UTE Guest Tools Elementor — clean burgundy UI */
.ute-guest-component {
  --ute-burgundy: #780a16;
  --ute-burgundy-hover: #5f0610;
  --ute-burgundy-soft: #fbf0f1;
  --ute-ink: #281b1d;
  --ute-muted: #796c6e;
  --ute-border: #e4d9da;
  --ute-surface: #ffffff;
  --ute-neutral: #f5f3f3;
  --ute-neutral-hover: #ece8e8;
  --ute-whatsapp: #219b50;
  --ute-whatsapp-hover: #197a3f;
  --ute-instagram: #e1306c;
  --ute-instagram-hover: #c1285b;
  --ute-facebook: #1877f2;
  --ute-facebook-hover: #0e63d6;
  --ute-danger: #b42332;
  color: var(--ute-ink);
  width: 100%;
  min-width: 0;
  font-family: inherit;
  line-height: 1.55;
}

.ute-guest-component,
.ute-guest-component * {
  box-sizing: border-box;
}

.ute-guest-component p {
  margin-top: 0;
}

/* Matching minimal cards for the input and guest-list sections */
.ute-guest-component.ute-guest-input {
  padding: 16px;
  border: 1px solid var(--ute-border);
  border-radius: 14px;
  background: #fffdfd;
}

.ute-guest-list-panel {
  padding: 16px;
  border: 1px solid var(--ute-border);
  border-radius: 14px;
  background: #fffdfd;
}

.ute-guest-section-heading {
  margin: 0 0 12px !important;
  color: var(--ute-ink);
  /* Match the size and weight of the other field labels */
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
}

.ute-guest-field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--ute-ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.ute-guest-names-field,
.ute-guest-message-field {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--ute-border) !important;
  border-radius: 12px !important;
  outline: none;
  background: var(--ute-surface) !important;
  color: var(--ute-ink) !important;
  box-shadow: 0 1px 2px rgb(35 15 18 / 3%);
  font: inherit;
  line-height: 1.55;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.ute-guest-names-field {
  min-height: 180px;
  resize: vertical;
}

.ute-guest-message-field {
  min-height: 88px;
  resize: vertical;
}

.ute-guest-names-field::placeholder,
.ute-guest-message-field::placeholder {
  color: #a39799;
  opacity: 1;
}

.ute-guest-names-field:focus,
.ute-guest-message-field:focus {
  border-color: var(--ute-burgundy) !important;
  box-shadow: 0 0 0 3px rgb(120 10 22 / 10%) !important;
}

.ute-guest-help-text {
  margin: 8px 0 12px !important;
  color: var(--ute-muted);
  font-size: 0.875rem;
}

.ute-guest-controls,
.ute-guest-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ute-guest-controls {
  margin-top: 14px;
}

.ute-guest-component .ute-guest-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--ute-burgundy) !important;
  border-radius: 10px !important;
  background: var(--ute-burgundy) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none !important;
  white-space: normal;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ute-guest-component .ute-guest-button:hover {
  border-color: var(--ute-burgundy-hover) !important;
  background: var(--ute-burgundy-hover) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.ute-guest-component .ute-guest-button:active {
  transform: translateY(0);
}

.ute-guest-component .ute-guest-button:focus-visible {
  outline: 3px solid rgb(120 10 22 / 22%);
  outline-offset: 2px;
}

.ute-guest-component .ute-guest-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Primary action: save */
.ute-guest-component [data-ute-action="save-names"],
.ute-guest-component [data-ute-action="save-message"] {
  border-color: var(--ute-burgundy) !important;
  background: var(--ute-burgundy) !important;
  color: #ffffff !important;
}

.ute-guest-component [data-ute-action="save-names"]:hover,
.ute-guest-component [data-ute-action="save-message"]:hover {
  border-color: var(--ute-burgundy-hover) !important;
  background: var(--ute-burgundy-hover) !important;
}

/* Secondary action: clear input */
.ute-guest-component [data-ute-action="clear-input"] {
  border-color: #e9e3e4 !important;
  background: var(--ute-neutral) !important;
  color: #514548 !important;
}
.ute-guest-component [data-ute-action="clear-input"]:hover {
  border-color: #d8cdcf !important;
  background: var(--ute-neutral-hover) !important;
  color: var(--ute-ink) !important;
}

/* Export CSV uses the main burgundy action color */
.ute-guest-component [data-ute-action="export-csv"] {
  border-color: #780a16 !important;
  background: #780a16 !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="export-csv"]:hover {
  border-color: #5f0610 !important;
  background: #5f0610 !important;
}
.ute-guest-component [data-ute-action="choose-csv"] {
  border-color: #d7c2c5 !important;
  background: #ffffff !important;
  color: var(--ute-burgundy) !important;
}
.ute-guest-component [data-ute-action="choose-csv"]:hover {
  border-color: #caa8ad !important;
  background: var(--ute-burgundy-soft) !important;
  color: var(--ute-burgundy-hover) !important;
}

.ute-guest-status {
  margin: 10px 0 0 !important;
  color: var(--ute-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.ute-guest-status:empty {
  display: none;
}
.ute-guest-status.is-error {
  color: #b42332;
}
.ute-guest-status.is-success {
  color: #087443;
}
.ute-guest-access-notice {
  padding: 12px 14px;
  border: 1px solid var(--ute-border);
  border-radius: 10px;
  background: #fffafa;
  color: var(--ute-ink);
}

.ute-guest-message-settings {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--ute-border);
  border-radius: 14px;
  background: #fffdfd;
}
.ute-guest-message-settings .ute-guest-button {
  margin-top: 12px;
}

.ute-guest-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ute-border);
  border-radius: 14px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.ute-guest-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #ffffff;
  color: var(--ute-ink);
  font-size: 0.93rem;
}

.ute-guest-table th,
.ute-guest-table td {
  padding: 13px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #eee7e8 !important;
  text-align: left;
  vertical-align: middle;
}

.ute-guest-table thead th {
  background: #faf6f6 !important;
  color: #5e4b4e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.ute-guest-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.ute-guest-table tbody tr:hover td {
  background: #fffafa;
}

.ute-guest-name-link {
  color: var(--ute-burgundy) !important;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-decoration: none !important;
  text-underline-offset: 3px;
}
.ute-guest-name-link:hover {
  color: var(--ute-burgundy-hover) !important;
  text-decoration: underline !important;
}

.ute-guest-row-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ute-guest-component .ute-guest-row-button {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px !important;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}

/* Row actions use different, purposeful colors */
.ute-guest-component [data-ute-action="copy-url"] {
  border-color: #e1c9cc !important;
  background: #ffffff !important;
  color: var(--ute-burgundy) !important;
}
.ute-guest-component [data-ute-action="copy-url"]:hover {
  border-color: #cda9ae !important;
  background: var(--ute-burgundy-soft) !important;
  color: var(--ute-burgundy-hover) !important;
}
.ute-guest-component [data-ute-action="copy-message"] {
  border-color: #e7e2e2 !important;
  background: #f6f4f4 !important;
  color: #514548 !important;
}
.ute-guest-component [data-ute-action="copy-message"]:hover {
  border-color: #d8cecf !important;
  background: #ece8e8 !important;
  color: var(--ute-ink) !important;
}
.ute-guest-component [data-ute-action="whatsapp"] {
  border-color: var(--ute-whatsapp) !important;
  background: var(--ute-whatsapp) !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="whatsapp"]:hover {
  border-color: var(--ute-whatsapp-hover) !important;
  background: var(--ute-whatsapp-hover) !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="instagram"] {
  border-color: var(--ute-instagram) !important;
  background: var(--ute-instagram) !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="instagram"]:hover {
  border-color: var(--ute-instagram-hover) !important;
  background: var(--ute-instagram-hover) !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="facebook"] {
  border-color: var(--ute-facebook) !important;
  background: var(--ute-facebook) !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="facebook"]:hover {
  border-color: var(--ute-facebook-hover) !important;
  background: var(--ute-facebook-hover) !important;
  color: #ffffff !important;
}
.ute-guest-component [data-ute-action="delete-guest"] {
  border-color: #f0d0d3 !important;
  background: #fffafa !important;
  color: var(--ute-danger) !important;
}
.ute-guest-component [data-ute-action="delete-guest"]:hover {
  border-color: #e4aeb4 !important;
  background: #fff0f1 !important;
  color: #8f1724 !important;
}

.ute-guest-count-text {
  margin: 12px 0 0;
  color: var(--ute-muted);
  font-size: 0.875rem;
}
.ute-guest-count-text [data-ute-role="count"] {
  color: var(--ute-ink);
  font-weight: 700;
}

.ute-guest-list-panel .ute-guest-export-controls {
  margin-top: 12px;
}

.ute-guest-list-panel .ute-guest-count-text {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .ute-guest-controls {
    gap: 8px;
  }
  .ute-guest-controls > .ute-guest-button {
    max-width: 100%;
  }
  .ute-guest-component .ute-guest-button {
    padding: 10px 13px;
  }
  .ute-guest-component .ute-guest-row-button {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 0.74rem;
  }
  .ute-guest-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 0.84rem;
  }
  .ute-guest-table th,
  .ute-guest-table td {
    padding: 10px 8px !important;
  }
  .ute-guest-table th:first-child,
  .ute-guest-table td:first-child {
    width: 31%;
    overflow-wrap: anywhere;
  }
  .ute-guest-table th:last-child,
  .ute-guest-table td:last-child {
    width: 69%;
  }
  .ute-guest-row-actions {
    min-width: 0;
    gap: 8px;
  }
  .ute-guest-input,
  .ute-guest-list-panel,
  .ute-guest-message-settings {
    padding: 13px;
  }
  .ute-guest-section-heading {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ute-guest-component .ute-guest-button,
  .ute-guest-names-field,
  .ute-guest-message-field {
    transition: none;
  }
}

/* Public access is PIN-gated. Keep private components hidden until the token is verified. */
.ute-guest-component[data-ute-auth-required="yes"] {
  display: none !important;
}
.ute-guest-component[data-ute-auth-required="yes"].ute-guest-authenticated {
  display: block !important;
}

.ute-guest-pin-gate {
  --ute-burgundy: #780a16;
  --ute-burgundy-hover: #5f0610;
  --ute-ink: #281b1d;
  --ute-muted: #796c6e;
  --ute-border: #e4d9da;
  width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid var(--ute-border);
  border-radius: 14px;
  background: #fffdfd;
  color: var(--ute-ink);
  font-family: inherit;
  line-height: 1.55;
}
.ute-guest-pin-gate,
.ute-guest-pin-gate * {
  box-sizing: border-box;
}
.ute-guest-pin-gate .ute-guest-section-heading {
  margin: 0 0 8px !important;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
}
.ute-guest-pin-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.ute-guest-pin-form .ute-guest-field-label {
  display: block;
  width: 100%;
  margin: 0;
}
.ute-guest-pin-field {
  display: block;
  width: 100%;
  max-width: 420px;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 13px;
  border: 1px solid var(--ute-border) !important;
  border-radius: 10px !important;
  outline: none;
  background: #ffffff !important;
  color: var(--ute-ink) !important;
  font: inherit;
  box-shadow: 0 1px 2px rgb(35 15 18 / 3%);
}
.ute-guest-pin-field:focus {
  border-color: var(--ute-burgundy) !important;
  box-shadow: 0 0 0 3px rgb(120 10 22 / 10%) !important;
}
.ute-guest-pin-form .ute-guest-button {
  margin-top: 2px;
  border-color: var(--ute-burgundy) !important;
  background: var(--ute-burgundy) !important;
  color: #ffffff !important;
}
.ute-guest-pin-form .ute-guest-button:hover {
  border-color: var(--ute-burgundy-hover) !important;
  background: var(--ute-burgundy-hover) !important;
}
.ute-guest-pin-gate .ute-guest-help-text {
  margin: 0 0 14px !important;
  color: var(--ute-muted);
  font-size: 0.9rem;
}
.ute-guest-pin-gate .ute-guest-status {
  margin: 0 !important;
}
@media (max-width: 600px) {
  .ute-guest-pin-gate {
    padding: 14px;
    border-radius: 12px;
  }
  .ute-guest-pin-field {
    max-width: 100%;
  }
  .ute-guest-pin-form .ute-guest-button {
    width: 100%;
  }
}
