/*
 * iHandyman Work Notes. Only colours that are already on the site (TASK-174 list and the existing card/gallery
 * styles); the type, radius and button shapes follow the theme and the handyman card.
 */

/* ---------- a post ---------- */
.ihwn-list {
	display: grid;
	gap: 16px;
	max-width: 720px;
	margin: 0;
}

/* Profile tab and cabinet on a computer: the same 720 px column as the public pages, centred (owner, 2026-11-05;
   a better wide layout comes later). */
.ihwn-list--profile,
.ihwn-list--cabinet {
	margin-right: auto;
	margin-left: auto;
}

.ihwn-note {
	display: grid;
	gap: 12px;
	min-width: 0;
	padding: 16px;
	border: 1px solid #e9e6ed;
	border-radius: 14px;
	background: #fff;
	color: #111827;
	text-align: left;
}

.ihwn-note__head {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.ihwn-note__who {
	min-width: 0;
}

.ihwn-note__name {
	display: block;
	overflow: hidden;
	color: #111827;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.3;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ihwn-note__name:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ihwn-note__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 6px;
	margin: 2px 0 0;
	color: #667085;
	font-size: 14px;
	line-height: 1.4;
}

.ihwn-note__meta--top {
	margin: 0;
}

.ihwn-note__meta a {
	color: #667085;
	text-decoration: none;
}

.ihwn-note__meta a:hover {
	color: #9a4510;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ihwn-note__sep {
	color: #cfc8d8;
}

.ihwn-note__text {
	margin: 0;
	color: #111827;
	font-size: 16px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

/* ---------- photos and video ---------- */
.ihwn-media {
	display: grid;
	gap: 6px;
	overflow: hidden;
	border-radius: 12px;
}

.ihwn-media--grid2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ihwn-media--grid3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ihwn-media--n3 > .ihwn-media__item:first-of-type {
	grid-column: 1 / -1;
}

.ihwn-media__item {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: #e4ded5;
	cursor: zoom-in;
	aspect-ratio: 1 / 1;
}

.ihwn-media--single .ihwn-media__item {
	aspect-ratio: 4 / 3;
}

.ihwn-media--n3 > .ihwn-media__item:first-of-type {
	aspect-ratio: 16 / 9;
}

.ihwn-media__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ihwn-media__item--video {
	cursor: pointer;
}

.ihwn-media__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(120deg, #ffaa17, #ff6a16 62%, #f5224b);
	transform: translate(-50%, -50%);
}

.ihwn-media__play::after {
	position: absolute;
	top: 50%;
	left: 54%;
	border-width: 10px 0 10px 16px;
	border-style: solid;
	border-color: transparent transparent transparent #fff;
	content: "";
	transform: translate(-50%, -50%);
}

/* The player on a post's own page, in the video's shape (a phone video stays tall), never taller than the screen. */
.ihwn-media__item--player {
	--ihwn-video-shape: 4 / 3;
	grid-column: 1 / -1;
	justify-self: center;
	width: min(100%, calc(70vh * (var(--ihwn-video-shape))));
	cursor: auto;
}

.ihwn-media .ihwn-media__item--player {
	aspect-ratio: var(--ihwn-video-shape);
}

.ihwn-media__item--player iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- footer: 👍 and Report ---------- */
.ihwn-note__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ihwn-note .ihwn-like {
	position: static;
	border-color: #e9e6ed;
}

.ihwn-note__report {
	color: #667085;
	font-size: 14px;
	text-decoration: none;
}

.ihwn-note__report:hover {
	color: #9a4510;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ihwn-note__likes {
	color: #515151;
	font-size: 14px;
	font-weight: 600;
}

.ihwn-note__actions {
	display: inline-flex;
	gap: 16px;
}

.ihwn-link-button {
	margin: 0;
	padding: 4px 0;
	border: 0;
	background: transparent;
	color: #9a4510;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.ihwn-link-button:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ihwn-link-button--danger {
	color: #515151;
}

/* ---------- the author's diamond photo (the card's frame) ---------- */
.ihwn-avatar {
	--ihwn-avatar: 44px;
	display: block;
	flex: none;
	width: var(--ihwn-avatar);
	height: var(--ihwn-avatar);
	text-decoration: none;
}

.ihwn-avatar__frame {
	display: grid;
	width: 100%;
	height: 100%;
	background: rgba(255, 149, 0, 0.52);
	clip-path: polygon(50% 0%, 56% 1%, 62% 5%, 95% 38%, 99% 44%, 100% 50%, 99% 56%, 95% 62%, 62% 95%, 56% 99%, 50% 100%, 44% 99%, 38% 95%, 5% 62%, 1% 56%, 0% 50%, 1% 44%, 5% 38%, 38% 5%, 44% 1%);
	place-items: center;
}

.ihwn-avatar__photo {
	display: block;
	width: calc(100% - 4px);
	height: calc(100% - 4px);
	overflow: hidden;
	background: #fff;
	clip-path: inherit;
}

.ihwn-avatar__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- mini author block under a feed card ---------- */
.ihwn-author {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 4px 12px;
	padding-top: 12px;
	border-top: 1px solid #e9e6ed;
}

.ihwn-author__body {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.ihwn-author__name {
	overflow: hidden;
	color: #111827;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.3;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ihwn-author__standing,
.ihwn-author__dirs,
.ihwn-author__free {
	margin: 0;
	color: #515151;
	font-size: 14px;
	line-height: 1.4;
}

.ihwn-author__dirs {
	overflow: hidden;
	color: #111827;
	font-weight: 650;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ihwn-author__cta {
	grid-column: 1 / -1;
	justify-self: end;
	color: #9a4510;
	font-size: 15px;
	font-weight: 750;
	text-decoration: none;
}

.ihwn-author__cta:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- lists ---------- */
.ihwn-empty,
.ihwn-note-hidden {
	margin: 0;
	color: #667085;
	font-size: 15px;
}

.ihwn-note-hidden {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #e4ded5;
	border-radius: 12px;
	background: #fffdfa;
	color: #515151;
}

.ihwn-more {
	margin: 16px 0 0;
	text-align: center;
}

.ihwn-more a {
	color: #9a4510;
	font-weight: 700;
}

.ihwn-js .ihwn-more:not(.ihwn-more--visible) {
	display: none;
}

.ihwn-sentinel {
	height: 1px;
}

.ihwn-tab {
	padding-top: 4px;
}

/* ---------- cabinet menu: the Posts item (same 24px line icon style as the other items) ---------- */
.iha-menu-icon--posts { --iha-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Cpath d='M7 8h10M7 12h10M7 16h6'/%3E%3C/svg%3E"); }

@media (max-width: 760px) {
	/* The phone row had four items + More; with Posts it has five + More, still one row. */
	body.woocommerce-account .woocommerce-MyAccount-navigation[data-iha-account-navigation] ul:has(> .woocommerce-MyAccount-navigation-link--posts) {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/* ---------- cabinet ---------- */
.ihwn-counter {
	margin: 0 0 16px;
	color: #515151;
	font-size: 15px;
	font-weight: 600;
}

/* ---------- public pages ---------- */
.ihwn-page {
	max-width: 720px;
	margin: 0 auto;
	padding: 24px 0 48px;
}

.ihwn-page__title {
	margin: 0 0 8px;
	color: #111827;
	font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.ihwn-page__intro {
	margin: 0 0 20px;
	color: #515151;
	font-size: 16px;
}

.ihwn-page--note .ihwn-note {
	margin-bottom: 16px;
}

.ihwn-page--note .ihwn-author {
	padding: 16px;
	border: 1px solid #e9e6ed;
	border-radius: 14px;
	background: #fffdfa;
}

.ihwn-back {
	margin: 0 0 12px;
	font-size: 15px;
}

.ihwn-back a {
	color: #9a4510;
	font-weight: 700;
	text-decoration: none;
}

.ihwn-back a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ihwn-section-title {
	margin: 28px 0 12px;
	color: #111827;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.25;
}

.ihwn-place {
	margin: 0 0 8px;
}

.ihwn-place__label {
	display: block;
	margin: 0 0 6px;
	color: #111827;
	font-size: 15px;
	font-weight: 700;
}

.ihwn-place__row {
	display: flex;
	gap: 8px;
}

.ihwn-place__row input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid rgba(17, 24, 39, 0.16);
	border-radius: 12px;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.03);
	color: #111827;
	font: inherit;
	font-size: 16px;
}

.ihwn-place__message {
	margin: 8px 0 0;
	color: #9a4510;
	font-size: 15px;
	font-weight: 650;
}

.ihwn-cities__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ihwn-cities__list li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid #e4ded5;
	border-radius: 999px;
	background: #fffdfa;
	font-size: 15px;
}

.ihwn-cities__list a {
	color: #111827;
	font-weight: 650;
	text-decoration: none;
}

.ihwn-cities__list a:hover {
	color: #9a4510;
	text-decoration: underline;
}

.ihwn-cities__count {
	color: #667085;
	font-size: 13px;
}

/* ---------- buttons ---------- */
.ihwn-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(120deg, #ffaa17, #ff6a16 62%, #f5224b);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.2;
	cursor: pointer;
}

.ihwn-button:hover {
	filter: saturate(1.08);
}

.ihwn-button:disabled {
	cursor: default;
	opacity: 0.55;
}

/* ---------- + Add post ---------- */
body.ihwn-has-fab {
	padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.ihwn-fab {
	position: fixed;
	right: max(16px, env(safe-area-inset-right, 0px));
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 12px 20px 12px 16px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(120deg, #ffaa17, #ff6a16 62%, #f5224b);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 750;
	line-height: 1;
	cursor: pointer;
}

.ihwn-fab[hidden] {
	display: none;
}

.ihwn-fab__plus {
	font-size: 26px;
	font-weight: 600;
	line-height: 0.8;
}

/* ---------- the form ---------- */
html.ihwn-editor-open,
html.ihwn-editor-open body {
	overflow: hidden;
}

.ihwn-editor {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ihwn-editor[hidden] {
	display: none;
}

.ihwn-editor__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.48);
}

.ihwn-editor__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(560px, calc(100vw - 32px));
	max-height: min(90vh, 860px);
	margin: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	color: #111827;
}

.ihwn-editor__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 10px 20px;
	border-bottom: 1px solid #e9e6ed;
}

.ihwn-editor__head h2 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.2;
}

.ihwn-editor__close {
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #515151;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.ihwn-editor__close:hover {
	background: #fbfcfe;
	color: #111827;
}

.ihwn-editor__body {
	display: grid;
	gap: 18px;
	padding: 16px 20px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.ihwn-editor__foot {
	display: grid;
	gap: 10px;
	padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid #e9e6ed;
	background: #fffdfa;
}

.ihwn-editor__rule {
	margin: 0;
	color: #515151;
	font-size: 14px;
	line-height: 1.45;
}

.ihwn-editor__foot .ihwn-button {
	width: 100%;
}

.ihwn-error {
	margin: 0;
	color: #9a4510;
	font-size: 15px;
	font-weight: 650;
}

.ihwn-field {
	display: grid;
	gap: 8px;
}

.ihwn-field--row {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ihwn-field__half {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.ihwn-field__label {
	color: #111827;
	font-size: 15px;
	font-weight: 700;
}

.ihwn-field__optional {
	color: #667085;
	font-size: 13px;
	font-weight: 500;
}

.ihwn-field__hint {
	margin: 0;
	color: #667085;
	font-size: 13px;
}

.ihwn-field__count {
	text-align: right;
}

.ihwn-field textarea,
.ihwn-field select {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid rgba(17, 24, 39, 0.16);
	border-radius: 12px;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.03);
	color: #111827;
	font: inherit;
	font-size: 16px;
	box-sizing: border-box;
}

.ihwn-field select {
	padding-right: 40px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px 18px;
	-webkit-appearance: none;
	appearance: none;
}

.ihwn-field textarea {
	min-height: 120px;
	resize: vertical;
	line-height: 1.5;
}

.ihwn-field textarea:focus,
.ihwn-field select:focus,
.ihwn-place__row input:focus {
	border-color: #ff9500;
	box-shadow: 0 0 0 4px rgba(255, 149, 0, 0.13);
	outline: 0;
}

/* Category buttons in the form (the city pills of /work-notes/; chosen = the cabinet menu's active gradient). */
.ihwn-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ihwn-chip {
	min-height: 44px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #e4ded5;
	border-radius: 999px;
	background: #fffdfa;
	color: #111827;
	font: inherit;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.2;
	cursor: pointer;
}

.ihwn-chip:hover {
	border-color: #ff9500;
}

.ihwn-chip[aria-checked="true"] {
	border-color: transparent;
	background: linear-gradient(120deg, #ffaa17, #ff6a16 62%, #f5224b);
	color: #fff;
}

.ihwn-chips.is-missing .ihwn-chip {
	border-color: #9a4510;
}

.ihwn-picker {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
}

.ihwn-picker:empty {
	display: none;
}

.ihwn-picker__item {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background: #e4ded5;
	aspect-ratio: 1 / 1;
}

.ihwn-picker__thumb,
.ihwn-picker__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ihwn-picker__thumb--video::after {
	position: absolute;
	top: 50%;
	left: 50%;
	border-width: 9px 0 9px 14px;
	border-style: solid;
	border-color: transparent transparent transparent #fff;
	content: "";
	transform: translate(-40%, -50%);
}

.ihwn-picker__state {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 3px 6px;
	background: rgba(17, 24, 39, 0.56);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.ihwn-picker__state:empty {
	display: none;
}

.ihwn-picker__item.is-error .ihwn-picker__state {
	background: #9a4510;
}

.ihwn-picker__item.is-uploading img {
	opacity: 0.6;
}

.ihwn-picker__remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.64);
	color: #fff;
	font-size: 20px;
	line-height: 28px;
	cursor: pointer;
}

.ihwn-picker__add {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	border: 1px dashed #cfc8d8;
	border-radius: 12px;
	background: #fbfcfe;
	color: #9a4510;
	font-size: 15px;
	font-weight: 750;
	cursor: pointer;
}

.ihwn-picker__add input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.ihwn-picker__add:focus-within {
	border-color: #ff9500;
}

@media (max-width: 760px) {
	.ihwn-note {
		padding: 14px;
	}

	.ihwn-page {
		padding-top: 16px;
	}

	.ihwn-editor {
		align-items: stretch;
	}

	.ihwn-editor__panel {
		width: 100%;
		max-height: none;
		height: 100%;
		border-radius: 0;
	}

	.ihwn-field--row {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- "Recent jobs" on city and service pages ---------- */
.ihwn-recent__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ihwn-recent__list li {
	min-width: 0;
	margin: 0;
}

.ihwn-recent__item {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	height: 100%;
	padding: 12px;
	border: 1px solid #e9e6ed;
	border-radius: 14px;
	background: #fff;
	color: #111827;
	text-align: left;
	text-decoration: none;
}

.ihwn-recent__item img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 8px;
	background: #e4ded5;
	object-fit: cover;
}

.ihwn-recent__text {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.ihwn-recent__title {
	font-size: 16px;
	font-weight: 750;
	line-height: 1.3;
}

.ihwn-recent__body {
	color: #515151;
	font-size: 14px;
	line-height: 1.4;
}

.ihwn-recent__meta {
	color: #667085;
	font-size: 14px;
	line-height: 1.4;
}

.ihwn-recent__all {
	margin: 16px 0 0;
	text-align: center;
}

.ihwn-recent__all a {
	color: #9a4510;
}

@media (max-width: 781px) {
	.ihwn-recent__list {
		grid-template-columns: minmax(0, 1fr);
	}
}
