/*
 * RSKO SIRANAP - Frontend styles.
 * Renders the bed-availability display for [siranap_rsko] on the public
 * site, in whichever mode (grid/list/compact/table) and color theme is
 * selected in Pengaturan.
 *
 * Colors are defined as CSS custom properties on the outer
 * .rsko-siranap-cards wrapper, scoped per theme class, so switching themes
 * never requires touching the markup or duplicating rules per mode.
 */

.rsko-siranap-cards {
	--rsko-accent: #0f8b8d;
	--rsko-accent-soft: rgba(15, 139, 141, 0.10);
	--rsko-red: #a8434b;
	--rsko-red-soft: rgba(168, 67, 75, 0.12);
	--rsko-yellow: #ab7a1f;
	--rsko-yellow-soft: rgba(171, 122, 31, 0.14);
	--rsko-green: #2f7d5c;
	--rsko-green-soft: rgba(47, 125, 92, 0.12);
	--rsko-surface: #ffffff;
	--rsko-surface-alt: #f7f9f9;
	--rsko-border: #e6ebeb;
	--rsko-text: #20302f;
	--rsko-text-muted: #5c6c6c;
	--rsko-shadow: rgba(20, 40, 40, 0.08);

	font-size: 15px;
	color: var(--rsko-text);
}

.rsko-siranap-theme-navy {
	--rsko-accent: #2c4a6e;
	--rsko-accent-soft: rgba(44, 74, 110, 0.10);
	--rsko-surface-alt: #f5f7fa;
	--rsko-border: #e1e7ee;
	--rsko-text: #1c2b3a;
	--rsko-text-muted: #5a6b7d;
	--rsko-shadow: rgba(28, 43, 58, 0.08);
}

.rsko-siranap-theme-mono {
	--rsko-accent: #3a3a3a;
	--rsko-accent-soft: rgba(58, 58, 58, 0.08);
	--rsko-red: #7d5252;
	--rsko-red-soft: rgba(125, 82, 82, 0.14);
	--rsko-yellow: #7d6c3f;
	--rsko-yellow-soft: rgba(125, 108, 63, 0.16);
	--rsko-green: #4c6a5b;
	--rsko-green-soft: rgba(76, 106, 91, 0.14);
	--rsko-surface-alt: #f5f5f4;
	--rsko-border: #e2e2e0;
	--rsko-text: #2a2a28;
	--rsko-text-muted: #6b6b68;
	--rsko-shadow: rgba(30, 30, 30, 0.08);
}

/* Shared bits used by every display mode. */

.rsko-siranap-empty {
	padding: 16px 18px;
	background: var(--rsko-surface-alt);
	border: 1px solid var(--rsko-border);
	border-left: 3px solid var(--rsko-yellow);
	border-radius: 8px;
	color: var(--rsko-text-muted);
}

.rsko-siranap-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 12px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.6;
	white-space: nowrap;
}

.rsko-siranap-pill-red {
	background: var(--rsko-red-soft);
	color: var(--rsko-red);
}

.rsko-siranap-pill-yellow {
	background: var(--rsko-yellow-soft);
	color: var(--rsko-yellow);
}

.rsko-siranap-pill-green {
	background: var(--rsko-green-soft);
	color: var(--rsko-green);
}

.rsko-siranap-total-kosong {
	font-weight: 700;
	color: var(--rsko-accent);
}

.rsko-siranap-last-update {
	font-weight: 600;
	color: var(--rsko-text);
}

/* ---------------------------------------------------------------------- */
/* Mode: Grid Card                                                        */
/* ---------------------------------------------------------------------- */

.rsko-siranap-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin: 16px 0;
}

@media (max-width: 1024px) {
	.rsko-siranap-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.rsko-siranap-grid {
		grid-template-columns: 1fr;
	}
}

.rsko-siranap-card {
	background: var(--rsko-surface);
	border: 1px solid var(--rsko-border);
	border-radius: 14px;
	padding: 20px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 1px 2px var(--rsko-shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rsko-siranap-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--rsko-text-muted);
}

.rsko-siranap-card.rsko-siranap-status-red::before {
	background: var(--rsko-red);
}

.rsko-siranap-card.rsko-siranap-status-yellow::before {
	background: var(--rsko-yellow);
}

.rsko-siranap-card.rsko-siranap-status-green::before {
	background: var(--rsko-green);
}

.rsko-siranap-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px var(--rsko-shadow);
}

.rsko-siranap-card-top {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 10px;
}

.rsko-siranap-room-name {
	margin: 0 0 12px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rsko-text);
}

.rsko-siranap-meta {
	margin: 0;
}

.rsko-siranap-meta-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-top: 1px solid var(--rsko-border);
	font-size: 14px;
}

.rsko-siranap-meta-row:first-child {
	border-top: none;
}

.rsko-siranap-meta-row dt {
	color: var(--rsko-text-muted);
	font-weight: 500;
}

.rsko-siranap-meta-row dd {
	margin: 0;
	font-weight: 600;
	color: var(--rsko-text);
	text-align: right;
}

/* ---------------------------------------------------------------------- */
/* Mode: List Elegan                                                      */
/* ---------------------------------------------------------------------- */

.rsko-siranap-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 16px 0;
}

.rsko-siranap-list-item {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--rsko-surface);
	border: 1px solid var(--rsko-border);
	border-radius: 10px;
	padding: 14px 18px;
}

.rsko-siranap-list-accent {
	width: 4px;
	align-self: stretch;
	border-radius: 4px;
	background: var(--rsko-text-muted);
	flex-shrink: 0;
}

.rsko-siranap-list-item.rsko-siranap-status-red .rsko-siranap-list-accent {
	background: var(--rsko-red);
}

.rsko-siranap-list-item.rsko-siranap-status-yellow .rsko-siranap-list-accent {
	background: var(--rsko-yellow);
}

.rsko-siranap-list-item.rsko-siranap-status-green .rsko-siranap-list-accent {
	background: var(--rsko-green);
}

.rsko-siranap-list-main {
	flex: 1;
	min-width: 0;
}

.rsko-siranap-list-title {
	font-weight: 600;
	font-size: 16px;
	color: var(--rsko-text);
}

.rsko-siranap-list-sub {
	font-size: 13px;
	color: var(--rsko-text-muted);
	margin-top: 2px;
}

.rsko-siranap-list-count {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.rsko-siranap-list-total {
	font-size: 13px;
	color: var(--rsko-text-muted);
}

@media (max-width: 480px) {
	.rsko-siranap-list-item {
		flex-wrap: wrap;
	}
}

/* ---------------------------------------------------------------------- */
/* Mode: Ringkas (Compact)                                                */
/* ---------------------------------------------------------------------- */

.rsko-siranap-compact {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
}

.rsko-siranap-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--rsko-surface-alt);
	border: 1px solid var(--rsko-border);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 14px;
}

.rsko-siranap-chip-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--rsko-text-muted);
	flex-shrink: 0;
}

.rsko-siranap-chip-dot-red {
	background: var(--rsko-red);
}

.rsko-siranap-chip-dot-yellow {
	background: var(--rsko-yellow);
}

.rsko-siranap-chip-dot-green {
	background: var(--rsko-green);
}

.rsko-siranap-chip-name {
	font-weight: 500;
	color: var(--rsko-text);
}

.rsko-siranap-chip-count {
	font-weight: 700;
	color: var(--rsko-accent);
}

/* ---------------------------------------------------------------------- */
/* Mode: Tabel Modern                                                     */
/* ---------------------------------------------------------------------- */

.rsko-siranap-table-wrap {
	margin: 16px 0;
	overflow-x: auto;
	border: 1px solid var(--rsko-border);
	border-radius: 12px;
}

.rsko-siranap-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--rsko-surface);
}

.rsko-siranap-table th,
.rsko-siranap-table td {
	padding: 12px 16px;
	text-align: left;
	font-size: 14px;
	white-space: nowrap;
}

.rsko-siranap-table thead th {
	background: var(--rsko-surface-alt);
	color: var(--rsko-text-muted);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.04em;
}

.rsko-siranap-table tbody tr {
	border-top: 1px solid var(--rsko-border);
}

.rsko-siranap-table tbody tr:hover {
	background: var(--rsko-accent-soft);
}
