/**
 * Oath - Account Credits
 * My Account page styles matching Savoy theme aesthetic
 *
 * @since 1.0.2
 */

/* ==========================================================================
   Balance Summary Card - Savoy-inspired minimalist design
   ========================================================================== */

.account-funds-balance-card {
	background: #EEEEEE;
	border: 1px solid #E5E5E5;
	border-radius: 8px;
	padding: 30px;
	margin-bottom: 30px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.account-funds-balance-card .balance-summary {
	text-align: center;
}

.account-funds-balance-card .balance-label {
	font-size: 14px;
	color: #777777;
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 10px 0;
}

.account-funds-balance-card .balance-amount {
	font-size: 36px;
	font-weight: 600;
	color: #282828;
	margin-bottom: 15px;
}

.account-funds-balance-card .balance-breakdown {
	display: flex;
	justify-content: center;
	gap: 25px;
	font-size: 14px;
	color: #777777;
	margin-top: 10px;
	padding-top: 15px;
	border-top: 1px solid #E5E5E5;
}

.account-funds-balance-card .balance-detail strong {
	color: #282828;
}

.account-funds-balance-card .balance-held {
	color: #888888;
}

/* ==========================================================================
   Transaction History Table - Matches Orders table styling
   ========================================================================== */

.my_account_transactions {
	border: none;
	margin-bottom: 30px;
}

.my_account_transactions thead {
	background: transparent;
}

.my_account_transactions thead th {
	font-size: 12px;
	color: #777777;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 12px 15px;
	border-bottom: 2px solid #E5E5E5;
	text-align: left;
}

.my_account_transactions thead th.transaction-amount,
.my_account_transactions thead th.transaction-balance {
	text-align: right;
}

.my_account_transactions tbody td.transaction-amount,
.my_account_transactions tbody td.transaction-balance {
	text-align: right;
}

.my_account_transactions tbody tr {
	border-bottom: 1px solid #E5E5E5;
}

.my_account_transactions tbody tr:last-child {
	border-bottom: none;
}

.my_account_transactions tbody td {
	padding: 18px 15px;
	vertical-align: top;
	color: #777777;
	font-size: 14px;
}

.my_account_transactions tbody td strong {
	color: #282828;
}

/* Transaction type badges */
.transaction-type-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.transaction-type-badge.type-credit {
	background: #FDF6E8;
	color: #8A5A12;
}

.transaction-type-badge.type-debit {
	background: #F5F5F5;
	color: #666666;
}

/* Transaction amounts */
.transaction-amount .amount {
	font-size: 16px;
	font-weight: 600;
}

.transaction-amount .amount-credit {
	color: #8A5A12;
}

.transaction-amount .amount-debit {
	color: #666666;
}

/* Transaction links - Savoy's golden-orange accent */
.woocommerce-MyAccount-account-funds .transaction-link {
	color: #8A5A12;
	text-decoration: none;
	font-weight: 500;
}

.woocommerce-MyAccount-account-funds .transaction-link:hover {
	color: #6F480E;
	text-decoration: underline;
}

/* Transaction notes */
.transaction-note {
	font-size: 13px;
	color: #888888;
	font-style: italic;
	display: block;
	margin-top: 4px;
}

/* Transaction status badges */
.transaction-status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-left: 8px;
	background: #F5F5F5;
	color: #666666;
}

/* Voided/expired transaction styling */
.transaction-status-voided,
.transaction-status-expired {
	opacity: 0.7;
}

.transaction-status-voided .transaction-amount,
.transaction-status-expired .transaction-amount {
	text-decoration: line-through;
}

/* ==========================================================================
   Pagination - Savoy minimalist style
   ========================================================================== */

.woocommerce-pagination {
	margin-top: 30px;
	text-align: center;
}

.woocommerce-pagination ul {
	display: inline-block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-pagination ul li {
	display: inline-block;
	margin: 0 3px;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: block;
	padding: 8px 14px;
	color: #777777;
	text-decoration: none;
	border: 1px solid #E5E5E5;
	border-radius: 4px;
	font-size: 14px;
	min-width: 40px;
	text-align: center;
}

.woocommerce-pagination ul li a:hover {
	background: #DC9814;
	color: #fff;
	border-color: #DC9814;
}

.woocommerce-pagination ul li span.current {
	background: #DC9814;
	color: #fff;
	border-color: #DC9814;
	font-weight: 600;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
	.account-funds-balance-card {
		padding: 20px;
	}

	.account-funds-balance-card .balance-amount {
		font-size: 28px;
	}

	.account-funds-balance-card .balance-breakdown {
		flex-direction: column;
		gap: 8px;
		text-align: center;
	}

	/* Stack table cells vertically on mobile */
	.my_account_transactions thead {
		display: none;
	}

	.my_account_transactions tbody tr {
		display: block;
		margin-bottom: 20px;
		border: 1px solid #E5E5E5;
		border-radius: 8px;
		padding: 15px;
	}

	.my_account_transactions tbody td {
		display: block;
		padding: 8px 0;
		border: none;
		text-align: left;
	}

	.my_account_transactions tbody td:before {
		content: attr(data-title) ": ";
		font-weight: 600;
		color: #282828;
		display: block;
		margin-bottom: 4px;
	}

	.transaction-type-badge {
		margin-top: 5px;
	}
}

/* ==========================================================================
   Section Headings
   ========================================================================== */

.woocommerce-MyAccount-account-funds h2 {
	color: #282828;
	font-weight: 600;
	margin-bottom: 20px;
	font-size: 18px;
	margin-top: 40px;
}

.woocommerce-MyAccount-account-funds h2:first-of-type {
	margin-top: 0;
}

/* Balance card label override */
.account-funds-balance-card .balance-label {
	font-size: 14px;
	font-weight: normal;
}

/* ==========================================================================
   Referral Feature - high-contrast Savoy-style conversion panel
   ========================================================================== */

.woocommerce-MyAccount-account-funds .oath-referrals {
	--oath-referral-ink: #181818;
	--oath-referral-paper: #F5F3EF;
	--oath-referral-border: #DEDBD5;
	--oath-referral-muted: #77746F;
	--oath-referral-accent: #9A651D;
	margin: 0 0 46px;
}

.woocommerce-MyAccount-account-funds .oath-referrals,
.woocommerce-MyAccount-account-funds .oath-referrals * {
	box-sizing: border-box;
}

.woocommerce-MyAccount-account-funds .oath-referral-card {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
	overflow: hidden;
	min-height: 410px;
	background: #FFFFFF;
	border: 1px solid var(--oath-referral-ink);
	border-radius: 10px;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.woocommerce-MyAccount-account-funds .oath-referral-offer,
.woocommerce-MyAccount-account-funds .oath-referral-action {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(34px, 4.5vw, 54px);
}

.woocommerce-MyAccount-account-funds .oath-referral-offer {
	background: var(--oath-referral-ink);
	color: #FFFFFF;
}

.woocommerce-MyAccount-account-funds .oath-referral-action {
	background: var(--oath-referral-paper);
	color: var(--oath-referral-ink);
}

.woocommerce-MyAccount-account-funds .oath-referral-eyebrow {
	margin: 0 0 20px;
	color: inherit;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.woocommerce-MyAccount-account-funds .oath-referral-offer .oath-referral-eyebrow {
	color: rgba(255, 255, 255, 0.64);
}

.woocommerce-MyAccount-account-funds .oath-referral-action .oath-referral-eyebrow {
	color: var(--oath-referral-accent);
}

.woocommerce-MyAccount-account-funds .oath-referral-title {
	margin: 0;
	color: #FFFFFF;
	font-size: clamp(40px, 4.25vw, 60px);
	font-weight: 500;
	line-height: 0.98;
	letter-spacing: -0.045em;
}

.woocommerce-MyAccount-account-funds .oath-referral-reward-line {
	display: block;
}

.woocommerce-MyAccount-account-funds .oath-referral-reward-line + .oath-referral-reward-line {
	margin-top: 8px;
}

.woocommerce-MyAccount-account-funds .oath-referral-reward-amount,
.woocommerce-MyAccount-account-funds .oath-referral-reward-amount .amount,
.woocommerce-MyAccount-account-funds .oath-referral-summary .amount {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.woocommerce-MyAccount-account-funds .oath-referral-summary {
	max-width: 410px;
	margin: 24px 0 30px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
	line-height: 1.65;
}

.woocommerce-MyAccount-account-funds .oath-referral-summary .amount {
	color: #FFFFFF;
	font-weight: 600;
}

.woocommerce-MyAccount-account-funds .oath-referral-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
	padding: 22px 0 0;
	border-top: 1px solid rgba(255, 255, 255, 0.17);
	list-style: none;
}

.woocommerce-MyAccount-account-funds .oath-referral-steps li {
	min-width: 0;
	margin: 0;
	padding: 0 10px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 11px;
	line-height: 1.4;
}

.woocommerce-MyAccount-account-funds .oath-referral-steps li:first-child {
	padding-left: 0;
}

.woocommerce-MyAccount-account-funds .oath-referral-steps li + li {
	border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.woocommerce-MyAccount-account-funds .oath-referral-steps li > span {
	display: block;
	margin-bottom: 8px;
	color: rgba(255, 255, 255, 0.42);
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.14em;
}

.woocommerce-MyAccount-account-funds .oath-referral-action h3 {
	margin: 0 0 12px;
	color: var(--oath-referral-ink);
	font-size: clamp(27px, 2.3vw, 34px);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.025em;
}

.woocommerce-MyAccount-account-funds .oath-referral-action-copy {
	margin: 0 0 28px;
	color: var(--oath-referral-muted);
	font-size: 14px;
	line-height: 1.6;
}

.woocommerce-MyAccount-account-funds .oath-referral-invite-form {
	margin: 0;
}

.woocommerce-MyAccount-account-funds .oath-referral-invite-form > label {
	display: block;
	margin: 0 0 9px;
	color: var(--oath-referral-ink);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.woocommerce-MyAccount-account-funds .oath-referral-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.woocommerce-MyAccount-account-funds .oath-referral-fields input.input-text {
	width: 100%;
	min-width: 0;
	height: 52px;
	margin: 0;
	padding: 0 16px;
	background: #FFFFFF;
	color: var(--oath-referral-ink);
	border: 1px solid #C9C5BE;
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
}

.woocommerce-MyAccount-account-funds .oath-referral-fields input.input-text::placeholder {
	color: #A09C95;
}

.woocommerce-MyAccount-account-funds .oath-referral-fields input.input-text:focus {
	border-color: var(--oath-referral-ink);
	box-shadow: 0 0 0 1px var(--oath-referral-ink);
	outline: none;
}

.woocommerce-MyAccount-account-funds .oath-referral-fields button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	height: 52px;
	margin: 0;
	padding: 0 21px;
	background: var(--oath-referral-ink);
	color: #FFFFFF;
	border: 1px solid var(--oath-referral-ink);
	border-radius: 0;
	box-shadow: none;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 160ms ease, border-color 160ms ease;
}

.woocommerce-MyAccount-account-funds .oath-referral-fields button.button:hover,
.woocommerce-MyAccount-account-funds .oath-referral-fields button.button:focus {
	background: var(--oath-referral-accent);
	color: #FFFFFF;
	border-color: var(--oath-referral-accent);
}

.woocommerce-MyAccount-account-funds .oath-referral-fields button.button:disabled,
.woocommerce-MyAccount-account-funds .oath-referral-fields input.input-text:disabled {
	cursor: not-allowed;
	opacity: 0.46;
}

.woocommerce-MyAccount-account-funds .oath-referral-slots {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
	color: var(--oath-referral-muted);
	font-size: 12px;
	line-height: 1.4;
}

.woocommerce-MyAccount-account-funds .oath-referral-slots-dot {
	width: 6px;
	height: 6px;
	flex: 0 0 6px;
	background: var(--oath-referral-accent);
	border-radius: 50%;
}

.woocommerce-MyAccount-account-funds .oath-referral-history {
	margin-top: 34px;
	padding-top: 30px;
	border-top: 1px solid #E5E5E5;
}

.woocommerce-MyAccount-account-funds .oath-referral-history-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 16px;
}

.woocommerce-MyAccount-account-funds .oath-referral-history-heading h3 {
	margin: 0;
	color: var(--oath-referral-ink);
	font-size: 20px;
	font-weight: 600;
}

.woocommerce-MyAccount-account-funds .oath-referral-history-heading p,
.woocommerce-MyAccount-account-funds .oath-referral-invites-capped {
	margin: 0;
	color: var(--oath-referral-muted);
	font-size: 12px;
}

.woocommerce-MyAccount-account-funds table.oath-referral-invites {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: transparent;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites thead th {
	padding: 12px 10px;
	background: transparent;
	color: var(--oath-referral-muted);
	border: 0;
	border-bottom: 1px solid #DADADA;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-align: left;
	text-transform: uppercase;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites tbody td {
	padding: 16px 10px;
	color: #5F5F5F;
	border: 0;
	border-bottom: 1px solid #ECECEC;
	font-size: 13px;
	vertical-align: middle;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-email {
	color: var(--oath-referral-ink);
	font-weight: 500;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-actions {
	text-align: right;
	white-space: nowrap;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-actions form {
	display: inline-block;
	margin: 2px 0 2px 6px;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-actions .button {
	margin: 0;
	padding: 7px 10px;
	background: transparent;
	color: var(--oath-referral-ink);
	border: 1px solid #D1D1D1;
	border-radius: 0;
	box-shadow: none;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-actions .button:hover,
.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-actions .button:focus {
	background: var(--oath-referral-ink);
	color: #FFFFFF;
	border-color: var(--oath-referral-ink);
}

.woocommerce-MyAccount-account-funds .oath-referral-status {
	display: inline-block;
	padding: 5px 8px;
	background: #EFEFEF;
	color: #5F5F5F;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.woocommerce-MyAccount-account-funds .oath-referral-invite--sent .oath-referral-status {
	background: #F5EEE2;
	color: #85601F;
}

.woocommerce-MyAccount-account-funds .oath-referral-invite--credited .oath-referral-status {
	background: #E8F0E6;
	color: #3F693A;
}

.woocommerce-MyAccount-account-funds .oath-referral-invite--revoked .oath-referral-status {
	background: #F3E6E6;
	color: #8B4646;
}

.woocommerce-MyAccount-account-funds .oath-referral-invites-capped {
	margin-top: 14px;
	text-align: right;
}

@media screen and (max-width: 900px) {
	.woocommerce-MyAccount-account-funds .oath-referral-card {
		grid-template-columns: 1fr;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-offer,
	.woocommerce-MyAccount-account-funds .oath-referral-action {
		padding: 38px;
	}
}

@media screen and (max-width: 600px) {
	.woocommerce-MyAccount-account-funds .oath-referrals {
		margin-bottom: 36px;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-card {
		border-radius: 6px;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-offer,
	.woocommerce-MyAccount-account-funds .oath-referral-action {
		padding: 30px 24px;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-title {
		font-size: 40px;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-fields {
		grid-template-columns: 1fr;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-fields button.button {
		width: 100%;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-history-heading {
		display: block;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-history-heading p {
		margin-top: 7px;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites thead {
		display: none;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites tbody tr {
		display: block;
		margin-bottom: 14px;
		padding: 12px 14px;
		border: 1px solid #E3E3E3;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites tbody td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 16px;
		padding: 7px 0;
		border: 0;
		text-align: right;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites tbody td::before {
		content: attr(data-title);
		color: var(--oath-referral-muted);
		font-size: 10px;
		font-weight: 600;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites tbody td.invite-actions {
		display: block;
		padding-top: 10px;
		text-align: left;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites tbody td.invite-actions::before {
		display: none;
	}

	.woocommerce-MyAccount-account-funds .oath-referral-invites .invite-actions form {
		margin: 2px 6px 2px 0;
	}
}
