/*
Theme Name: Housealrimi
Theme URI: https://housealrimi.com/
Author: Housealrimi
Description: 주택알리미 WebView 앱용 모바일 퍼스트 WordPress 테마
Version: 0.1.0
Text Domain: housealrimi
*/

:root {
    --housealrimi-max-width: 480px;
    --housealrimi-bg: #f5f7fa;
    --housealrimi-surface: #ffffff;
    --housealrimi-text: #111827;
    --housealrimi-muted: #6b7280;
    --housealrimi-border: #e5e7eb;
    --housealrimi-primary: #2563eb;
    --housealrimi-bottom-nav-height: 64px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #e9edf3;
    color: var(--housealrimi-text);
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.housealrimi-app {
    width: 100%;
    max-width: var(--housealrimi-max-width);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--housealrimi-bg);
    padding-bottom: calc(var(--housealrimi-bottom-nav-height) + env(safe-area-inset-bottom));
}

.housealrimi-main {
    width: 100%;
}

.housealrimi-content {
    padding: 16px;
}

.housealrimi-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: min(100%, var(--housealrimi-max-width));
    min-height: var(--housealrimi-bottom-nav-height);
    transform: translateX(-50%);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--housealrimi-border);
    backdrop-filter: blur(12px);
}

.housealrimi-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    color: var(--housealrimi-muted);
    font-size: 12px;
    font-weight: 600;
}

.housealrimi-bottom-nav__item.is-active {
    color: var(--housealrimi-primary);
}

.housealrimi-bottom-nav__icon {
    display: block;
    font-size: 20px;
    line-height: 1;
}

/* =========================
   Notice Detail
========================= */

.housealrimi-notice-detail {
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	padding: 20px 16px 100px;
	box-sizing: border-box;
}

.housealrimi-notice-article {
	width: 100%;
}

.housealrimi-notice-header {
	margin-bottom: 20px;
}

.housealrimi-notice-title {
	margin: 0;
	font-size: 24px;
	line-height: 1.4;
	font-weight: 700;
	color: #111827;
	word-break: keep-all;
}

.housealrimi-notice-actions {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 28px;
}

.housealrimi-notice-action {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 4px;
	border: 1px solid #dbe2ea;
	border-radius: 10px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	box-sizing: border-box;
	cursor: pointer;
}

.housealrimi-notice-section {
	margin-bottom: 24px;
}

.housealrimi-notice-section-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
	color: #111827;
}

.housealrimi-notice-info-table {
	overflow: hidden;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.housealrimi-notice-row {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	border-bottom: 1px solid #e2e8f0;
}

.housealrimi-notice-row:last-child {
	border-bottom: 0;
}

.housealrimi-notice-label {
	display: flex;
	align-items: center;
	padding: 13px 12px;
	background: #f8fafc;
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
	box-sizing: border-box;
}

.housealrimi-notice-value {
	padding: 13px 14px;
	color: #1e293b;
	font-size: 14px;
	line-height: 1.55;
	word-break: keep-all;
	box-sizing: border-box;
}

.housealrimi-notice-value a {
	color: inherit;
	text-decoration: none;
}

.housealrimi-notice-details {
	overflow: hidden;
	margin-bottom: 10px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.housealrimi-notice-details summary {
	position: relative;
	padding: 16px 44px 16px 16px;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	cursor: pointer;
	list-style: none;
}

.housealrimi-notice-details summary::-webkit-details-marker {
	display: none;
}

.housealrimi-notice-details summary::after {
	content: '+';
	position: absolute;
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
	font-size: 20px;
	font-weight: 400;
	color: #64748b;
}

.housealrimi-notice-details[open] summary::after {
	content: '−';
}

.housealrimi-notice-details-content {
	padding: 0 16px 16px;
	color: #64748b;
	font-size: 14px;
	line-height: 1.6;
}

.housealrimi-notice-source-bottom {
	margin-top: 28px;
}

.housealrimi-notice-source-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	border-radius: 12px;
	background: #2563eb;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

/* =========================
   Notice Supply Units
========================= */

.housealrimi-supply-summary {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding-right: 44px;
}

.housealrimi-supply-summary-title {
	display: block;
	color: #1e293b;
	font-size: 15px;
	font-weight: 700;
}

.housealrimi-supply-summary-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	color: #64748b;
	font-size: 13px;
	font-weight: 400;
}

.housealrimi-supply-summary-meta strong {
	color: #334155;
	font-weight: 700;
}

.housealrimi-supply-table-wrap {
	width: 100%;
	overflow-x: auto;
	padding: 0 0 10px;
	-webkit-overflow-scrolling: touch;
}

.housealrimi-supply-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	background: #fff;
}

.housealrimi-supply-table th,
.housealrimi-supply-table td {
	padding: 12px 10px;
	border-top: 1px solid #e2e8f0;
	border-right: 1px solid #e2e8f0;
	white-space: nowrap;
	text-align: center;
	font-size: 13px;
}

.housealrimi-supply-table th:last-child,
.housealrimi-supply-table td:last-child {
	border-right: 0;
}

.housealrimi-supply-table th {
	background: #f8fafc;
	color: #475569;
	font-weight: 700;
}

.housealrimi-supply-table td {
	color: #1e293b;
}

.housealrimi-supply-table tbody tr:last-child td {
	border-bottom: 0;
}

.housealrimi-special-supply-table {
	min-width: 980px;
}

/* =========================
   Notice Map
========================= */

.housealrimi-notice-location {
	overflow: hidden;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.housealrimi-notice-location-address {
	padding: 14px 16px;
	border-bottom: 1px solid #e2e8f0;
	color: #334155;
	font-size: 14px;
	line-height: 1.55;
}

.housealrimi-notice-map {
	width: 100%;
	height: 240px;
	background: #eef2f7;
}

/* =========================
   Notice Attachments
========================= */

.housealrimi-notice-action.is-disabled {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}