/* stylelint-disable declaration-no-important */

/* Practice Entry Menu Styles */
.practice-entry-menu {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: auto;
}

.practice-entry-menu__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: transparent;
	color: var( --wp--preset--color--neutral-3, #6b7280 );
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.practice-entry-menu__button:hover {
	background-color: #efefef;
}

.practice-entry-menu__button svg {
	width: 16px;
	height: 16px;
	pointer-events: none;
}

.practice-entry-menu__dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 4px;
	background: #fff;
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	padding: 10px 16px;
	width: 200px;
	opacity: 0;
	visibility: hidden;
	transform: translateY( -4px );
	transition: all 0.2s ease;
	z-index: 100;
}

.practice-entry-menu__dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY( 0 );
}

.practice-entry-menu__menu-item {
	padding: 0;
	margin: 0;
}

.practice-entry-menu__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	color: var( --wp--preset--color--neutral-1, #111827 );
	text-decoration: none;
	font-size: 14px;
	line-height: 1.4;
	transition: background-color 0.15s ease;
	border: none;
	background: none;
	width: 100%;
	text-align: left;
	cursor: pointer;
}

.practice-entry-menu__item:hover {
	/* No hover color changes */
}

.practice-entry-menu__item:focus {
	background-color: var( --wp--preset--color--neutral-6, #f9fafb );
}

.practice-entry-menu__item svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* Mobile responsiveness */
@media ( max-width: 600px ) {
	.practice-entry-menu {
		top: 6px;
		right: 6px;
	}

	.practice-entry-menu__button {
		width: 28px;
		height: 28px;
	}

	.practice-entry-menu__dropdown {
		min-width: 140px;
	}

	.practice-entry-menu__item {
		padding: 8px 10px;
		font-size: 13px;
	}
}

/* === Modal shell ======================================================= */

#practice-log-popup {
	padding: 0;
	border: none;
}

.practice-entry__form {
	border-radius: 24px;
	background: #fff;
	padding: 24px 32px 32px;
	box-shadow: 0 18px 60px rgba( 0, 0, 0, 0.18 );
	max-height: 80vh;
	overflow-y: auto;
}

/* Remove the "Log your practice FORM" text – we'll use the date row instead */
.practice-entry__form > p:first-child {
	display: none;
}

/* === Top bar: date + "Change" ========================================= */

.practice-entry__form .field-type-date-field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 600;
}

.practice-entry__form .field-type-date-field input[type="date"] {
	border: 1px solid #4a4a4a;
	padding: 13px;
	font-weight: 600;
	font-size: 14px;
	background: transparent;
}

/* Fake the "Change" link on the right */
.practice-entry__form .field-type-date-field::after {
	display: none;
	content: "Change";
	font-size: 14px;
	font-weight: 600;
	color: #5b32e5;
	cursor: pointer;
}

/* === Form fields ========================================== */

/* See general JetFormBuilder styles in jfb-form.css */

.practice-entry__form input[type="date"].jet-form-builder__field::-webkit-date-and-time-value {
	text-align: left;
}

/* Taller notes textarea */
#practice_notes {
	resize: vertical;
	height: 110px;
}

/* === Emoji rows ("Mood during/after practice") ======================== */

.practice-entry__form .field-type-choices-field {
	margin-top: 4px;
}

.practice-entry__form .field-type-choices-field .jet-form-builder-choice {
	background: #efefef;
	border-radius: 10px;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	column-gap: 28px;
}

/* Individual emoji buttons */
.practice-entry__form .jet-form-builder-choice--item {
	border: unset;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

/* Selected state (JFB adds aria-checked=true) */
.practice-entry__form .jet-form-builder-choice--item[aria-checked="true"] {
	background: #fff;
	box-shadow: 0 0 0 2px #5b32e5;
}

/* Emoji text itself */
.practice-entry__form .jet-form-builder-choice--item p {
	margin: 0;
	font-size: 36px;
}

/* Text inputs under emoji rows */
#practice_mood_during_text,
#practice_mood_after_text {
	margin-top: 8px;
}

/* === Save button at the bottom ======================================== */

.practice-entry__form .jet-form-builder-row.field-type-submit-field {
	margin-top: 12px;
}

.practice-entry__form .jet-form-builder__submit-wrap {
	margin: 0;
}

.practice-entry__form .jet-form-builder__submit {
	width: 100%;
	background: #3f1bb6;
}

.practice-entry__form .jet-form-builder__submit:hover {
	background: #2f1390;
}

/* Sticky cancel button */
.practice-entry__form .practice-log-cancel {
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 10;
	padding-top: 30px;
	padding-bottom: 20px;
}

/* Hide success message */
.practice-entry__form .jet-form-builder-message--success {
	display: none;
}

/* Mobile responsiveness */
@media ( max-width: 600px ) {
	.practice-entry__form {
		padding: 20px 16px 24px;
	}

	.wp-container-hm-popup-is-layout-1 > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
		max-width: 100% !important;
	}
}
