/* Sadot Apartment Auto Management – frontend styles */

.saam-wrap {
	direction: rtl;
	background-color: #EBE5D6;
	padding: 24px;
	box-sizing: border-box;
}

.saam-wrap *,
.saam-wrap *::before,
.saam-wrap *::after {
	box-sizing: border-box;
}

.saam-notice {
	direction: rtl;
	padding: 16px 20px;
	background: #FFF6E0;
	border: 1px solid #E0C060;
	border-radius: 6px;
	font-size: 15px;
	color: #6B5B21;
}

/* ---------------------------------------------------------------- header */
.saam-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 28px;
}

/* ------------------------------------------------------------------ tabs */
.saam-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 40px;
}

/* ---------------------------------------------------------------- legend */
.saam-legend {
	display: flex;
	align-items: center;
	gap: 22px;
}

.saam-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #3F3A30;
	white-space: nowrap;
}

.saam-legend__dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #4A5238;
	flex: 0 0 auto;
}

.saam-legend__dot--free {
	background-color: #A98A4B;
}

.saam-legend__dot--sold {
	background-color: #2E2A22;
}

.saam-tab {
	appearance: none;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 10px 2px 12px;
	cursor: pointer;
	color: #8C8672;
	font-family: inherit;
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	transition: color .2s ease;
}

.saam-tab__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.saam-tab__count {
	font-size: 13px;
	line-height: 1;
	opacity: .85;
}

.saam-tab:hover {
	color: #4A4534;
}

.saam-tab.is-active {
	color: #4A4534;
	border-bottom-color: #B08D42;
}

.saam-tab:focus-visible {
	outline: 2px solid #B08D42;
	outline-offset: 3px;
	border-radius: 2px;
}

/* ------------------------------------------------------------- buildings */
.saam-building {
	display: none;
	flex-direction: column;
	row-gap: 14px;
	--saam-floor-w: 72px;
	--saam-cols: 4;
}

.saam-building.is-active {
	display: flex;
}

/* ------------------------------------------------------------ floor rows */
.saam-floor-row {
	display: grid;
	/* עמודת הקומה ראשונה = בצד ימין ב-RTL */
	grid-template-columns: var(--saam-floor-w) repeat(var(--saam-cols), minmax(0, 1fr));
	gap: 14px;
	align-items: stretch;
}

.saam-floor-cell {
	background-color: #8F7B67;
	color: #F4EFE3;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 4px;
	text-align: center;
}

.saam-floor-cell__num {
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
}

.saam-floor-cell__label {
	font-size: 12px;
	letter-spacing: .14em;
	opacity: .9;
}

/* ------------------------------------------------------------------ card */
.saam-card {
	position: relative;
	background-color: #FFFFFF;
	border-radius: 6px;
	padding: 48px 22px 22px;
	min-height: 210px;
	display: flex;
	flex-direction: column;
}

.saam-card--empty {
	background: transparent;
	min-height: 0;
	padding: 0;
}

.saam-card__inner {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.saam-card.is-sold .saam-card__inner {
	opacity: .35;
	pointer-events: none;
	user-select: none;
}

/* status badge – top corner */
.saam-badge {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px; /* RTL: צד שמאל, בתוך הכרטיס */
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .18em;
	padding: 5px 12px;
	border-radius: 3px;
	white-space: nowrap;
	z-index: 2;
}

.saam-badge--available {
	background-color: #4A5238;
	color: #FFFFFF;
}

.saam-badge--free {
	background-color: #A98A4B;
	color: #FFFFFF;
}

/* tag above card content, e.g. "דירת גן" */
.saam-card__tag {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px; /* RTL: צד ימין, מול תגית הסטטוס */
	font-size: 12px;
	color: #7A7466;
}

/* head: apartment title + rooms chip */
.saam-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}

.saam-card__title {
	font-size: 17px;
	font-weight: 700;
	color: #3E3A2E;
}


.saam-card__divider {
	border-top: 1px solid #E4DECF;
	margin: 0 0 12px;
}

/* details */
.saam-card__details {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	margin-bottom: 12px;
}

.saam-detail {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
}

.saam-detail__value {
	font-size: 16px;
	font-weight: 700;
	color: #3E3A2E;
}

.saam-detail__label {
	font-size: 13px;
	letter-spacing: .12em;
	color: #7A7466;
}

/* price */
.saam-card__price-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}

.saam-card__price {
	font-size: 19px;
	font-weight: 700;
	color: #3E3A2E;
	white-space: nowrap;
}

/* plan button */
.saam-plan-btn {
	margin-top: auto;
	align-self: center;
	display: inline-block;
	border: 1px solid #B08D42;
	border-radius: 3px;
	color: #8A6E2F;
	background-color: transparent;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .22em;
	padding: 10px 26px;
	text-align: center;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

a.saam-plan-btn:hover {
	background-color: #B08D42;
	color: #FFFFFF;
	text-decoration: none;
}

.saam-plan-btn.is-disabled {
	pointer-events: none;
}

/* sold stamp */
.saam-stamp {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-12deg);
	background-color: #49523B;
	color: #FFFFFF;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: .3em;
	padding: 14px 26px 14px 34px;
	border: 3px solid rgba(255, 255, 255, .85);
	box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
	white-space: nowrap;
	z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
	.saam-tab,
	.saam-plan-btn {
		transition: none;
	}
}

/* ------------------------------------------------------------ responsive */
/* טאבלט: שומרים על אותו מספר עמודות כמו בדסקטופ (ללא override).       */
@media (max-width: 1024px) {
	.saam-card--empty {
		display: none;
	}
}

@media (max-width: 767px) {
	.saam-wrap {
		padding: 16px;
	}

	.saam-tabs {
		gap: 22px;
		margin-bottom: 20px;
	}

	/* במובייל: פס קומה ברוחב מלא, ומתחתיו הדירות של אותה קומה */
	.saam-floor-row {
		display: flex !important;
		flex-direction: column;
		gap: 12px;
	}

	.saam-floor-cell {
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 10px 8px;
		min-height: 0;
	}

	.saam-floor-cell__num {
		font-size: 20px;
	}

	.saam-floor-cell__label {
		margin: 0;
	}

	.saam-card {
		width: 100%;
	}
}
