/* =============================================================
   Jumper Club — Shared frontend styles
   Loaded on: /klub/, /klub/{slug}/, /klub/{slug}/panel/,
              /rejestracja-klubu/, My Account (moje-projekty, moj-klub)
   Uses Woodmart CSS variables for full theme consistency.
   ============================================================= */

/* Club pages: Woodmart page-title section is suppressed via PHP — compensate so content
   clears the fixed navbar. Uses --wd-header-h set by Woodmart JS (fallback: 80px). */
.jclub-page .main-page-wrapper {
	padding-top: var(--wd-header-h, 80px);
}

/* ---- Container ---- */
.jclub-page-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 16px 40px;
}



/* ---- Lead text ---- */
.jclub-lead {
	font-size: 15px;
	color: var(--wd-text-color, #555);
	margin-bottom: 28px;
	line-height: 1.6;
}

/* ---- Notice boxes ---- */
.jclub-notice {
	padding: 18px 22px;
	border-radius: var(--wd-brd-radius, 4px);
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.6;
}
.jclub-notice--warning {
	background: #fff8e1;
	border: 1px solid #ffe082;
	color: #6d4c00;
}
.jclub-notice--success {
	background: #e9f8ee;
	border: 1px solid #b8dfc6;
	color: #155724;
}
.jclub-notice--error {
	background: #fde8e8;
	border: 1px solid #f5c6cb;
	color: #721c24;
}
.jclub-notice--info {
	background: var(--wd-main-bgcolor, #fff);
	border: 1px solid var(--brdcolor-gray-200, #eee);
	color: var(--wd-text-color, #555);
}
.jclub-notice-title {
	font-weight: 600;
	font-size: 16px;
	margin: 0 0 6px;
	display: block;
	color: inherit;
}

/* ---- Form fields ---- */
.jclub-form-field {
	margin-bottom: 16px;
}
.jclub-form-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--wd-title-color, #333);
	font-size: 14px;
}
.jclub-form-input {
	width: 100%;
	padding: 10px 12px;
	box-sizing: border-box;
	border: 1px solid var(--brdcolor-gray-300, #ddd);
	border-radius: var(--wd-brd-radius, 4px);
	font-size: 14px;
	color: var(--wd-title-color, #333);
	background: var(--wd-main-bgcolor, #fff);
	font-family: inherit;
	transition: border-color 0.15s;
}
.jclub-form-input:focus {
	border-color: var(--wd-primary-color, #83b735);
	outline: none;
}

/* ---- Back link ---- */
.jclub-back-link {
	display: inline-block;
	margin-top: 24px;
	font-size: 13px;
	color: var(--wd-text-color, #555);
	text-decoration: none;
}
.jclub-back-link:hover {
	color: var(--wd-primary-color, #83b735);
}

/* ---- Club directory grid ---- */
.jclub-directory-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}
.jclub-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 180px;
	padding: 20px 16px;
	border: 1px solid var(--brdcolor-gray-300, #ddd);
	border-radius: var(--wd-brd-radius, 4px);
	background: var(--wd-main-bgcolor, #fff);
	text-decoration: none;
	color: var(--wd-title-color, #333);
	transition: box-shadow 0.2s, border-color 0.2s;
	text-align: center;
}
.jclub-card:hover {
	border-color: var(--wd-primary-color, #83b735);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.jclub-card-logo {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-gray-100, #f0f0f0);
	flex-shrink: 0;
}
.jclub-card-logo img {
	width: 80px;
	height: 80px;
	object-fit: cover;
}
.jclub-logo-placeholder {
	font-size: 28px;
	font-weight: 700;
	color: var(--wd-primary-color, #83b735);
}
.jclub-card-name {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}

/* ---- Club public store header ---- */
.jclub-store-header {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--brdcolor-gray-200, #eee);
}
.jclub-store-logo {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-gray-100, #f0f0f0);
	flex-shrink: 0;
}
.jclub-store-logo img {
	width: 80px;
	height: 80px;
	object-fit: cover;
}
.jclub-store-subtitle {
	color: var(--wd-text-color, #555);
	margin: 0;
	font-size: 14px;
}

/* Price badge */
.jclub-price {
	font-weight: 700;
	color: var(--wd-primary-color, #83b735);
	font-size: 15px;
}

/* ---- Nagłówek z tytułem i przyciskiem "Nowy projekt" ---- */
.jcfg-my-designs-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}
.jcfg-my-designs-header h2 {
	margin: 0;
}
.jcfg-action-new-project {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	padding-left: 18px !important;
	padding-right: 18px !important;
	flex-shrink: 0;
}

/* ---- Design card grid (shared: my-designs + club store) ---- */
.jcfg-my-designs {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 30px;
	margin-top: 0;
}
@media ( max-width: 1024px ) {
	.jcfg-my-designs { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 576px ) {
	.jcfg-my-designs { grid-template-columns: 1fr; }
}
.jcfg-design-card {
	border: 1px solid var(--brdcolor-gray-300, rgba(0,0,0,.105));
	border-radius: var(--wd-brd-radius, 4px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: var(--wd-main-bgcolor, #fff);
	line-height: 1.4;
}
.jcfg-design-preview {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-gray-100, #f7f7f7);
	overflow: hidden;
}
.jcfg-design-preview img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.jcfg-no-preview {
	color: var(--color-gray-500, #767676);
	font-size: inherit;
}
.jcfg-design-info {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: var(--wd-prod-gap, 12px);
	font-size: inherit;
	line-height: 1.4;
	flex: 1;
}
.jcfg-design-title {
	font-size: inherit;
	font-family: var(--wd-entities-title-font, inherit);
	font-weight: var(--wd-entities-title-font-weight, 600);
	font-style: var(--wd-entities-title-font-style, normal);
	text-transform: var(--wd-entities-title-transform, none);
	color: var(--wd-entities-title-color, #333);
	word-break: break-word;
}
.jcfg-product-name {
	color: var(--color-gray-500, #767676);
	font-size: 95%;
}
.jcfg-label {
	font-weight: 500;
	color: var(--color-gray-400, #a5a5a5);
	font-size: 90%;
	text-transform: uppercase;
	margin-right: 2px;
}
.jcfg-date {
	color: var(--color-gray-400, #a5a5a5);
	font-size: 90%;
}
.jcfg-design-actions {
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-top: 1px solid var(--brdcolor-gray-200, #eee);
}
.jcfg-design-actions .button {
	text-align: center;
	width: 100%;
	box-sizing: border-box;
	border-radius: var(--btn-accented-brd-radius, var(--wd-brd-radius, 4px));
	text-transform: var(--btn-accented-transform, var(--btn-transform, uppercase));
	font-weight: var(--btn-accented-font-weight, var(--btn-font-weight, 600));
	font-family: var(--btn-accented-font-family, var(--btn-font-family, inherit));
}

/* Button variants for design cards */
.jcfg-action-edit {
	background: var(--wd-main-bgcolor, #fff) !important;
	border-color: var(--brdcolor-gray-300, rgba(0, 0, 0, 0.15)) !important;
	color: var(--wd-title-color, #333) !important;
}
.jcfg-action-edit:hover {
	border-color: var(--wd-primary-color, #83b735) !important;
	color: var(--wd-primary-color, #83b735) !important;
	background: var(--wd-main-bgcolor, #fff) !important;
}
.jcfg-action-order {
	background: var(--btn-accented-bgcolor, var(--wd-primary-color, #83b735)) !important;
	border-color: var(--btn-accented-bgcolor, var(--wd-primary-color, #83b735)) !important;
	color: var(--btn-accented-color, #fff) !important;
	box-shadow: var(--btn-accented-box-shadow, none);
}
.jcfg-action-order:hover {
	background: var(--btn-accented-bgcolor-hover, var(--wd-primary-color, #6a9628)) !important;
	border-color: var(--btn-accented-bgcolor-hover, var(--wd-primary-color, #6a9628)) !important;
	color: var(--btn-accented-color-hover, #fff) !important;
}
.jcfg-action-delete {
	color: #c0392b !important;
	border-color: #c0392b !important;
	background: var(--wd-main-bgcolor, #fff) !important;
}
.jcfg-action-delete:hover {
	background: #c0392b !important;
	color: #fff !important;
	border-color: #c0392b !important;
}

/* ---- Pagination ---- */
.jcfg-pagination {
	margin-top: 20px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
}
.jcfg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--brdcolor-gray-300, #ddd);
	border-radius: var(--wd-brd-radius, 4px);
	color: var(--wd-text-color, #555);
	text-decoration: none;
	font-size: 13px;
	background: var(--wd-main-bgcolor, #fff);
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.jcfg-pagination .page-numbers:hover {
	border-color: var(--wd-primary-color, #83b735);
	color: var(--wd-primary-color, #83b735);
}
.jcfg-pagination .page-numbers.current {
	background: var(--wd-primary-color, #83b735);
	border-color: var(--wd-primary-color, #83b735);
	color: var(--btn-accented-color, #fff);
	pointer-events: none;
}

/* ---- Order modal (shared: my-designs + club-public-store) ---- */
#jcfg-mydesigns-order-modal,
#jclub-order-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.jcfg-mydesigns-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}
.jcfg-mydesigns-box {
	position: relative;
	background: #111;
	color-scheme: dark;
	border-radius: var(--wd-brd-radius, 4px);
	padding: 28px 32px;
	width: 360px;
	max-width: calc(100vw - 32px);
	z-index: 1;
	text-align: center;
	color: #f0f0f0;
}
.jcfg-mydesigns-box h3 {
	margin: 0 0 24px;
	font-family: var(--wd-widget-title-font, var(--wd-title-font, inherit));
	font-size: 20px;
	font-weight: 700;
	color: #fff;
}
.jcfg-mydesigns-size-select-wrap {
	margin-bottom: 20px;
}
.jcfg-mydesigns-size-select {
	width: 100%;
	height: 48px;
	padding: 0 40px 0 14px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background-color: #1e1e1e;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	border: 2px solid #444;
	border-radius: var(--wd-brd-radius, 4px);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
	outline: none;
}
.jcfg-mydesigns-size-select:hover {
	border-color: var(--wd-primary-color, #83b735);
}
.jcfg-mydesigns-size-select:focus {
	border-color: var(--wd-primary-color, #83b735);
	box-shadow: 0 0 0 3px rgba(198, 253, 1, 0.2);
}

.jcfg-mydesigns-size-select option {
	background-color: #1e1e1e;
	color: #fff;
}
.jcfg-mydesigns-size-select option:checked {
	background-color: rgb(198,253,1);
	color: #111;
}
.jcfg-mydesigns-qty-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 24px;
	color: #ddd;
	font-size: 14px;
}
.jcfg-mydesigns-qty-controls {
	display: flex;
	align-items: center;
	gap: 4px;
}
.jcfg-mydesigns-qty-controls button {
	width: 34px;
	height: 34px;
	border: 1px solid #444;
	background: #1e1e1e;
	color: #ddd;
	cursor: pointer;
	font-size: 18px;
	border-radius: var(--wd-brd-radius, 4px);
	line-height: 1;
}
.jcfg-mydesigns-qty-controls button:hover {
	background: var(--color-gray-200, #e8e8e8);
}
#jcfg-mydesigns-qty,
#jclub-qty {
	width: 60px;
	height: 34px;
	text-align: center;
	border: 1px solid #ccc;
	border-radius: var(--wd-brd-radius, 4px);
	font-size: 15px;
	color: #fff;
	background: #1e1e1e;
}
.jcfg-mydesigns-actions {
	display: flex;
	gap: 10px;
}
.jcfg-mydesigns-actions .button {
	flex: 1;
	text-align: center;
}

/* Confirm button ready state (active = size selected) */
@keyframes jcfg-md-ready {
	0%   { transform: scale(0.97); box-shadow: 0 0 0 0 rgba(131, 183, 53, 0.5); }
	60%  { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(131, 183, 53, 0.2); }
	100% { transform: scale(1);    box-shadow: 0 0 0 3px rgba(131, 183, 53, 0.35); }
}

/* Confirm button disabled — lime z opacją (jasna wskazówka dla użytkownika) */
#jcfg-mydesigns-confirm[disabled],
#jclub-order-confirm[disabled] {
	background-color: var(--btn-accented-bgcolor, var(--wd-primary-color, rgb(198,253,1))) !important;
	border-color: var(--btn-accented-bgcolor, var(--wd-primary-color, rgb(198,253,1))) !important;
	color: #333 !important;
	opacity: 0.4;
}
#jcfg-mydesigns-confirm:not([disabled]),
#jclub-order-confirm:not([disabled]) {
	background-color: var(--btn-accented-bgcolor, var(--wd-primary-color, #83b735)) !important;
	border-color: var(--btn-accented-bgcolor, var(--wd-primary-color, #83b735)) !important;
	color: var(--btn-accented-color, #fff) !important;
	box-shadow: 0 0 0 3px rgba(131, 183, 53, 0.35);
	animation: jcfg-md-ready 0.3s ease;
}
#jcfg-mydesigns-confirm:not([disabled]):hover,
#jclub-order-confirm:not([disabled]):hover {
	background-color: var(--btn-accented-bgcolor-hover, var(--wd-primary-color, #6a9628)) !important;
	border-color: var(--btn-accented-bgcolor-hover, var(--wd-primary-color, #6a9628)) !important;
	color: var(--btn-accented-color-hover, #fff) !important;
}
#jcfg-mydesigns-status.error,
#jclub-order-status.error {
	color: #c0392b;
}

/* ---- Club manager panel table ---- */
.jclub-products-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 14px;
}
.jclub-products-table th {
	background: var(--color-gray-100, #f5f5f5);
	font-family: var(--wd-widget-title-font, var(--wd-title-font, inherit));
	font-weight: 700;
	padding: 10px 12px;
	text-align: left;
	border-bottom: 2px solid var(--brdcolor-gray-300, #ddd);
	color: var(--wd-title-color, #333);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
}
.jclub-products-table td {
	padding: 10px 12px;
	vertical-align: middle;
	border-bottom: 1px solid var(--brdcolor-gray-200, #eee);
	color: var(--wd-text-color, #555);
}
.jclub-preview-img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	background: var(--color-gray-100, #f5f5f5);
	border-radius: var(--wd-brd-radius, 4px);
}
.jclub-status-draft {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	background: #fff3cd;
	color: #856404;
	font-size: 12px;
	font-weight: 600;
}
.jclub-status-published {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	background: #d1edda;
	color: #155724;
	font-size: 12px;
	font-weight: 600;
}
.jclub-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

/* ---- Icon action buttons ---- */
.jclub-actions .jclub-icon-btn {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	max-width: 34px !important;
	max-height: 34px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid #555 !important;
	border-radius: var(--wd-brd-radius, 4px);
	background: #2a2a2a !important;
	color: #ccc !important;
	cursor: pointer;
	text-decoration: none;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
	flex-shrink: 0;
	font-size: 0;
	line-height: 1;
}
.jclub-actions .jclub-icon-btn:hover {
	border-color: var(--wd-primary-color, rgb(198,253,1)) !important;
	background: var(--wd-primary-color, rgb(198,253,1)) !important;
	color: #111 !important;
	text-decoration: none;
}
.jclub-actions .jclub-icon-btn svg {
	pointer-events: none;
	display: block;
	width: 16px;
	height: 16px;
	stroke: currentColor;
}
.jclub-actions .jclub-icon-btn.jclub-delete-btn {
	color: #e07070 !important;
	border-color: rgba(192, 57, 43, 0.7) !important;
}
.jclub-actions .jclub-icon-btn.jclub-delete-btn:hover {
	background: #c0392b !important;
	border-color: #c0392b !important;
	color: #fff !important;
}
.jclub-actions .jclub-icon-btn.jclub-icon-btn--active {
	background: var(--wd-primary-color, rgb(198,253,1)) !important;
	border-color: var(--wd-primary-color, rgb(198,253,1)) !important;
	color: #111 !important;
}
.jclub-actions .jclub-icon-btn.jclub-icon-btn--active:hover {
	opacity: 0.75;
}

/* Tooltip */
.jclub-icon-btn::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.82);
	color: #fff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
	z-index: 200;
}
.jclub-icon-btn:hover::after {
	opacity: 1;
}

/* Panel notice bar */
#jclub-panel-notice {
	padding: 12px 16px;
	border-radius: var(--wd-brd-radius, 4px);
	margin-bottom: 20px;
	font-size: 14px;
}
#jclub-panel-notice.success {
	background: #e9f8ee;
	border: 1px solid #b8dfc6;
	color: #155724;
}
#jclub-panel-notice.error {
	background: #fde8e8;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* ---- Registration page ---- */
.jclub-benefits-list {
	list-style: none;
	padding: 0;
	margin: 0 0 40px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.jclub-benefits-list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 15px;
	color: var(--wd-text-color, #333);
}
.jclub-benefit-check {
	color: var(--wd-primary-color, #83b735);
	font-size: 20px;
	line-height: 1;
	flex-shrink: 0;
}

/* ---- My Club: approved state card ---- */
.jclub-approved-card {
	padding: 24px 28px;
	background: var(--wd-main-bgcolor, #fff);
	border: 1px solid var(--brdcolor-gray-200, #eee);
	border-radius: var(--wd-brd-radius, 4px);
	max-width: 560px;
}
.jclub-approved-card__label {
	margin: 0 0 6px;
	font-size: 12px;
	color: var(--wd-text-color, #777);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.jclub-approved-card__name {
	margin: 0 0 24px;
	font-size: 20px;
	font-weight: 700;
	color: var(--wd-title-color, #333);
}
.jclub-approved-card__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
