/* Inter Club Albania Membership Checker */

.imc-wrap {
	box-sizing: border-box;
	max-width: 920px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	color: #1a1a1a;
}

.imc-layout {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	align-items: stretch;
}

.imc-layout--checker-only {
	max-width: 520px;
	margin-left: auto;
	margin-right: auto;
}

.imc-layout--checker-only .imc-card {
	max-width: none;
}

@media (min-width: 768px) {
	.imc-layout:not(.imc-layout--checker-only) {
		flex-direction: row;
		align-items: flex-start;
	}

	.imc-layout:not(.imc-layout--checker-only) .imc-card {
		flex: 1 1 420px;
		max-width: 480px;
	}

	.imc-layout:not(.imc-layout--checker-only) .imc-leaderboard-card {
		flex: 1 1 320px;
		min-width: 280px;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		/* Explicit height is set by JS to match the checker card.
		   overflow:hidden clips any content before JS fires. */
	}
}

.imc-wrap *,
.imc-wrap *::before,
.imc-wrap *::after {
	box-sizing: border-box;
}

.imc-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 2rem 2rem 1.75rem;
	text-align: center;
}

.imc-logo {
	margin: 0 auto 1.25rem;
	width: 120px;
	height: 120px;
}

.imc-logo img {
	display: block;
	width: 120px;
	height: 120px;
	object-fit: contain;
	border-radius: 50%;
}

.imc-logo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: linear-gradient(145deg, #0a1628 0%, #1e3a5f 50%, #0a1628 100%);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
}

.imc-logo-text {
	text-align: center;
}

.imc-title {
	margin: 0 0 1rem;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.35;
	text-transform: uppercase;
}

.imc-description {
	margin: 0 0 1.5rem;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #333;
}

.imc-form {
	text-align: left;
}

.imc-label {
	display: block;
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #1a1a1a;
	text-align: left;
}

.imc-required {
	color: #c00;
	font-weight: 700;
}

.imc-input {
	display: block;
	width: 100%;
	padding: 8px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
	font-size: 1rem;
	background: #fff;
	color: #1a1a1a;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.imc-input:focus {
	outline: none;
	border-color: #0a1628;
	box-shadow: 0 0 0 3px rgba(10, 22, 40, 0.12);
}

.imc-hint {
	margin: 0.5rem 0 1.25rem;
	font-size: 0.8rem;
	color: #6b7280;
}

.imc-button {
	display: block;
	width: 100%;
	padding: 0.9rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background: #001EA0;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.imc-button:hover:not(:disabled) {
	background: #2d49c5;
}

.imc-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.imc-result {
	margin-top: 1.25rem;
	padding: 1rem 1.1rem;
	background: #f3f4f6;
	border-radius: 8px;
	text-align: left;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #1a1a1a;
	overflow: visible;
}

.imc-result p {
	margin: 0 0 0.35rem;
}

.imc-result p:last-child {
	margin-bottom: 0;
}

.imc-result--error {
	background: #fef2f2;
	color: #991b1b;
}

.imc-result--not-found .imc-join-link {
	display: inline-block;
	margin-top: 0.5rem;
	color: #001ea0;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	text-decoration: underline;
	text-transform: uppercase;
}

.imc-result--not-found .imc-join-link:hover,
.imc-result--not-found .imc-join-link:focus {
	color: #000;
}

.imc-result-cta {
	margin-top: 0.75rem;
	margin-bottom: 0;
}

.imc-tier-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.85rem;
	text-align: center;
	overflow: visible;
}

.imc-tier-badge__image {
	display: block;
	max-width: 160px;
	width: 100%;
	height: auto;
}

.imc-tier-badge__heading {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
}

.imc-tier-info-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.imc-tier-badge__label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #001ea0;
	line-height: 1.35;
}

.imc-tier-info {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	padding: 0;
	border: 1px solid #001ea0;
	border-radius: 50%;
	background: #fff;
	color: #001ea0;
	font-family: Georgia, 'Times New Roman', serif;
	cursor: pointer;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease;
}

.imc-tier-info:hover,
.imc-tier-info:focus {
	background: #001ea0;
	color: #fff;
	outline: none;
}

.imc-tier-info__icon {
	font-size: 0.65rem;
	font-weight: 700;
	font-style: italic;
	line-height: 1;
}

.imc-tier-popup {
	position: absolute;
	z-index: 20;
	bottom: calc(100% + 0.5rem);
	left: 50%;
	transform: translateX(-50%);
	min-width: 12rem;
	max-width: min(280px, 85vw);
	padding: 0.75rem 1rem;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
	text-align: center;
}

.imc-tier-popup::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 7px solid transparent;
	border-top-color: #fff;
	filter: drop-shadow(0 1px 0 #d1d5db);
}

.imc-tier-popup[hidden] {
	display: none;
}

.imc-tier-message {
	max-width: 100%;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #333;
	text-align: center;
}

.imc-tier-message p {
	margin: 0 0 0.35rem;
}

.imc-tier-message p:last-child {
	margin-bottom: 0;
}

.imc-result-section__title {
	margin: 0 0 0.5rem;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #001ea0;
	line-height: 1.35;
}

.imc-loyalty-rank,
.imc-honors,
.imc-tier-progress {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid #e5e7eb;
	text-align: left;
}

.imc-loyalty-rank__message {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #1a1a1a;
}

.imc-honors__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.imc-honors__item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #1a1a1a;
}

.imc-honors__icon {
	display: block;
	width: 28px;
	height: 28px;
	object-fit: contain;
	flex-shrink: 0;
}

.imc-honors__count {
	font-weight: 700;
	color: #001ea0;
}

.imc-tier-progress__current {
	margin: 0 0 0.65rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a1a1a;
}

.imc-tier-progress__track {
	position: relative;
	margin-bottom: 0.25rem;
	padding-top: 1.9rem;
	padding-bottom: 1.9rem;
}

.imc-tier-progress__bar {
	position: relative;
	height: 0.65rem;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: visible;
}

.imc-tier-progress__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: #001ea0;
	transition: width 0.25s ease;
}

.imc-tier-progress__milestones {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	pointer-events: none;
	overflow: visible;
	z-index: 1;
}

/*
 * Each milestone is sized to exactly the dot (0.75rem × 0.75rem) and
 * centred on its bar position. The label is absolutely positioned above
 * or below the dot so nothing participates in flex/block flow.
 *
 * Bar starts at padding-top (1.9rem). Centre dot on bar:
 *   top = 1.9rem + (bar 0.65rem - dot 0.75rem) / 2 = 1.85rem
 */
.imc-tier-progress__milestone {
	position: absolute;
	top: 1.7rem;
	width: 1rem;
	height: 1rem;
	transform: translateX(-50%);
}

.imc-tier-progress__dot {
	display: block;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #1a1a1a;
	box-sizing: border-box;
	position: relative;
	z-index: 2;
}

.imc-tier-progress__milestone--reached .imc-tier-progress__dot {
	background: #1a1a1a;
	border-color: #1a1a1a;
}

.imc-tier-progress__milestone--current .imc-tier-progress__dot {
	background: #1a1a1a;
	border-color: #1a1a1a;
	box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.2);
}

/* Label sits below the dot by default */
.imc-tier-progress__milestone-label {
	position: absolute;
	top: calc(0.75rem + 0.3rem);
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	font-size: 0.62rem;
	line-height: 1.2;
	color: #6b7280;
	text-align: center;
}

/* Above variant: label flips above the dot */
.imc-tier-progress__milestone--above .imc-tier-progress__milestone-label {
	top: auto;
	bottom: calc(0.75rem + 0.3rem);
}

/* Last milestone (Legend at 100%): right-anchor label so it never overflows */
.imc-tier-progress__milestone--last .imc-tier-progress__milestone-label {
	left: auto;
	right: 0;
	transform: none;
}

.imc-tier-progress__milestone--reached .imc-tier-progress__milestone-label,
.imc-tier-progress__milestone--current .imc-tier-progress__milestone-label {
	color: #001ea0;
	font-weight: 600;
}

/* ---- Milestone popup bubble ---- */

.imc-tier-progress__milestone {
	pointer-events: auto;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
}

.imc-milestone-popup {
	position: absolute;
	z-index: 30;
	bottom: calc(100% + 1.3rem);
	left: 50%;
	transform: translateX(-50%);
	min-width: 10rem;
	max-width: min(220px, 80vw);
	padding: 0.6rem 0.85rem;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.imc-milestone-popup::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #fff;
	filter: drop-shadow(0 1px 0 #d1d5db);
}

.imc-tier-progress__milestone--above .imc-milestone-popup {
	bottom: auto;
	top: calc(100% + 1.3rem);
}

.imc-tier-progress__milestone--above .imc-milestone-popup::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #fff;
	filter: drop-shadow(0 -1px 0 #d1d5db);
}

.imc-tier-progress__milestone--last .imc-milestone-popup {
	left: auto;
	right: 0;
	transform: none;
}

.imc-tier-progress__milestone--last .imc-milestone-popup::after {
	left: auto;
	right: 0.6rem;
	transform: none;
}

.imc-milestone-popup[hidden] {
	display: none;
}

.imc-milestone-popup__title {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	color: #001ea0;
	line-height: 1.3;
}

.imc-milestone-popup__req {
	display: block;
	font-size: 0.78rem;
	color: #4b5563;
	line-height: 1.4;
}

.imc-tier-progress__message {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #4b5563;
}

.imc-member-details {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid #e5e7eb;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.imc-member-details__row {
	display: grid;
	grid-template-columns: minmax(0, 7.5rem) 1fr;
	gap: 0.35rem 0.75rem;
	align-items: baseline;
	font-size: 0.875rem;
	line-height: 1.45;
}

.imc-member-details__row:empty {
	display: none;
}

.imc-member-details__label {
	font-weight: 600;
	color: #6b7280;
}

.imc-member-details__value {
	color: #1a1a1a;
	word-break: break-word;
}

.imc-report-box {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid #e5e7eb;
	text-align: left;
}

.imc-report-toggle {
	display: inline-block;
	padding: 0;
	border: none;
	background: none;
	color: #001ea0;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	line-height: 1.4;
}

.imc-report-toggle:hover,
.imc-report-toggle:focus {
	color: #000;
	outline: none;
}

.imc-report-form-wrap {
	margin-top: 0.75rem;
	padding: 1rem;
	background: #f9f9f9;
	border-radius: 4px;
}

.imc-report-box .ers-form-field {
	margin-bottom: 15px;
}

.imc-report-box .ers-form-field label {
	display: block;
	font-weight: bold;
	margin-bottom: 5px;
}

.imc-report-box .imc-report-input {
	width: 100%;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-sizing: border-box;
	font-size: 0.95rem;
}

.imc-report-box .imc-report-textarea {
	min-height: 5rem;
	resize: vertical;
	font-family: inherit;
	line-height: 1.45;
}

.imc-report-box .ers-form-submit {
	margin-top: 0.5rem;
}

.imc-report-box .ers-button,
.imc-report-box .imc-report-submit {
	display: inline-block;
	padding: 10px 15px;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	background-color: #001ea0;
	border-width: 0;
	text-transform: uppercase;
	border-radius: 0;
}

.imc-report-box .ers-button:hover,
.imc-report-box .imc-report-submit:hover {
	background-color: #000;
	color: #fff;
}

.imc-report-box .ers-button:disabled,
.imc-report-box .imc-report-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.imc-report-box .required {
	color: #e53935;
}

.imc-report-message {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	line-height: 1.45;
}

.imc-report-message--error {
	color: #991b1b;
}

.imc-report-message--success {
	color: #166534;
}

@media (max-width: 480px) {
	.imc-member-details__row {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}

.imc-footer {
	margin-top: 1rem;
	text-align: center;
	font-size: 0.85rem;
	color: #6b7280;
}

.imc-leaderboard-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 1.5rem 1.25rem;
	text-align: left;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.imc-leaderboard-title {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: #1a1a1a;
	flex-shrink: 0;
}

.imc-leaderboard-subtitle {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	color: #6b7280;
	flex-shrink: 0;
}

.imc-leaderboard-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	margin-right: -0.35rem;
	padding-right: 0.35rem;
}

/* Mobile: cap scroll area so long lists don't dominate the page */
@media (max-width: 767px) {
	.imc-leaderboard-card {
		position: static;
	}

	.imc-leaderboard-scroll {
		max-height: min(420px, 55vh);
	}
}

.imc-leaderboard-list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: imc-rank;
}

.imc-leaderboard-item {
	display: grid;
	grid-template-columns: 2rem 1fr auto;
	gap: 0.5rem 0.65rem;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f0f0f1;
	font-size: 0.875rem;
	line-height: 1.35;
}

.imc-leaderboard-item:last-child {
	border-bottom: none;
}

.imc-leaderboard-item--top {
	margin: 0 -0.5rem;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	border-radius: 6px;
	border-bottom-color: transparent;
}

.imc-leaderboard-rank {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #001ea0;
	text-align: center;
}

.imc-leaderboard-item--top .imc-leaderboard-rank {
	color: #001ea0;
}

.imc-leaderboard-name {
	font-weight: 500;
	color: #1a1a1a;
	min-width: 0;
	word-break: break-word;
}

.imc-leaderboard-tier {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #001ea0;
	line-height: 1.3;
}

.imc-leaderboard-tier__badge {
	display: block;
	width: 32px;
	height: 32px;
	object-fit: contain;
	flex-shrink: 0;
}

.imc-leaderboard-tier__icon {
	flex-shrink: 0;
}

.imc-leaderboard-years {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: #50575e;
	white-space: nowrap;
}

.imc-leaderboard-empty {
	margin: 0;
	font-size: 0.875rem;
	color: #6b7280;
}

/* Block editor preview */
.imc-editor-preview {
	padding: 1.5rem;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	text-align: center;
}

.imc-editor-preview__title {
	margin: 0 0 0.5rem;
	font-weight: 600;
}

.imc-editor-preview__desc {
	margin: 0;
	font-size: 0.875rem;
	color: #50575e;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
