/* Buttons */
body.follo-ui .buddypress button,
body.follo-ui .buddypress input[type="button"],
body.follo-ui .buddypress input[type="submit"],
body.follo-ui .buddypress .button,
body.follo-ui #buddypress button,
body.follo-ui #buddypress input[type="button"],
body.follo-ui #buddypress input[type="submit"],
body.follo-ui #buddypress .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: var(--follo-radius);
	background: var(--follo-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: var(--follo-shadow-sm);
	cursor: pointer;
	transition: background-color var(--follo-transition), border-color var(--follo-transition), color var(--follo-transition), box-shadow var(--follo-transition), transform 100ms ease;
}

body.follo-ui .buddypress button:hover,
body.follo-ui .buddypress input[type="submit"]:hover,
body.follo-ui .buddypress .button:hover,
body.follo-ui #buddypress button:hover,
body.follo-ui #buddypress input[type="submit"]:hover,
body.follo-ui #buddypress .button:hover {
	background: var(--follo-primary-hover);
	color: #fff;
	box-shadow: var(--follo-shadow);
}

body.follo-ui .buddypress button:active,
body.follo-ui .buddypress input[type="submit"]:active,
body.follo-ui .buddypress .button:active {
	transform: translateY(1px);
}

/* Generate Password = secondary action */
body.follo-ui .buddypress .wp-generate-pw,
body.follo-ui #buddypress .wp-generate-pw,
body.follo-ui .buddypress .follo-secondary-action {
	border-color: var(--follo-border);
	background: #fff;
	color: var(--follo-text);
}

body.follo-ui .buddypress .wp-generate-pw:hover,
body.follo-ui #buddypress .wp-generate-pw:hover,
body.follo-ui .buddypress .follo-secondary-action:hover {
	border-color: var(--follo-primary);
	background: var(--follo-primary-soft);
	color: var(--follo-primary);
}

/* Destructive actions */
body.follo-ui .buddypress #delete-account-button,
body.follo-ui #buddypress #delete-account-button,
body.follo-ui .buddypress .follo-danger-action {
	border-color: var(--follo-danger);
	background: var(--follo-danger);
	color: #fff;
}

body.follo-ui .buddypress #delete-account-button:hover,
body.follo-ui #buddypress #delete-account-button:hover,
body.follo-ui .buddypress .follo-danger-action:hover {
	border-color: var(--follo-danger-hover);
	background: var(--follo-danger-hover);
	color: #fff;
}

/* Disabled */
body.follo-ui .buddypress button:disabled,
body.follo-ui .buddypress input[type="submit"]:disabled,
body.follo-ui #buddypress button:disabled,
body.follo-ui #buddypress input[type="submit"]:disabled {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

/* Common BuddyPress action groups */
body.follo-ui .buddypress .submit,
body.follo-ui #buddypress .submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}


/* =========================================================
   FOLLO action sizing refinements
   ========================================================= */

/* Email & Password: make Generate Password and Save Changes
   visually equal in width on desktop. */
body.follo-ui .buddypress .wp-generate-pw,
body.follo-ui #buddypress .wp-generate-pw,
body.follo-ui .buddypress input[type="submit"][name="submit"],
body.follo-ui #buddypress input[type="submit"][name="submit"] {
	min-width: 150px;
}

/* Keep the dedicated destructive action at its own natural size. */
body.follo-ui .buddypress #delete-account-button,
body.follo-ui #buddypress #delete-account-button {
	min-width: 0;
}

/* Data export request button should align flush with the content edge. */
body.follo-ui .buddypress .request-data-export,
body.follo-ui #buddypress .request-data-export,
body.follo-ui .buddypress input[name="data-export-submit"],
body.follo-ui #buddypress input[name="data-export-submit"],
body.follo-ui .buddypress input[value*="personal data export"],
body.follo-ui #buddypress input[value*="personal data export"] {
	margin-left: 0;
}


/* =========================================================
   v1.5 - Settings action consistency
   ========================================================= */

/* General > Email & Password:
   force Generate Password and Save Changes to the same width. */
body.follo-ui .buddypress .wp-generate-pw,
body.follo-ui #buddypress .wp-generate-pw,
body.follo-ui .buddypress .standard-form .submit input[type="submit"],
body.follo-ui #buddypress .standard-form .submit input[type="submit"] {
	width: 166px;
	min-width: 166px;
	max-width: 166px;
}

/* Do not constrain destructive or data-export actions to the email-page width. */
body.follo-ui .buddypress #delete-account-button,
body.follo-ui #buddypress #delete-account-button,
body.follo-ui .buddypress input[name="data-export-submit"],
body.follo-ui #buddypress input[name="data-export-submit"],
body.follo-ui .buddypress input[value*="personal data export"],
body.follo-ui #buddypress input[value*="personal data export"] {
	width: auto;
	min-width: 0;
	max-width: none;
}


/* =========================================================
   v1.6 - Email & Password action sizing
   ========================================================= */

/* Keep Generate Password on one line and match Save Changes exactly. */
body.follo-ui .buddypress .wp-generate-pw,
body.follo-ui #buddypress .wp-generate-pw,
body.follo-ui .buddypress .standard-form .submit input[type="submit"],
body.follo-ui #buddypress .standard-form .submit input[type="submit"] {
	width: 180px !important;
	min-width: 180px !important;
	max-width: 180px !important;
	white-space: nowrap !important;
}

/* Ensure the label itself never wraps. */
body.follo-ui .buddypress .wp-generate-pw,
body.follo-ui #buddypress .wp-generate-pw {
	line-height: 1.2;
}

/* Bulk Apply action gets proper separation. */
body.follo-ui .buddypress .notifications-options-nav,
body.follo-ui #buddypress .notifications-options-nav,
body.follo-ui .buddypress .bulk-actions,
body.follo-ui #buddypress .bulk-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}


/* v1.9 Messages Send / Reset actions */
body.follo-ui .buddypress #send_message_form input[type="submit"],
body.follo-ui #buddypress #send_message_form input[type="submit"],
body.follo-ui .buddypress #send_message_form button[type="submit"],
body.follo-ui #buddypress #send_message_form button[type="submit"] {
	min-width: 120px !important;
}

body.follo-ui .buddypress #send_message_form input[type="reset"],
body.follo-ui #buddypress #send_message_form input[type="reset"],
body.follo-ui .buddypress #send_message_form button[type="reset"],
body.follo-ui #buddypress #send_message_form button[type="reset"] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 120px !important;
	min-height: 44px !important;
	padding: 10px 18px !important;
	border: 1px solid var(--follo-border) !important;
	border-radius: var(--follo-radius) !important;
	background: #fff !important;
	color: var(--follo-text) !important;
	font-weight: 700 !important;
	box-shadow: var(--follo-shadow-sm) !important;
	cursor: pointer !important;
}

body.follo-ui .buddypress #send_message_form input[type="reset"]:hover,
body.follo-ui #buddypress #send_message_form input[type="reset"]:hover,
body.follo-ui .buddypress #send_message_form button[type="reset"]:hover,
body.follo-ui #buddypress #send_message_form button[type="reset"]:hover {
	border-color: var(--follo-primary) !important;
	background: var(--follo-primary-soft) !important;
	color: var(--follo-primary) !important;
}
