/**
 * Pixely WooCommerce Affiliates — front-end (affiliate dashboard) styles.
 */

.pwcaf-frontend {
	--pwcaf-accent: #2271b1;
	font-size: 15px;
}

.pwcaf-notice {
	padding: 10px 14px;
	border-radius: 6px;
	margin: 0 0 16px;
}

.pwcaf-notice--success {
	background: #e6f4ea;
	color: #14683b;
}

.pwcaf-notice--error {
	background: #fbe0e0;
	color: #9b1c1c;
}

/* Dashboard layout: nav + content. */
.pwcaf-dashboard__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	border-bottom: 1px solid #e2e2e2;
}

.pwcaf-dashboard__nav li {
	margin: 0;
}

.pwcaf-dashboard__nav a {
	display: inline-block;
	padding: 10px 16px;
	text-decoration: none;
	color: #444;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.pwcaf-dashboard__nav li.is-active a {
	color: var(--pwcaf-accent);
	border-bottom-color: var(--pwcaf-accent);
	font-weight: 600;
}

/* Summary cards. */
.pwcaf-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin: 0 0 24px;
}

.pwcaf-card {
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pwcaf-card__value {
	font-size: 20px;
	font-weight: 700;
	color: #1f2933;
}

.pwcaf-card__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #6b7280;
}

/* Tables. */
.pwcaf-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 18px;
}

.pwcaf-table th,
.pwcaf-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #ededed;
}

.pwcaf-table thead th {
	background: #f6f7f7;
	font-size: 13px;
}

.pwcaf-empty {
	padding: 22px;
	background: #fafafa;
	border-radius: 8px;
	text-align: center;
	color: #6b7280;
}

/* Fields & forms. */
.pwcaf-field {
	margin: 0 0 14px;
}

.pwcaf-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.pwcaf-field input[type="text"],
.pwcaf-field input[type="email"],
.pwcaf-field input[type="url"],
.pwcaf-field input[type="number"] {
	width: 100%;
	max-width: 420px;
	padding: 8px 10px;
}

.pwcaf-field--check label {
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Copy field. */
.pwcaf-copy {
	display: flex;
	max-width: 520px;
}

.pwcaf-copy__target {
	flex: 1;
}

/* Share buttons. */
.pwcaf-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

.pwcaf-share__btn {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 5px;
	background: var(--pwcaf-accent);
	color: #fff !important;
	text-decoration: none;
	font-size: 13px;
}

.pwcaf-share__btn--facebook { background: #1877f2; }
.pwcaf-share__btn--x        { background: #111; }
.pwcaf-share__btn--whatsapp { background: #25d366; }
.pwcaf-share__btn--telegram { background: #0088cc; }
.pwcaf-share__btn--linkedin { background: #0a66c2; }
.pwcaf-share__btn--email    { background: #555; }

/* Withdraw box. */
.pwcaf-withdraw {
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 16px 18px;
	margin: 0 0 24px;
}

.pwcaf-withdraw h3 {
	margin-top: 0;
}

.pwcaf-pagination {
	margin: 12px 0;
}

.pwcaf-pagination .page-numbers {
	padding: 4px 9px;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-right: 3px;
	text-decoration: none;
}

.pwcaf-pagination .page-numbers.current {
	background: var(--pwcaf-accent);
	color: #fff;
	border-color: var(--pwcaf-accent);
}

.pwcaf-moderation-message {
	background: #fff8e5;
	border-left: 3px solid #d98500;
	padding: 10px 14px;
}

.pwcaf-current-affiliate {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pwcaf-current-affiliate img {
	border-radius: 50%;
}

/* QR code block. */
.pwcaf-qr {
	margin: 22px 0;
	text-align: center;
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 8px;
	padding: 18px;
	max-width: 380px;
}

.pwcaf-qr img {
	display: block;
	margin: 0 auto 10px;
	background: #fff;
	padding: 8px;
	border-radius: 6px;
}

/* "My coupon" box (read-only). */
.pwcaf-coupon-box {
	max-width: 460px;
	background: #fafafa;
	border: 2px dashed #c9def0;
	border-radius: 10px;
	padding: 22px;
	text-align: center;
}

.pwcaf-coupon-box__code .pwcaf-copy {
	margin: 0 auto;
}

.pwcaf-coupon-box__code input {
	font-size: 20px;
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.06em;
}

.pwcaf-coupon-box__promo {
	font-size: 17px;
	font-weight: 600;
	color: #14683b;
	margin: 10px 0 4px;
}
