/**
 * Points plugin styles (v1.0.2).
 *
 * ─── ICON STRATEGY ────────────────────────────────────────────────────────
 * BuddyPress runs the nav `name` through wp_kses_data, which strips inline
 * <i> tags. We therefore render every nav-tab icon as a CSS `::before`
 * pseudo-element on the LI that BP gives us via `item_css_id`. The browser
 * composes the icon at render time, so kses can never touch it.
 *
 * Glyphs:
 *   Parent "Points" tab           — fa-layer-group  (\f5fd)
 *   Sub-tab "My Points"           — fa-layer-group  (\f5fd)
 *   Sub-tab "Received"            — fa-gift         (\f06b)
 *   Sub-tab "Sent"                — fa-paper-plane  (\f1d8)
 *   Sub-tab "Send Point(s)"       — fa-share        (\f064)
 *
 * ─── COLOR PALETTE ────────────────────────────────────────────────────────
 * Brand accent (matches the reference plugin): #527293 slate-blue.
 * Earn accent:  #2c8a55 leafy-green.
 * Sent accent:  #d07450 terracotta (matches the reference plugin's danger).
 * v1.0.2 — gift-icon accent: #3a67ad (per spec).
 * v1.0.2 — Send-button paper-plane icon color: #fafbfb (per spec).
 */

/* ==========================================================================
   1. Nav icons — rendered via CSS pseudo-elements so BP's wp_kses_data
      filter (which strips <i> from nav `name`) cannot eat them.

      Selectors are written redundantly across both the LI ID and the inner
      <a> because BP's subnav rendering varies between Legacy / Nouveau /
      BuddyBoss — covering both shapes guarantees one of them matches.
   ========================================================================== */

#points-profile-tab-personal-li > a::before,
#user-points-profile-tab::before,
li[id^="points-profile-tab"] > a::before,
#points-subtab-my-points-personal-li > a::before,
#points-subtab-my-points > a::before,
li[id^="points-subtab-my-points"] > a::before,
li#points-subtab-my-points::before,
#points-subtab-received-personal-li > a::before,
#points-subtab-received > a::before,
li[id^="points-subtab-received"] > a::before,
li#points-subtab-received::before,
#points-subtab-sent-personal-li > a::before,
#points-subtab-sent > a::before,
li[id^="points-subtab-sent"] > a::before,
li#points-subtab-sent::before,
#points-subtab-send-personal-li > a::before,
#points-subtab-send > a::before,
li[id^="points-subtab-send"] > a::before,
li#points-subtab-send::before,
/* v1.0.5 — Gifts top-level tab + sub-tabs. */
#points-gifts-tab-personal-li > a::before,
#user-points-gifts-tab::before,
li[id^="points-gifts-tab"] > a::before,
#points-gifts-subtab-all-personal-li > a::before,
#points-gifts-subtab-all > a::before,
li[id^="points-gifts-subtab-all"] > a::before,
li#points-gifts-subtab-all::before,
#points-gifts-subtab-received-personal-li > a::before,
#points-gifts-subtab-received > a::before,
li[id^="points-gifts-subtab-received"] > a::before,
li#points-gifts-subtab-received::before,
/* v1.0.6 — Sent gifts sub-tab. */
#points-gifts-subtab-sent-personal-li > a::before,
#points-gifts-subtab-sent > a::before,
li[id^="points-gifts-subtab-sent"] > a::before,
li#points-gifts-subtab-sent::before,
#points-gifts-subtab-send-personal-li > a::before,
#points-gifts-subtab-send > a::before,
li[id^="points-gifts-subtab-send"] > a::before,
li#points-gifts-subtab-send::before {
	font-family: "Font Awesome 6 Free",
				 "Font Awesome 6 Pro",
				 "Font Awesome 5 Free",
				 "Font Awesome 5 Pro",
				 "FontAwesome";
	font-weight: 900; /* fa-solid */
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	display: inline-block;
	margin-right: 6px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	speak: none;
	vertical-align: -1px;
}

#points-profile-tab-personal-li > a::before,
#user-points-profile-tab::before,
li[id^="points-profile-tab"] > a::before                            { content: "\f5fd"; }

#points-subtab-my-points-personal-li > a::before,
#points-subtab-my-points > a::before,
li[id^="points-subtab-my-points"] > a::before,
li#points-subtab-my-points::before                                  { content: "\f5fd"; }

#points-subtab-received-personal-li > a::before,
#points-subtab-received > a::before,
li[id^="points-subtab-received"] > a::before,
li#points-subtab-received::before                                   { content: "\f06b"; }

#points-subtab-sent-personal-li > a::before,
#points-subtab-sent > a::before,
li[id^="points-subtab-sent"] > a::before,
li#points-subtab-sent::before                                       { content: "\f1d8"; }

#points-subtab-send-personal-li > a::before,
#points-subtab-send > a::before,
li[id^="points-subtab-send"] > a::before,
li#points-subtab-send::before                                       { content: "\f064"; }

/* v1.0.5 — Gifts top-level tab uses fa-gift (\f06b). All Gifts sub-tab
   uses fa-gifts (\f79c) which is the gift-stack glyph; Received uses
   fa-gift; Send a Gift uses fa-paper-plane. The Send-a-Gift glyph is
   intentionally the same paper-plane as the Points "Send Point(s)" tab
   to reinforce the "this is the compose action" pattern across both
   trees. */
#points-gifts-tab-personal-li > a::before,
#user-points-gifts-tab::before,
li[id^="points-gifts-tab"] > a::before                               { content: "\f06b"; }

#points-gifts-subtab-all-personal-li > a::before,
#points-gifts-subtab-all > a::before,
li[id^="points-gifts-subtab-all"] > a::before,
li#points-gifts-subtab-all::before                                   { content: "\f79c"; }

#points-gifts-subtab-received-personal-li > a::before,
#points-gifts-subtab-received > a::before,
li[id^="points-gifts-subtab-received"] > a::before,
li#points-gifts-subtab-received::before                              { content: "\f06b"; }

/* v1.0.6 — Sent gifts uses fa-paper-plane (\f1d8), the same glyph the
   Points "Sent" tab uses, so the two trees stay consistent. Send a
   Gift moves to fa-share (\f064) to match how the Points "Send
   Point(s)" tab differentiates the compose action from the history. */
#points-gifts-subtab-sent-personal-li > a::before,
#points-gifts-subtab-sent > a::before,
li[id^="points-gifts-subtab-sent"] > a::before,
li#points-gifts-subtab-sent::before                                  { content: "\f1d8"; }

#points-gifts-subtab-send-personal-li > a::before,
#points-gifts-subtab-send > a::before,
li[id^="points-gifts-subtab-send"] > a::before,
li#points-gifts-subtab-send::before                                  { content: "\f064"; }

/* ==========================================================================
   2. Wrapper + intro band (mirrors the reference plugin's pattern).
   ========================================================================== */
.points-wrap,
.points-wrapper {
	margin-top: 1em;
}
.points-section-header {
	margin-bottom: 1.25em;
}
.points-intro {
	margin: -15px 0 0 0 !important;
	padding: 14px 16px !important;
	font-size: 13.5px !important;
	line-height: 1.65 !important;
	color: #555 !important;
	background: #f4f7fa !important;
	border-left: 3px solid #527293 !important;
	border-radius: 0 4px 4px 0 !important;
	box-sizing: border-box !important;
}

.points-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 1.5em 0 0.75em;
	font-size: 16px;
	font-weight: 600;
	color: #2c3e50;
}
.points-section-title i {
	color: #527293;
	font-size: 15px;
}
.points-section-title .count {
	display: inline-block;
	min-width: 22px;
	padding: 2px 8px;
	font-size: 12px;
	font-weight: 600;
	background: #527293;
	color: #fff;
	border-radius: 999px;
	text-align: center;
}

.points-empty {
	padding: 1.25em;
	text-align: center;
	color: #888;
	background: #fafafa;
	border: 1px dashed #ddd;
	border-radius: 8px;
}

.points-forbidden {
	padding: 1.5em;
	background: #fff8f0;
	border-left: 3px solid #d07450;
	border-radius: 0 4px 4px 0;
	color: #6b4a39;
}

/* ==========================================================================
   3. Balance card (My Points landing).
   ========================================================================== */
.points-balance-card {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 24px;
	margin: 1.25em 0 1em;
	background: linear-gradient(135deg, #527293 0%, #3d5a74 100%);
	color: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 14px rgba(82, 114, 147, 0.25);
}
.points-balance-icon {
	width: 56px; height: 56px;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	font-size: 24px;
}
.points-balance-body {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.points-balance-label {
	font-size: 13px;
	opacity: 0.85;
	margin-bottom: 4px;
}
.points-balance-value {
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -0.5px;
}
.points-balance-suffix {
	font-size: 13px;
	opacity: 0.85;
}

.points-balance-line {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	margin: 0.5em 0 1em;
	background: #f4f7fa;
	border: 1px solid #dfe7ef;
	border-radius: 999px;
	font-size: 14px;
	color: #3d5a74;
	font-weight: 500;
}
.points-balance-line i {
	color: #527293;
}

/* ==========================================================================
   4. Summary pills (Received / Sent).

      v1.0.2: per spec, the gift icon in the "Total received: …" pill is
      forced to #3a67ad. The high-specificity selector chain ensures the
      override beats any theme-level icon color. We intentionally leave
      the pill's BACKGROUND tint alone — only the icon color changes.
   ========================================================================== */
.points-summary-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 1em 0 1.25em;
}
.points-summary-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
}
.points-summary-pill-in {
	background: #e6f4ec;
	color: #2c8a55;
}
.points-summary-pill-out {
	background: #fdf0e8;
	color: #b85e38;
}
.points-summary-pill-in i,
span.points-summary-pill.points-summary-pill-in i.fa-gift {
	color: #3a67ad !important;
}
/* v1.0.3 — refund pill on the Received page. Slate-blue family so it
   reads as informational rather than success/danger. */
.points-summary-pill-refund {
	background: #eef2f7;
	color: #527293;
}
.points-summary-pill-refund i {
	color: #527293;
}
.points-summary-count {
	font-size: 13px;
	color: #888;
}

/* ==========================================================================
   5. Activity / log list — used on My Points, Received, Sent.
   ========================================================================== */
.points-log {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #fff;
}
.points-log-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}
.points-log-row:last-child { border-bottom: none; }
.points-log-row:hover      { background: #fbfcfd; }

.points-log-icon {
	flex: 0 0 auto;
	width: 32px; height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f4f7fa;
	color: #527293;
}
.points-row-earn .points-log-icon,
.points-row-received .points-log-icon { background: #fff; color: #2c8a55; }
.points-row-sent .points-log-icon     { background: #fff; color: #b85e38; }
/* v1.0.3 — refund row uses slate-blue so it reads as a neutral inbound
   adjustment rather than a regular received transfer. */
.points-row-refund .points-log-icon   { background: #fff; color: #527293; }

.points-log-avatar {
	width: 36px; height: 36px;
	border-radius: 50%;
	flex: 0 0 auto;
	object-fit: cover;
}

.points-log-amount {
	flex: 0 0 auto;
	min-width: 44px;
	font-weight: 700;
	font-size: 15px;
	text-align: right;
}
.points-row-earn .points-log-amount,
.points-row-received .points-log-amount { color: #2c8a55; }
.points-row-sent .points-log-amount     { color: #b85e38; }
.points-row-refund .points-log-amount   { color: #527293; }

.points-log-body {
	flex: 1 1 auto;
	color: #333;
	min-width: 0;
}
.points-log-body a {
	color: #527293;
	text-decoration: none;
	font-weight: 500;
}
.points-log-body a:hover { text-decoration: underline; }
.points-log-note         { color: #777; font-style: italic; }

.points-log-time {
	flex: 0 0 auto;
	font-size: 12px;
	color: #999;
	white-space: nowrap;
}

/* ==========================================================================
   6. PENDING TRANSFER ROWS (v1.0.2)

      Per spec: every pending transfer renders as ONE horizontal row, in
      flex layout, no multi-line vertical fallback. Order:
        avatar · name · amount · note · timestamp · Accept · Decline

      Each cell uses min-width:0 + ellipsis where appropriate so a long
      note doesn't push the buttons off-screen. The whole row is a single
      <li> so the buttons travel with the row when the list is updated
      via JS (after Accept / Decline removes that row).
   ========================================================================== */
.points-pending-list {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.points-pending-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	background: #f6faff;
	border: 1px solid #d9e4ef;
	border-left: 3px solid #527293;
	border-radius: 8px;
	font-size: 14px;
}
.points-pending-row.points-pending-row-out {
	background: #fff7f0;
	border-color: #f0d9c8;
	border-left-color: #d07450;
}

.points-pending-avatar {
	flex: 0 0 auto;
	width: 36px; height: 36px;
	border-radius: 50%;
	object-fit: cover;
	background: #e8eef5;
}
.points-pending-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b8aab;
	font-size: 16px;
}

.points-pending-name {
	flex: 0 0 auto;
	max-width: 150px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 600;
	color: #2c3e50;
}
.points-pending-name a {
	color: #2c3e50;
	text-decoration: none;
}
.points-pending-name a:hover { text-decoration: underline; }

.points-pending-amount {
	flex: 0 0 auto;
	min-width: 42px;
	font-weight: 700;
	font-size: 15px;
	color: #2c8a55;
	text-align: right;
}
.points-pending-amount-out { color: #b85e38; }

.points-pending-note {
	flex: 1 1 auto;
	min-width: 0;
	color: #555;
	font-style: italic;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.points-pending-note-empty {
	color: #aaa;
	font-style: italic;
}

.points-pending-time {
	flex: 0 0 auto;
	font-size: 12px;
	color: #888;
	white-space: nowrap;
}

.points-pending-status {
	flex: 0 0 auto;
	display: inline-block;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 600;
	color: #b85e38;
	background: #fdf0e8;
	border-radius: 999px;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

/* Accept / Decline buttons — sit at the end of the row. */
.points-accept-btn,
.points-decline-btn {
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 7px 14px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	border-radius: 999px !important;
	border: 1px solid transparent !important;
	cursor: pointer !important;
	box-shadow: none !important;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.points-accept-btn {
	background: #e6f4ec !important;
	color: #2c8a55 !important;
	border-color: #cbe7d6 !important;
}
.points-accept-btn:hover {
	background: #7db665 !important;
	color: #fff !important;
	border-color: #7db665 !important;
}
.points-decline-btn {
	background: #fdf0e8 !important;
	color: #b85e38 !important;
	border-color: #f3d9c8 !important;
}
/* Decline hover — mirrored softer-than-base terracotta to match the
   softer-than-base green used for the accept hover (#7db665 vs the base
   #2c8a55). Same softening direction so the two buttons feel like a
   coordinated pair. */
.points-decline-btn:hover {
	background: #e09678 !important;
	color: #fff !important;
	border-color: #e09678 !important;
}
.points-accept-btn:disabled,
.points-decline-btn:disabled {
	opacity: .55 !important;
	cursor: not-allowed !important;
}

/* v1.0.3 — per-spec icon color overrides.
   The fa-check (Accept / Confirm Accept) glyph and the fa-xmark (Decline /
   Confirm Decline) glyph each get a soft brand-tinted color so they read
   as accents against the button label rather than as a second strong
   color. Scoped to the action buttons (NOT global) so the popup close-X
   button's xmark glyph keeps its neutral #888 from .points-popup-close. */
.points-accept-btn i.fa-solid.fa-check,
button.points-accept-btn i.fa-solid.fa-check,
#points-confirm-accept-go-btn i.fa-solid.fa-check {
	color: #bfcee2 !important;
}
.points-decline-btn i.fa-solid.fa-xmark,
button.points-decline-btn i.fa-solid.fa-xmark,
#points-confirm-decline-go-btn i.fa-solid.fa-xmark {
	color: #efd4c7 !important;
}

/* On very narrow viewports the spec still says "one horizontal line", so we
   don't break the row — instead we shrink the optional cells (note + time)
   and let them ellipsize. Avatar, name, amount, and the two buttons stay. */
@media (max-width: 640px) {
	.points-pending-row { gap: 8px; padding: 8px 10px; font-size: 13px; }
	.points-pending-name { max-width: 100px; }
	.points-pending-time { display: none; }
}
@media (max-width: 460px) {
	.points-pending-name { max-width: 80px; }
	.points-pending-note { display: none; }
}

/* ==========================================================================
   7. Send-form — search field, suggestions, recipient card, inputs.
      Search-field styling lifted directly from the reference plugin so the
      two plugins feel like they belong to the same product family.
   ========================================================================== */
.points-search-wrap { position: relative; width: 100%; margin-bottom: 1em; }
.points-search-field { position: relative; width: 100%; }
.points-member-search {
	width: 100% !important;
	padding: 12px 44px 12px 16px;
	border: solid 1px #527293 !important;
	border-radius: 8px;
	background: #fff;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	transition: border-color .15s ease, box-shadow .15s ease;
	box-sizing: border-box;
}
.points-member-search:focus {
	outline: none;
	border-color: #527293 !important;
	box-shadow: 0 0 0 3px rgba(82, 114, 147, 0.18);
}
.points-search-icon {
	position: absolute;
	right: 14px; top: 50%;
	transform: translateY(-50%);
	color: #527293;
	pointer-events: none;
	font-size: 18px; line-height: 1;
}
.points-search-icon i { font-size: 18px; }

.points-search-spinner {
	position: absolute;
	right: 14px; top: 50%;
	transform: translateY(-50%);
	color: #527293;
	font-size: 16px;
	display: none;
}
.points-search-field.is-loading .points-search-icon  { display: none; }
.points-search-field.is-loading .points-search-spinner { display: block; }
.points-spinner-fallback {
	width: 16px; height: 16px;
	border: 2px solid rgba(82, 114, 147, 0.25);
	border-top-color: #527293;
	border-radius: 50%;
	animation: points-spin 0.8s linear infinite;
	display: inline-block;
}
@keyframes points-spin { to { transform: rotate(360deg); } }

.points-search-suggestions {
	position: absolute;
	top: calc(100% + 4px);
	left: 0; right: 0;
	z-index: 50;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
	list-style: none;
	margin: 0; padding: 4px 0;
	max-height: 340px;
	overflow-y: auto;
}
.points-search-suggestions li { margin: 0; padding: 0; list-style: none; }
.points-suggestion {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	cursor: pointer;
	color: #111;
}
.points-suggestion:hover,
.points-suggestion.is-active { background: #f2f7fc; }
.points-suggestion img {
	width: 32px; height: 32px;
	border-radius: 50%;
	flex: 0 0 auto;
}
.points-suggestion-meta {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
	min-width: 0;
}
.points-suggestion-name  { font-weight: 600; font-size: 14px; }
.points-suggestion-login { font-size: 12px; color: #888; }

.points-suggestion-empty {
	padding: 10px 14px;
	color: #888;
	font-size: 13px;
}

/* Selected-recipient card on the Send tab */
.points-selected-recipient { margin: 0.5em 0 1em; }
.points-selected-recipient:empty { display: none; }
.points-recipient-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: #f4f7fa;
	border: 1px solid #dfe7ef;
	border-radius: 10px;
}
.points-recipient-card img {
	width: 40px; height: 40px;
	border-radius: 50%;
	flex: 0 0 auto;
}
.points-recipient-meta {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.points-recipient-name  { font-weight: 600; font-size: 15px; color: #2c3e50; }
.points-recipient-login { font-size: 12px; color: #777; }
.points-recipient-clear {
	flex: 0 0 auto;
	background: transparent;
	border: none;
	color: #b85e38;
	cursor: pointer;
	font-size: 16px;
	padding: 4px 8px;
	border-radius: 4px;
}
.points-recipient-clear:hover { background: rgba(184, 94, 56, 0.1); }

/* Form rows on the Send tab.
   v1.0.3: padding + border + border-radius removed (per spec) to keep the
   interface clean and minimize visual containers stacking inside the BP
   profile column. background-clip:border-box is set explicitly so any
   theme that injects a default background-clip can't disagree. */
.points-send-form {
	margin-top: 1em;
	background: #fff;
	background-clip: border-box;
}
.points-form-row {
	display: flex;
	flex-direction: column;
	margin-bottom: 14px;
}
.points-form-label {
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin-bottom: 6px;
}
.points-amount,
.points-note,
input#points-amount.points-amount,
input#points-note.points-note {
	width: 100%;
	padding: 10px 14px;
	border: solid 1px #527293 !important;
	border-radius: 8px;
	font-size: 15px;
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.points-amount:focus,
.points-note:focus {
	outline: none;
	border-color: #527293;
	box-shadow: 0 0 0 3px rgba(82, 114, 147, 0.18);
}
.points-form-hint { font-size: 12px; color: #888; margin-top: 4px; }

.points-form-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-top: 6px;
}

/* ==========================================================================
   8. Buttons — same shape language as the reference plugin.

      v1.0.2: per spec, the paper-plane icon inside .points-confirm-btn (the
      Send / Confirm Send button) is forced to #fafbfb. We don't tint the
      whole label that color — only the icon — so the text remains crisp
      on the slate-blue button background.
   ========================================================================== */
.points-confirm-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 9px 22px !important;
	background: #527293 !important;
	background-color: #527293 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 25px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	box-shadow: none !important;
}
.points-confirm-btn:hover {
	background: #3d5a74 !important;
	background-color: #3d5a74 !important;
}
.points-confirm-btn:disabled {
	opacity: .6 !important;
	cursor: not-allowed !important;
}
/* Per spec: paper-plane glyph on the Send / Confirm-Send button is #fafbfb. */
.points-confirm-btn i.fa-paper-plane,
button.points-confirm-btn i.fa-paper-plane {
	color: #fafbfb !important;
}

.points-danger-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 9px 22px !important;
	background: #d07450 !important;
	background-color: #d07450 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 25px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	box-shadow: none !important;
}
.points-danger-btn:hover {
	background: #b85e38 !important;
	background-color: #b85e38 !important;
}
.points-danger-btn:disabled {
	opacity: .6 !important;
	cursor: not-allowed !important;
}

.points-cancel-btn {
	display: inline-flex !important;
	align-items: center !important;
	padding: 9px 18px !important;
	background: #f0f0f0 !important;
	background-color: #f0f0f0 !important;
	color: #444 !important;
	border: 1px solid #ddd !important;
	border-radius: 25px !important;
	font-size: 14px !important;
	cursor: pointer !important;
	box-shadow: none !important;
}
.points-cancel-btn:hover {
	background: #e0e0e0 !important;
	background-color: #e0e0e0 !important;
}

/* Feedback (success / error) */
.points-feedback {
	margin: 1em 0 0;
	min-height: 1.2em;
	font-size: 14px;
}
.points-feedback.is-success { color: #2c8a55; font-weight: 500; }
.points-feedback.is-error   { color: #b85e38; font-weight: 500; }

/* ==========================================================================
   9. Overlay + popups (v1.0.2) — borrowed from the reference plugin.

      Both Send-confirm and Accept/Decline-confirm dialogs share these
      base styles. We use distinct class names (points-* not clients-*) so
      the two plugins can coexist without CSS collisions.
   ========================================================================== */
.points-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, .72);
	backdrop-filter: blur(1px);
	-webkit-backdrop-filter: blur(1px);
	z-index: 99998;
}
.points-overlay.points-active { display: block; }

.points-popup {
	display: none;
	position: fixed;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%) scale(.96);
	z-index: 99999;
	background: #fff;
	background-clip: border-box;
	border-radius: 12px !important;
	box-shadow: 0 4px 6px rgba(0, 0, 0, .07), 0 12px 40px rgba(0, 0, 0, .14);
	padding: 32px 28px 28px;
	box-sizing: border-box;
	width: 420px;
	max-width: calc(100vw - 32px);
	opacity: 0;
	transition: opacity .18s ease, transform .18s ease;
}
.points-popup.points-active {
	display: block;
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.points-popup-close {
	position: absolute !important;
	top: 12px !important;
	right: 14px !important;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	padding: 4px 6px !important;
	cursor: pointer !important;
	color: #888 !important;
	font-size: 18px !important;
	box-shadow: none !important;
	border-radius: 4px !important;
}
.points-popup-close:hover {
	color: #333 !important;
	background: #f0f0f0 !important;
}
/* Mirror the v1.0.6 reference fix: nudge the X glyph up 3px so it visually
   centers in its hit area. */
button#points-confirm-send-close.points-popup-close,
button#points-confirm-accept-close.points-popup-close,
button#points-confirm-decline-close.points-popup-close {
	margin-top: -3px !important;
}

.points-popup-body { text-align: center; }

.points-popup-avatar { margin: 0 auto 12px; width: 80px; height: 80px; }
.points-popup-avatar img {
	width: 80px !important;
	height: 80px !important;
	border-radius: 50% !important;
	display: block !important;
	border: 2px solid #e8e8e8;
}

.points-popup-name {
	margin: 0 0 6px !important;
	font-size: 17px !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
}

.points-popup-title {
	margin: 0 0 6px !important;
	font-size: 17px !important;
	font-weight: 600 !important;
	color: #1a1a1a !important;
	text-align: center;
	padding-right: 24px;
}
.points-popup-subtitle {
	margin: 0 0 18px !important;
	font-size: 13.5px !important;
	color: #555 !important;
	text-align: center;
	line-height: 1.55;
}

.points-popup-success-icon {
	font-size: 40px;
	color: #527293;
	margin: 0 auto 16px;
}
.points-success-msg {
	font-size: 16px !important;
	line-height: 1.7 !important;
	color: #333 !important;
}

.points-popup-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ==========================================================================
   10. Sub-tab AJAX swap loading state (matches the reference plugin).
   ========================================================================== */
.points-subtab-content.points-subtab-loading {
	opacity: .55;
	pointer-events: none;
	transition: opacity .12s ease;
}

/* ==========================================================================
   11. Mobile.
   ========================================================================== */
@media (max-width: 540px) {
	.points-balance-card { padding: 18px 18px; gap: 14px; }
	.points-balance-value { font-size: 30px; }
	.points-log-row { flex-wrap: wrap; gap: 8px; }
	.points-log-time { flex-basis: 100%; text-align: right; }
}

/* ==========================================================================
   12. v1.0.5 — Gifts subtab styles.

      Goals:
        • Visually distinguish the Gifts tree from the Points tree without
          inventing a brand-new design language. We reuse the same
          .points-* atoms (rows, pills, popups) and only add the deltas
          that are specific to gifts: the catalog tile picker, the
          direction badge in the All-Gifts feed, the colored gift glyph
          column, and a slightly warmer balance-card gradient.
        • Tiles render as a responsive grid that collapses gracefully on
          phones. Selected state is a strong outline + subtle background
          tint so it reads as "active" without shouting.
   ========================================================================== */

/* Gifts balance card — same shape as Points but with a warmer accent so
   the two cards don't look identical when seen on consecutive tabs. */
.points-gifts-balance-card {
	background: linear-gradient(135deg, #3a67ad 0%, #527293 100%);
	box-shadow: 0 4px 14px rgba(58, 103, 173, 0.22);
}

/* Gifts log rows — keep the same flex shape as .points-log-row but allow
   a colored gift-glyph cell to sit alongside the avatar. The icon
   column is the canonical "what gift was this" affordance. */
.points-gifts-row {
	gap: 10px;
}
.points-gifts-icon {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	background: #fff;
	border-radius: 50%;
}
/* The All-Gifts feed prefixes each row with an in/out direction badge. */
.points-gifts-direction-badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	border-radius: 999px;
}
.points-gifts-row-in .points-gifts-direction-badge {
	color: #2c8a55;
	background: #e6f4ec;
}
.points-gifts-row-out .points-gifts-direction-badge {
	color: #b85e38;
	background: #fdf0e8;
}

/* Gift catalog tile-picker on the Send a Gift form. Auto-fit grid so the
   tile count + breakpoint fall out of CSS instead of media-query
   gymnastics. */
.points-gift-catalog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 10px;
	margin-top: 4px;
}
.points-gift-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 14px 10px;
	background: #fff;
	border: 1px solid #dfe7ef;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease;
	user-select: none;
}
.points-gift-tile:hover {
	border-color: #b9c9da;
	background: #f6f9fc;
}
.points-gift-tile.is-selected {
	border-color: #527293;
	background: #eef3f8;
	box-shadow: 0 0 0 3px rgba(82, 114, 147, 0.18);
}
/* Hide the radio input itself — the tile <label> is the affordance. */
.points-gift-tile-input {
	position: absolute !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
}
.points-gift-tile-icon {
	font-size: 28px;
	line-height: 1;
}
.points-gift-tile-label {
	font-size: 12.5px;
	font-weight: 500;
	color: #3d5a74;
	text-align: center;
}

/* Mobile — keep tiles tappable but tighter. */
@media (max-width: 540px) {
	.points-gift-catalog-grid {
		grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
		gap: 8px;
	}
	.points-gift-tile { padding: 10px 8px; }
	.points-gift-tile-icon { font-size: 24px; }
	.points-gifts-direction-badge { display: none; }
}

/* ==========================================================================
   13. v1.0.6 — Inline image variant + admin_revoke row.

      • Admin-defined gifts (added through the new Points & Gifts admin
        page) ship with an image_url instead of an FA glyph. The Gifts
        log rows render either an FA span OR an <img> inside the same
        .points-gifts-icon container; the image variant needs its own
        sizing so it occupies the same visual footprint as the glyph.

      • The new 'admin_revoke' ledger kind on My Points uses a distinct
        warm-toned border so a user looking at their log immediately
        sees that a revoke is qualitatively different from a peer-to-
        peer 'sent' transfer.
   ========================================================================== */

/* Inline image used in place of the FA glyph in gifts log rows. The
   parent .points-gifts-icon is already a 32×32 round container with a
   white background; the image fills it and gets clipped to the circle
   so admin-uploaded photos (which can be any aspect ratio) stay tidy. */
.points-gifts-icon-image {
	background: transparent;
	padding: 0;
	overflow: hidden;
}
.points-gifts-icon-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

/* Admin revoke row on the My Points log. Inherits .points-row-sent
   (red sign), but a left border + faint warm tint distinguish it from
   a routine peer-to-peer outgoing transfer. */
.points-row-admin-revoke {
	border-left: 3px solid #d07450;
	padding-left: 9px;
}
.points-row-admin-revoke .points-log-icon {
	color: #d07450;
}
