/* Responsive card/table toggle for [manage_tags] shortcode */
.medid-manage-tags-cards-wrap {
	display: none;
}
.medid-manage-tags-table-wrap {
	display: block;
}
@media (max-width: 900px) {
	.medid-manage-tags-cards-wrap {
		display: block !important;
	}
	.medid-manage-tags-table-wrap {
		display: none !important;
	}
}
/* Ensure ARMember plan action button has white text */
#arm_cm_plan_action_btn > div > div.arm_cm_renew_btn_div > button {
	color: #fff !important;
}
.medid-team-card--green {
	background: #e6fbe8 !important;
	border-color: #b6e2c1 !important;
}
/* Sub-admin team member cards (mobile) */
.medid-sub-admin-team-cards-wrap {
	display: none;
}
.medid-team-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 10px;
	margin-bottom: 18px;
	padding: 16px;
	box-shadow: 0 2px 8px rgba(1,75,141,0.06);
	font-family: Arial, sans-serif;
}
.medid-team-card-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 14px;
	border: 0 0 1px 0;
}
.medid-team-card-label {
	font-weight: 500;
	color: #000;
	min-width: 90px;
}
.medid-team-card-value {
	font-weight: 600;
	color: #014B8D;
	text-align: right;
	flex: 1;
}
.medid-team-card-row:last-child {
	margin-bottom: 0;
}
.medid-team-card-empty {
	text-align: center;
	color: #666;
	background: #f9f9f9;
	border: 1px dashed #bbb;
	border-radius: 10px;
	padding: 24px 0;
	margin-bottom: 18px;
}
@media (max-width: 900px) {
	.medid-sub-admin-team-table-wrap {
		display: none !important;
	}
	.medid-sub-admin-team-cards-wrap {
		display: block !important;
	}
}
/* Hide ID and USER columns in sub-admin team table on mobile (stronger selector for both th and td) */
@media (max-width: 900px) {
	table.medid-table.medid-sub-admin-team-table th.medid-hide-mobile-id,
	table.medid-table.medid-sub-admin-team-table td.medid-hide-mobile-id,
	table.medid-table.medid-sub-admin-team-table th.medid-hide-mobile-user,
	table.medid-table.medid-sub-admin-team-table td.medid-hide-mobile-user {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
		border: none !important;
	}
}
/* Responsive: Show data-labels as headers for sub-admin team table on mobile */
@media (max-width: 900px) {
	.medid-table.medid-sub-admin-team-table thead {
		display: none;
	}
	.medid-table.medid-sub-admin-team-table tr {
		display: block;
		margin-bottom: 15px;
		border-bottom: 2px solid #eee;
	}
	.medid-table.medid-sub-admin-team-table td {
		display: block;
		width: 100% !important;
		text-align: left !important;
		border: none;
		border-bottom: 1px solid #eee;
		position: relative;
		padding-left: 50% !important;
		box-sizing: border-box;
	}
	.medid-table.medid-sub-admin-team-table td::before {
		content: attr(data-label);
		position: absolute;
  /* Force-hide ID and USER columns in block mode */
  .medid-table.medid-sub-admin-team-table td.medid-hide-mobile-id,
  .medid-table.medid-sub-admin-team-table td.medid-hide-mobile-user {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
		left: 10px;
		top: 10px;
		width: 45%;
		font-weight: bold;
		color: #014B8D;
		white-space: nowrap;
		text-align: left;
	}
}
@media (max-width: 900px) {
	.medid-nfc-urls-wrap {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		overflow-x: hidden;
	}
	.medid-nfc-table {
		width: 100% !important;
		max-width: 100% !important;
	}
	.medid-nfc-table th:nth-child(1),
	.medid-nfc-table td:nth-child(1) { width: 20% !important; }
	.medid-nfc-table th:nth-child(2),
	.medid-nfc-table td:nth-child(2) { width: 20% !important; }
	.medid-nfc-table th:nth-child(4),
	.medid-nfc-table td:nth-child(4) { width: 60% !important; text-align: center !important; vertical-align: middle !important; }
	.medid-nfc-table th:nth-child(3),
	.medid-nfc-table td:nth-child(3) {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
	}
}
/* Hide URL column by class and center actions column on mobile */
@media (max-width: 900px) {
	.medid-manage-tags-table .nfc-url-col {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
	}
	.medid-manage-tags-table .actions-col {
		text-align: center !important;
		vertical-align: middle !important;
	}
}
/* Aggressively hide URL column and prevent horizontal scroll on mobile */
@media (max-width: 900px) {
	.medid-manage-tags-table {
		table-layout: fixed !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
		overflow-x: hidden !important;
		display: table !important;
	}
	.medid-manage-tags-table th:nth-child(3),
	.medid-manage-tags-table td:nth-child(3),
	table.medid-manage-tags-table th:nth-child(3),
	table.medid-manage-tags-table td:nth-child(3) {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
	}
	.medid-table-scroll, .medid-table-scroll table {
		overflow-x: hidden !important;
		min-width: 0 !important;
		max-width: 100% !important;
	}
}
/* Stronger rule to hide NFC URL column in tag management tables on mobile */
@media (max-width: 900px) {
	.medid-manage-tags-table th:nth-child(3),
	.medid-manage-tags-table td:nth-child(3),
	table.medid-manage-tags-table th:nth-child(3),
	table.medid-manage-tags-table td:nth-child(3) {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
	}
}
@media (max-width: 480px) {
	.medid-manage-tags-table th:nth-child(3),
	.medid-manage-tags-table td:nth-child(3),
	table.medid-manage-tags-table th:nth-child(3),
	table.medid-manage-tags-table td:nth-child(3) {
		display: none !important;
		visibility: hidden !important;
		width: 0 !important;
		min-width: 0 !important;
		max-width: 0 !important;
		padding: 0 !important;
	}
}
/* Hide NFC URL column in tag management tables on mobile */
@media (max-width: 768px) {
	.medid-manage-tags-table th:nth-child(3),
	.medid-manage-tags-table td:nth-child(3) {
		display: none !important;
	}
}
/* Force WYSIWYG toolbar icons to white */
.mce-toolbar .mce-ico {
	color: #fff !important;
}
.button,
button,
input[type="submit"],
input[type="button"],
.medid-button,
.medid-button--compact,
.medid-button--full,
.medid-form button,
.medid-tag-actions button,
.medid-tag-actions input[type="submit"],
.medid-nfc-actions button,
.medid-nfc-actions input[type="submit"],
.medid-nfc-copy-btn,
.medid-join-club-button,
.arm_logout_form_container button,
.arm_logout_form_container .arm_logout_button,
.arm_logout_form_container input[type="submit"] {
	background: #014B8D !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	font-weight: 500 !important;
	font-size: 13px !important;
	padding: 5px 8px !important;
	transition: all 0.3s ease !important;
	display: inline-block !important;
	text-align: center !important;
	text-decoration: none !important;
	box-sizing: border-box !important;
	line-height: 1.4 !important;
	width: auto !important;
	white-space: normal !important;
	word-wrap: break-word !important;
	overflow: visible !important;
	text-overflow: clip !important;
	margin: 4px 6px !important;
}
/* MED+ID Shared Table, Form, and Message Styles (moved from plugin for full independence and consistency)
   This stylesheet is used for all MED+ID UI elements, not just NFC/QR. */
.medid-table { width: 100%; border-collapse: collapse; margin-bottom: 0px; }
.medid-table th, .medid-table td,
.medid-nfc-table th, .medid-nfc-table td {
	padding: 12px 8px;
	border: 1px solid #ddd;
	text-align: left;
	vertical-align: middle;
	font-size: 14px;
	font-weight: 500;
}
.medid-manage-tags-table .actions-col { text-align: center; vertical-align: middle; }
.medid-table thead { background: #014B8D; color: #fff; }

/* Reduce padding in ACTIONS column for better fit */

/* Force fixed table layout for NFC table */
.medid-nfc-table {
	table-layout: fixed;
	width: 100%;
}
/* Desktop column widths - CSS-controlled (no inline colgroup styles in HTML) */
.medid-nfc-table th:nth-child(1) { width: 15%; }
.medid-nfc-table th:nth-child(2) { width: 15%; }
.medid-nfc-table th:nth-child(3) { width: 40%; }
.medid-nfc-table th:nth-child(4) { width: 30%; }
.medid-nfc-table td:nth-child(3),
.medid-nfc-table th:nth-child(3) {
	word-break: break-word;
	overflow-wrap: anywhere;
	white-space: normal;
}

.medid-filter-container label {
	display: block !important;
	margin-bottom: 10px !important;
	font-weight: 600 !important;
	color: #333 !important;
	font-size: 14px !important;
}

/* Product Filter Dropdown Styling */
.medid-product-filter {
	display: block !important;
	width: 100% !important;
	padding: 10px 12px !important;
	border: 1px solid #999 !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	background-color: #fff !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
}

.medid-product-filter:hover {
	border-color: #014B8D !important;
	box-shadow: 0 0 0 2px rgba(1, 75, 141, 0.1) !important;
}

.medid-product-filter:focus {
	outline: none !important;
	border-color: #014B8D !important;
	box-shadow: 0 0 0 3px rgba(1, 75, 141, 0.2) !important;
}

.medid-product-filter option {
	padding: 10px !important;
	line-height: 1.5 !important;
	white-space: normal !important;
}

.medid-error { color: #dc3545; background: #ffeef0; padding: 15px; border-radius: 8px; margin-bottom: 25px; text-align: center; border-left: 4px solid #dc3545; }
.medid-success { color: #28a745; background: #f0fff4; padding: 15px; border-radius: 8px; margin-bottom: 25px; text-align: center; border-left: 4px solid #28a745; }

.medid-nfc-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
	justify-content: center;
}

.medid-nfc-actions button {
	min-width: 0 !important;
	font-size: 13px !important;
	box-sizing: border-box !important;
}

.medid-nfc-actions form {
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
}

.medid-tag-actions form {
	margin: 0;
}


/* HOVER state - unified for all buttons */
button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.medid-button:hover,
.medid-button--compact:hover,
.medid-button--full:hover,
.medid-form button:hover,
.medid-tag-actions button:hover,
.medid-tag-actions input[type="submit"]:hover,
.medid-nfc-actions button:hover,
.medid-nfc-actions input[type="submit"]:hover,
.medid-nfc-copy-btn:hover,
.medid-join-club-button:hover,
.arm_logout_form_container button:hover,
.arm_logout_form_container .arm_logout_button:hover,
.arm_logout_form_container input[type="submit"]:hover {
	background: #003f6f !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 2px 8px rgba(1, 75, 141, 0.3) !important;
}

/* ACTIVE/FOCUS state - unified for all buttons */
button:active,
.button:active,
input[type="submit"]:active,
input[type="button"]:active,
.medid-button:active,
.medid-button--compact:active,
.medid-button--full:active,
.medid-form button:active,
.medid-tag-actions button:active,
.medid-tag-actions input[type="submit"]:active,
.medid-nfc-actions button:active,
.medid-nfc-actions input[type="submit"]:active,
.medid-nfc-copy-btn:active,
.medid-join-club-button:active,
.arm_logout_form_container button:active,
.arm_logout_form_container .arm_logout_button:active,
.arm_logout_form_container input[type="submit"]:active,
button:focus,
.button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
.medid-button:focus,
.medid-button--compact:focus,
.medid-button--full:focus,
.medid-form button:focus,
.medid-tag-actions button:focus,
.medid-tag-actions input[type="submit"]:focus,
.medid-nfc-actions button:focus,
.medid-nfc-actions input[type="submit"]:focus,
.medid-nfc-copy-btn:focus,
.medid-join-club-button:focus,
.arm_logout_form_container button:focus,
.arm_logout_form_container .arm_logout_button:focus,
.arm_logout_form_container input[type="submit"]:focus {
	background: #002d52 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(1, 75, 141, 0.2) !important;
}

/* DISABLED state - unified for all buttons */
button:disabled,
.button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
.medid-button:disabled,
.medid-button--compact:disabled,
.medid-button--full:disabled,
.medid-form button:disabled,
.medid-tag-actions button:disabled,
.medid-tag-actions input[type="submit"]:disabled,
.medid-nfc-actions button:disabled,
.medid-nfc-actions input[type="submit"]:disabled,
.medid-nfc-copy-btn:disabled,
.medid-join-club-button:disabled,
.arm_logout_form_container button:disabled,
.arm_logout_form_container .arm_logout_button:disabled,
.arm_logout_form_container input[type="submit"]:disabled {
	opacity: 0.6 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

/* Small text variant for compact spaces */
.medid-button--small-text {
	font-size: 13px !important;
}

.medid-qr-block {
	padding: 16px;
	border: 1px solid #e6e6e6;
	border-radius: 16px;
	background: #fff;
}

.medid-qr-title {
	font-weight: 700;
	font-size: 16px;
	color: #1f2d5a;
	text-align: center;
}

.medid-qr-canvas {
	line-height: 0;
}

/* SECURE: Shortcode field containers (prevents PHI exposure) */
.medid-secure-field-container { margin: 0; padding: 0; }
.medid-field-label { margin: 0 0 8px 0; font-size: 14px; font-weight: 600; }
.medid-field-content { min-height: auto; display: inline-block; width: 100%; }
.medid-loader { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(0, 0, 0, 0.1); border-top-color: #014B8D; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; }

/* NFC URL table wrapper */
.medid-nfc-urls-wrap {
	width: 100%;
}

/* Plan stats table (shared theme styling, no inline overrides) */
.medid-plan-stats-wrap {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.medid-plan-stats-table th:nth-child(n+2),
.medid-plan-stats-table td:nth-child(n+2) {
	text-align: center;
}

.medid-plan-stats-table td.is-plan-name {
	font-weight: 600;
}

.medid-plan-stats-table td.is-allowed,
.medid-plan-stats-table td.is-info,
.medid-plan-stats-table td.is-success,
.medid-plan-stats-table td.is-danger {
	font-weight: 700;
}

.medid-plan-stats-table td.is-allowed,
.medid-plan-stats-table td.is-info {
	color: #0073aa;
}

.medid-plan-stats-table td.is-success {
	color: #46b450;
}

.medid-plan-stats-table td.is-danger {
	color: #dc3232;
}

.medid-plan-stats-meta {
	font-size: 12px;
	color: #666;
	margin-top: 10px;
}

/* Mobile: Plan stats as flex layout */
@media (max-width: 768px) {
	/* FORCE all buttons to use master blue style on mobile */
	button,
	.button,
	input[type="submit"],
	input[type="button"],
	.medid-button,
	.medid-button--compact,
	.medid-button--full,
	.medid-form button,
	.medid-tag-actions button,
	.medid-tag-actions input[type="submit"],
	.medid-nfc-actions button,
	.medid-nfc-actions input[type="submit"],
	.medid-nfc-copy-btn,
	.medid-join-club-button,
	.arm_logout_form_container button,
	.arm_logout_form_container .arm_logout_button,
	.arm_logout_form_container input[type="submit"] {
		background: #014B8D !important;
		color: #fff !important;
		border: none !important;
		border-radius: 4px !important;
		cursor: pointer !important;
		font-weight: 500 !important;
		font-size: 13px !important;
		padding: 5px 8px !important;
		transition: all 0.3s ease !important;
		display: inline-block !important;
		text-align: center !important;
		text-decoration: none !important;
		box-sizing: border-box !important;
		line-height: 1.4 !important;
		width: auto !important;
		white-space: normal !important;
		word-wrap: break-word !important;
		overflow: visible !important;
		text-overflow: clip !important;
		margin: 4px 6px !important;
	}
	.medid-plan-stats-wrap {
		display: block;
		width: 100% !important;
		max-width: none !important;
		flex: 1 1 100%;
		align-self: stretch;
		margin-left: 0;
		margin-right: 0;
	}

	.medid-plan-stats-table {
		display: flex;
		flex-wrap: wrap;
		width: 100% !important;
		max-width: none;
		min-width: 0;
		gap: 12px;
		border: none;
		margin: 0;
	}

	.medid-plan-stats-table thead {
		display: none;
	}

	.medid-plan-stats-table tbody {
		display: contents;
	}

	.medid-plan-stats-table tr {
		display: contents;
	}

	.medid-plan-stats-table td {
		flex: 1 1 calc(33.333% - 8px);
		padding: 12px !important;
		border: 1px solid #ddd !important;
		border-radius: 6px;
		background: #fff;
		text-align: center;
	}

	/* Mobile labels so users know exactly what each number means */
	.medid-plan-stats-table td:nth-child(2)::before,
	.medid-plan-stats-table td:nth-child(3)::before,
	.medid-plan-stats-table td:nth-child(4)::before {
		display: block;
		font-size: 11px;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.4px;
		color: #666;
		margin-bottom: 6px;
	}

	.medid-plan-stats-table td:nth-child(2)::before {
		content: "Allowed";
	}

	.medid-plan-stats-table td:nth-child(3)::before {
		content: "Used";
	}

	.medid-plan-stats-table td:nth-child(4)::before {
		content: "Available";
	}

	.medid-plan-stats-table td.is-plan-name {
		flex: 1 1 100%;
		font-weight: 700;
		font-size: 16px;
		text-align: left;
		background: #e8f4f8;
		border: 1px solid #b3d9e8 !important;
	}
}

/* FIX: ARMember dropdown placeholder text truncation (white-space: nowrap was cutting off text) */
.arm-df__dropdown-control .arm__dc--head .arm-df__dc--head__title,
.arm-df__dropdown-control .arm__dc--head .arm-df__dc--head__autocomplete {
	white-space: normal !important;
	word-wrap: break-word !important;
	overflow: visible !important;
	text-overflow: clip !important;
	min-height: auto !important;
	height: auto !important;
}

.medid-join-club-input {
    flex: 1;
}

.medid-join-club-input label {
    display: block;
    margin-bottom: 6px;
}

.medid-join-club-input input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

.medid-join-club-notice {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid;
}

.medid-join-club-notice.medid-error {
    background: #ffeef0;
    color: #dc3545;
    border-left-color: #dc3545;
}

.medid-join-club-notice.medid-success {
    background: #f0fff4;
    color: #28a745;
    border-left-color: #28a745;
}

/* Logout Button Container - Override ARMember defaults */
.arm_logout_form_container {
	margin: 0 !important;
	padding: 0 !important;
}

.arm_logout_form_container .arm-logged-in-as {
	margin: 0 !important;
	padding: 0 !important;
}

/* Center the logout section if wrapped */
.arm-logged-in-as-wrapper,
.arm_logout_wrapper {
	text-align: center !important;
}

.medid-club-history-wrap {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	padding: 20px;
	margin:  0;
}

.medid-club-history-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #1f2d5a;
}

.medid-club-history-note {
	margin: 0 0 16px;
	color: #666;
	font-size: 14px;
}

.medid-club-history-empty {
	margin: 0;
	padding: 12px 0 0;
	color: #444;
}

.medid-club-history-table th,
.medid-club-history-table td {
	vertical-align: top;
}

.medid-club-history-table th:nth-child(2),
.medid-club-history-table th:nth-child(4),
.medid-club-history-table th:nth-child(5),
.medid-club-history-table td:nth-child(2),
.medid-club-history-table td:nth-child(4),
.medid-club-history-table td:nth-child(5) {
	text-align: center;
}

/* Scrollable table wrapper for admin/report tables with inline styles */
.medid-table-scroll {
	width: 100%;
}

.medid-table-scroll table {
	width: 100%;
}


@media (max-width: 768px) {
	/* Match Tag Management table: do NOT hide columns, do NOT force button width, keep table layout fixed and width 100% */
	.medid-nfc-table {
		table-layout: fixed !important;
		min-width: 0 !important;
		max-width: 100% !important;
		margin: 0 !important;
		box-sizing: border-box !important;
	}
	/* Unified th/td style above for .medid-nfc-table and .medid-table */
	/* Center ACTIONS column content */
	.medid-nfc-table th:last-child,
	.medid-nfc-table td:last-child {
		text-align: center !important;
	}
	.medid-nfc-urls-wrap {
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		box-sizing: border-box !important;
	}
	.medid-nfc-actions button,
	.medid-nfc-actions form {
		min-width: 0 !important;
		padding: 6px 12px !important;
		font-size: 13px !important;
	}
}

/* Narrow screens: allow action buttons to wrap */
@media (max-width: 480px) {
	.medid-nfc-actions {
		flex-wrap: wrap;
	}
	.medid-nfc-actions button,
	.medid-nfc-actions form {
		margin-bottom: 4px;
	}
	.medid-nfc-actions button:last-child,
	.medid-nfc-actions form:last-child {
		margin-bottom: 0;
	}
}

.medid-tag-actions input,
.medid-tag-actions button,
.medid-nfc-actions button {
	font-size: 13px !important;
}