/* ==========================================================================
   Membership Ledger — My Account styles
   Lightweight additions layered on WooCommerce's base styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Company search
   -------------------------------------------------------------------------- */

.ml-search-box {
	margin-bottom: .75em;
}

.ml-search-box .input-text {
	width: 100%;
	max-width: 420px;
}

.ml-search-status {
	font-size: .875em;
	color: #666;
	min-height: 1.4em;
	margin-bottom: .5em;
}

.ml-search-results {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
	max-width: 420px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.ml-result-item {
	padding: .65em 1em;
	cursor: pointer;
	background: #fff;
	border-bottom: 1px solid #f0f0f0;
	transition: background .12s, color .12s;
	user-select: none;
}

.ml-result-item:last-child {
	border-bottom: none;
}

.ml-result-item:hover,
.ml-result-item:focus {
	background: #f0f7ff;
	color: #0071a1;
	outline: none;
}

.ml-result-item:active {
	background: #dbeeff;
}

/* Keyboard focus ring — visible for accessibility */
.ml-result-item:focus-visible {
	outline: 2px solid #0071a1;
	outline-offset: -2px;
}

.ml-result-item--selected {
	background: #dbeeff;
	color: #003f6b;
	font-weight: 600;
}

.ml-result-item--selected:hover,
.ml-result-item--selected:focus {
	background: #c9e4f8;
	color: #003f6b;
}

/* --------------------------------------------------------------------------
   Join confirm section
   -------------------------------------------------------------------------- */

.ml-join-confirm-wrap {
	margin: .75em 0;
	max-width: 420px;
}

.ml-selected-company {
	margin-bottom: .6em;
	font-size: .95em;
}

.ml-selected-company strong {
	margin-left: .25em;
}

.ml-join-confirm-btn {
	margin-right: .5em;
}

.ml-join-deselect-btn {
	font-size: .875em;
}

.ml-join-feedback {
	padding: .6em .9em;
	border-radius: 4px;
	font-size: .9em;
	margin-top: .5em;
	max-width: 420px;
}

.ml-join-feedback.ml-success {
	background: #edfaef;
	border: 1px solid #7bc47f;
	color: #2e7d32;
}

.ml-join-feedback.ml-error {
	background: #fff0f0;
	border: 1px solid #e57373;
	color: #c62828;
}

/* --------------------------------------------------------------------------
   Status badges
   -------------------------------------------------------------------------- */

.ml-badge,
.ml-status {
	display: inline-block;
	padding: .2em .55em;
	border-radius: 3px;
	font-size: .78em;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .03em;
	vertical-align: middle;
}

.ml-badge--paid,
.ml-status--active {
	background: #edfaef;
	color: #2e7d32;
}

.ml-badge--prev {
	background: #fff3cd;
	color: #7a5900;
}

.ml-status--pending {
	background: #fff3cd;
	color: #7a5900;
}

.ml-status--rejected,
.ml-status--removed {
	background: #f5f5f5;
	color: #616161;
}

.ml-status--expired {
	background: #fdecea;
	color: #c62828;
}

.ml-status--inactive {
	background: #f5f5f5;
	color: #9e9e9e;
}

/* --------------------------------------------------------------------------
   Members table
   -------------------------------------------------------------------------- */

.ml-members-table .ml-paid-info {
	font-size: .85em;
	color: #555;
	display: block;
	margin-bottom: .3em;
}

.ml-members-table select.ml-month-select {
	max-width: 80px;
}

.ml-year-col {
	white-space: nowrap;
}

.ml-renewal-total {
	margin-top: 1em;
	font-size: 1em;
}

.ml-renewal-total strong {
	margin-left: .25em;
}

/* --------------------------------------------------------------------------
   Dashboard widget (My Account dashboard)
   -------------------------------------------------------------------------- */

.ml-dashboard-widget {
	margin-bottom: 1.5em;
}

.ml-widget-heading {
	font-size: 1em;
	margin-bottom: .6em;
}

.ml-widget-meta {
	margin: 0;
	font-size: .95em;
}

.ml-widget-action {
	margin-top: 1em;
}

/* --------------------------------------------------------------------------
   Paid-until hero (dashboard widget + membership status)
   -------------------------------------------------------------------------- */

.ml-paid-until-hero {
	display: flex;
	flex-direction: column;
	gap: .2em;
	margin-bottom: 1em;
	padding: .9em 1.1em;
	border-radius: 5px;
	border-left: 4px solid #7bc47f;
	background: #edfaef;
}

.ml-paid-until-hero--expired {
	border-color: #e57373;
	background: #fdecea;
}

.ml-paid-until-hero--inactive {
	border-color: #bdbdbd;
	background: #f5f5f5;
}

.ml-paid-until-label {
	font-size: .85em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #555;
}

.ml-paid-until-hero--expired .ml-paid-until-label {
	color: #c62828;
}

.ml-paid-until-hero--inactive .ml-paid-until-label {
	color: #9e9e9e;
}

.ml-paid-until-date {
	font-size: 1.2em;
	font-weight: 700;
	color: #2e7d32;
}

.ml-paid-until-hero--expired .ml-paid-until-date {
	color: #c62828;
}

/* --------------------------------------------------------------------------
   Membership status sections
   -------------------------------------------------------------------------- */

.ml-membership-status .ml-status-section {
	padding: 1.25em 0;
	border-bottom: 1px solid #e5e5e5;
}

.ml-membership-status .ml-status-section:last-child {
	border-bottom: none;
}

.ml-section-heading {
	margin-top: 0;
	margin-bottom: .6em;
	font-size: 1.05em;
}

/*.ml-section-intro {
	font-size: .9em;
	color: #555;
	margin-bottom: .75em;
}
*/
/* --------------------------------------------------------------------------
   Pending request notice (inline in Membership Status)
   -------------------------------------------------------------------------- */

.ml-pending-request-notice {
	display: flex;
	align-items: center;
	gap: .65em;
	flex-wrap: wrap;
	margin-top: .75em;
	margin-bottom: 1.25em;
	padding: .6em .9em;
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 4px;
	font-size: .9em;
}

.ml-pending-request-notice .ml-cancel-btn {
	font-size: .8em;
	padding: .3em .7em;
}

.ml-request-status {
	font-size: .875em;
}

/* --------------------------------------------------------------------------
   Membership history table
   -------------------------------------------------------------------------- */

.ml-history-table .ml-months-delta {
	font-weight: 700;
	font-size: 1em;
}

.ml-delta-positive {
	color: #2e7d32;
}

.ml-delta-negative {
	color: #c62828;
}

.ml-tx-label {
	display: block;
	font-size: .8em;
	color: #888;
	font-weight: normal;
}

/* --------------------------------------------------------------------------
   Renewal summary (company members + self-renewal)
   -------------------------------------------------------------------------- */

.ml-renewal-summary {
	margin: 1em 0;
	padding: .75em 1em;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	display: inline-block;
	min-width: 360px;
}

.ml-renewal-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5em;
	padding: .25em 0;
	font-size: .95em;
}

.ml-renewal-summary-total {
	border-top: 1px solid #ddd;
	margin-top: .25em;
	padding-top: .4em;
	font-size: 1em;
}

.ml-pricing-breakdown-line
{
	display: flex;
    justify-content: space-between;
}  

/* --------------------------------------------------------------------------
   Covered-until per-cell display (Company Members table)
   -------------------------------------------------------------------------- */

.ml-covered-until {
	display: block;
	font-size: .8em;
	margin-bottom: .3em;
	color: #2e7d32;
}

.ml-covered-until--expired {
	color: #c62828;
}

.ml-covered-until--inactive,
.ml-covered-until-- {
	color: #9e9e9e;
}

/* Extension date preview (shown under dropdowns) */
.ml-extends-to,
.ml-self-extends-to {
	display: block;
/*	font-size: .8em;
	color: #555;
	margin-top: .2em;*/
	font-style: italic;
}

/* --------------------------------------------------------------------------
   Self-renewal form
   -------------------------------------------------------------------------- */

.ml-self-renewal-table select.ml-self-month-select {
	max-width: 80px;
}

/* --------------------------------------------------------------------------
   Leave company
   -------------------------------------------------------------------------- */

.ml-company-info {
	display: flex;
	align-items: center;
	gap: .75em;
	flex-wrap: wrap;
	margin-bottom: 1em;
}

.ml-leave-btn {
	font-size: .85em;
}

.ml-leave-feedback {
	font-size: .9em;
	margin-top: .5em;
}

/* --------------------------------------------------------------------------
   Notices / empty states
   -------------------------------------------------------------------------- */

.ml-notice {
	padding: .75em 1em;
	border-left: 4px solid #0071a1;
	background: #f0f7ff;
	margin-bottom: 1em;
}

.ml-notice--success {
	border-color: #7bc47f;
	background: #edfaef;
}

.ml-empty-state {
	color: #666;
	font-style: italic;
}

.ml-unpaid {
	color: #c62828;
	font-weight: 600;
}

.ml-fully-paid {
	color: #2e7d32;
}

/* --------------------------------------------------------------------------
   Sidebar sub-menu item (Membership History nested under Membership Status /
   Membership Purchases nested under Company Members)
   -------------------------------------------------------------------------- */

/* Shown only while inside the parent section — indented with ↳ marker. */
.woocommerce-MyAccount-navigation-link.ml-submenu-item > a {
	padding-left: 1.5em;
	font-size: .9em;
}

.woocommerce-MyAccount-navigation-link.ml-submenu-item > a::before {
	content: '↳ ';
	opacity: .55;
}

/* Hidden when outside the parent section — keeps sidebar clean without JS. */
.woocommerce-MyAccount-navigation-link.ml-submenu-item--hidden {
	display: none;
}

/* --------------------------------------------------------------------------
   Member since label (inside paid-until hero)
   -------------------------------------------------------------------------- */

.ml-member-since-label {
	font-size: .82em;
	color: #555;
	margin-bottom: .1em;
}

.ml-paid-until-hero--inactive .ml-member-since-label {
	color: #9e9e9e;
}

/* --------------------------------------------------------------------------
   Companies compact table (Membership Status page)
   -------------------------------------------------------------------------- */

.ml-companies-table {
	max-width: 520px;
	margin-bottom: .75em;
	text-wrap: nowrap
}

/* Leave button: neutral by default, red on hover/focus */
.ml-leave-btn {
	font-size: .85em;
}

.ml-leave-btn:hover,
.ml-leave-btn:focus {
	color: #c62828 !important;
	border-color: #c62828 !important;
	background: #fff0f0 !important;
}

/* --------------------------------------------------------------------------
   Company Membership Purchases table
   -------------------------------------------------------------------------- */

.ml-company-purchases-table .ml-row--refund {
	opacity: .8;
	background: #fff8f8;
}

.ml-allocation-price {
	white-space: nowrap;
}

.ml-price--refund {
	color: #c62828;
}
