/**
 * TIST MemberPress BuddyPress Frontend Styles
 * 
 * @since 1.0.0
 */

/* Navigation Icons for MemberPress Settings Tabs */

/* Membership Icon */
#membership-personal-li a:before {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\eed4';
	margin-right: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
}

/* Subscriptions Icon */
#subscriptions-personal-li a:before {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\ef52';
	margin-right: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
}

/* Payments Icon */
#payments-personal-li a:before {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\ee42';
	margin-right: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
}

/* Get Membership Icon */
#get-membership-personal-li a:before {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\ef5b';
	margin-right: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
}

a.mepr-account-row-action.mepr-account-update:after {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\ee42';
	margin-left: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
    font-size: 17px;
}

/* Gifts Icon */
#gifts-personal-li a:before {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\eea9';
	margin-right: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
}

/* Courses Icon */
#courses-personal-li a:before {
	font-family: "bb-icons";
	font-weight: 400;
	content: '\ef54';
	margin-right: 8px;
	display: inline-block;
	font-style: normal;
	speak: never;
	text-decoration: inherit;
	width: 1em;
	text-align: center;
	font-variant: normal;
	text-transform: none;
	line-height: 1em;
}

/* Force MemberPress tables to use mobile responsive view on all screen sizes */
/* This provides a cleaner, more contained layout that fits better in BuddyBoss containers */

/* Hide table headers on all screen sizes (not just mobile) */
.mp_wrapper table.mepr-account-table thead {
	display: none !important;
}

/* Force block layout for table rows on all screen sizes */
.mp_wrapper table.mepr-account-table tr {
	margin-bottom: 2em;
	display: block;
	border: 0;
    background: #f9f9f9;
    border-radius: 1em;
    box-shadow: 0 4px 10px -4px #ccc;
}

/* Force block layout for table cells on all screen sizes */
.mp_wrapper table.mepr-account-table td {
	display: flex;
	align-items: center;
	text-align: right;
	border-top: none;
	border-left: none;
	border-bottom: 1px dotted #ccc;
    min-height: 50px;
}

/* Remove border from last cell in each row */
.mp_wrapper table.mepr-account-table td:last-child {
	border-bottom: 0;
}

/* Ensure proper spacing for cell content */
.mp_wrapper table.mepr-account-table td div {
	padding: 0;
	margin: 0;
	flex: 1;
}

/* Display data labels (column headers) before each cell content */
.mp_wrapper table.mepr-account-table td:before {
	content: attr(data-label);
	text-transform: uppercase;
	font-weight: bold;
    width: 130px;
    display: flex;
    align-items: center;
}

/* Remove table border for cleaner look */
.mp_wrapper table.mepr-account-table {
	border: 0;
    box-shadow: none !important;
}

.mepr-subscription-row .mepr-account-subscr-id, .mepr-subscription-row .mepr-account-terms {
    color:#6e6e6e !important;
    margin-left: 0;
    font-weight: 500;
    font-style: normal;
}

.mepr-subscription-row .mepr-account-actions {
    max-width: 200px
}

.mepr-subscription-row .mepr-account-actions a {
    max-width: 200px;
    width: 100px;
    display: inline-block !important;
    width: 100px;
    display: inline-block !important;
    text-align: center;
    color: white;
    background: var(--bb-primary-color);
    padding: 5px;
    border-radius: 5px;
    margin-right: 5px;
}

#mepr-account-subscriptions-table button.mepr-account-row-action {
    padding: 4px 10px;
    margin-top: -4px;
}

.mepr-subscription-row .mepr-account-actions a:hover {
    background-color: var(--bb-primary-button-background-hover);
    color: var(--bb-primary-button-text-hover);
    border-color: var(--bb-primary-button-border-hover); 
}

#subscriptions-personal-li, #payments-personal-li, #gifts-personal-li, #courses-personal-li, #get-membership-personal-li {padding-left: 2em}

/* Styling for the updated button text */
.mp_wrapper .mepr-account-form input[type="submit"].tist-email-button {
    background: var(--bb-primary-color, #007cba);
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    border: none;
    font-weight: 500;
    cursor: pointer;
}

.mp_wrapper .mepr-account-form input[type="submit"].tist-email-button:hover {
    opacity: 0.9;
}

.mepr_update_account_table input {
    margin-top: 1em;
}

#mepr-account-subscriptions-table .mepr-account-product {
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 1em;
}

#mepr-account-subscriptions-table .mepr-account-auto-rebill {
    max-width: 75px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 1em;
}

#mepr-account-subscriptions-table .mepr-account-terms {
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 1em;
}

#mepr-account-subscriptions-table .mepr-account-rebill {
    max-width: 175px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-right: 1em;
}

#mepr-account-subscriptions-table .mepr-active {
    background-color: limegreen;
    color: white;
    padding: 4px 15px 3px;
    border-radius: 5px;
    font-family: inherit !important;
    font-weight: bold !important;
}

@media screen and (max-width: 600px) {
    .mp_wrapper table.mepr-account-table td::before {
        width: 100px;
    }

        .mp_wrapper table.mepr-account-table td div {
            padding: 0;
            margin: 0;
            margin-left: 15px;
            flex: none;
        }
}