/* Google Material theme — Melk Agency (front) */
.ma-google-theme {
	font-family: inherit;
	color: var(--ma-text, #202124);
	--ma-primary: #1a73e8;
	--ma-primary-hover: #1765cc;
	--ma-primary-text: #1967d2;
	--ma-primary-soft: #e8f0fe;
	--ma-primary-soft-hover: #d2e3fc;
	--ma-on-primary: #fff;
	--ma-surface: #fff;
	--ma-bg: #f8f9fa;
	--ma-border: #dadce0;
	--ma-text: #202124;
	--ma-muted: #5f6368;
	--ma-radius: 12px;
	--ma-radius-pill: 999px;
	--ma-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
	--ma-shadow-hover: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.ma-google-theme .ma-card {
	background: var(--ma-surface);
	border: 1px solid var(--ma-border);
	border-radius: var(--ma-radius);
	box-shadow: var(--ma-shadow);
	padding: 20px;
	margin-bottom: 16px;
}

.ma-google-theme .ma-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.ma-google-theme .ma-h1 {
	margin: 0;
	font-size: 22px;
	font-weight: 400;
}

.ma-google-theme .ma-h2 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 500;
}

.ma-google-theme .ma-muted,
.ma-google-theme .ma-help,
.ma-google-theme .ma-notice {
	color: var(--ma-muted);
	font-size: 13px;
}

.ma-google-theme .ma-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: var(--ma-radius-pill);
	border: 1px solid var(--ma-border);
	background: #fff;
	color: var(--ma-primary-text);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.ma-google-theme .ma-btn:hover {
	background: var(--ma-primary-soft);
	box-shadow: var(--ma-shadow);
}

.ma-google-theme .ma-btn-primary {
	background: var(--ma-primary);
	border-color: var(--ma-primary);
	color: var(--ma-on-primary);
}

.ma-google-theme .ma-btn-primary:hover {
	background: var(--ma-primary-hover);
	color: var(--ma-on-primary);
}

.ma-google-theme .ma-btn-text {
	border-color: transparent;
	background: transparent;
	padding: 6px 10px;
}

.ma-google-theme .ma-btn.ma-danger,
.ma-google-theme .ma-danger {
	color: #d93025;
}

.ma-google-theme .ma-input,
.ma-google-theme .ma-select,
.ma-google-theme select.ma-input,
.ma-google-theme textarea.ma-input {
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--ma-border);
	border-radius: 8px;
	padding: 10px 12px;
	min-height: 44px;
	font-size: 14px;
	background: #fff;
	color: var(--ma-text);
	box-shadow: none;
	outline: none;
	appearance: none;
}

.ma-google-theme select.ma-input,
.ma-google-theme .ma-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6368' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 12px center;
	padding-left: 36px;
}

.ma-google-theme .ma-input:focus,
.ma-google-theme .ma-select:focus {
	border-color: var(--ma-primary);
	box-shadow: 0 0 0 2px var(--ma-primary-soft);
}

.ma-google-theme .ma-input-lg {
	font-size: 16px;
	padding: 14px 16px;
}

.ma-table-wrap {
	overflow-x: auto;
}

.ma-table {
	width: 100%;
	border-collapse: collapse;
}

.ma-table th,
.ma-table td {
	padding: 12px 10px;
	border-bottom: 1px solid #f1f3f4;
	text-align: right;
	font-size: 14px;
	vertical-align: top;
}

.ma-table th {
	color: var(--ma-muted);
	font-weight: 500;
}

.ma-chip {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	background: var(--ma-primary-soft);
	color: var(--ma-primary-text);
}

.ma-chip-draft { background: #f1f3f4; color: #3c4043; }
.ma-chip-pending { background: #fef7e0; color: #e37400; }
.ma-chip-published { background: #e6f4ea; color: #137333; }
.ma-chip-rejected { background: #fce8e6; color: #c5221f; }
.ma-chip-sold { background: #e8f0fe; color: #1967d2; }

.ma-reject-reason {
	margin-top: 6px;
	font-size: 12px;
	color: #c5221f;
}

.ma-wizard-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.ma-wizard-steps li {
	padding: 6px 12px;
	border-radius: 999px;
	background: #f1f3f4;
	color: var(--ma-muted);
	font-size: 12px;
	font-weight: 500;
}

.ma-wizard-steps li.is-current {
	background: var(--ma-primary-soft);
	color: var(--ma-primary-text);
}

.ma-wizard-steps li.is-done {
	background: #e6f4ea;
	color: #137333;
}

.ma-choice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
}

.ma-choice {
	border: 1px solid var(--ma-border);
	border-radius: var(--ma-radius);
	background: #fff;
	padding: 24px 16px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	color: var(--ma-text);
	box-shadow: var(--ma-shadow);
}

.ma-choice:hover {
	border-color: var(--ma-primary);
	background: var(--ma-primary-soft);
	color: var(--ma-primary-text);
}

.ma-choice.is-selected {
	border-color: var(--ma-primary, #1a73e8);
	background: var(--ma-primary-soft, #e8f0fe);
	color: var(--ma-primary-text, #1967d2);
	box-shadow: 0 0 0 2px var(--ma-primary-soft-hover, #d2e3fc);
}

.ma-wizard-loader {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: none !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(248, 249, 250, 0.72);
	color: var(--ma-muted, #5f6368);
	font-size: 14px;
	pointer-events: none;
}

/* Visibility driven only by .is-busy — [hidden] must not fight display:flex */
.ma-wizard.is-busy .ma-wizard-loader {
	display: flex !important;
	pointer-events: auto;
}

.ma-wizard.is-busy .ma-wizard-footer .ma-btn,
.ma-wizard.is-busy .ma-choice,
.ma-wizard.is-busy .ma-input,
.ma-wizard.is-busy .ma-select,
.ma-wizard.is-busy textarea.ma-input,
.ma-wizard.is-busy #ma-wizard-prev,
.ma-wizard.is-busy #ma-wizard-next {
	pointer-events: none !important;
	opacity: 0.55;
	cursor: not-allowed;
}

.ma-spinner {
	width: 22px;
	height: 22px;
	border: 2px solid #dadce0;
	border-top-color: var(--ma-primary, #1a73e8);
	border-radius: 50%;
	animation: maSpin 0.7s linear infinite;
}

@keyframes maSpin {
	to { transform: rotate(360deg); }
}

.ma-media-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.ma-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	z-index: -1;
}

.ma-bool-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	grid-column: 1 / -1;
	margin-bottom: 8px;
}

.ma-success-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.ma-table-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.ma-property-title-link {
	border: 0;
	background: transparent;
	padding: 0;
	color: var(--ma-primary-text, #1967d2);
	cursor: pointer;
	text-align: right;
	font: inherit;
}

.ma-property-title-link:hover {
	text-decoration: underline;
}

.ma-col-check {
	width: 40px;
	text-align: center;
}

.ma-step-desc {
	margin: 0 0 14px;
}

.ma-upload-status {
	display: inline-block;
	margin-right: 8px;
	font-size: 13px;
}

.ma-media-thumbs img,
.ma-media-thumbs video {
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--ma-border, #dadce0);
	background: #f1f3f4;
}

.ma-osm-map {
	width: 100%;
	height: 260px;
	border-radius: 12px;
	border: 1px solid var(--ma-border, #dadce0);
	margin-bottom: 10px;
	z-index: 1;
}

.ma-property-title-link {
	color: inherit;
	text-decoration: none;
}

.ma-property-title-link:hover strong {
	color: var(--ma-primary-text, #1967d2);
}

.ma-view-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.ma-view-gallery img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border-radius: 10px;
}

.ma-view-section {
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px solid #f1f3f4;
}

.ma-view-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.ma-view-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px;
	background: #f8f9fa;
	border-radius: 10px;
}

.ma-view-field strong {
	font-size: 12px;
	color: var(--ma-muted, #5f6368);
	font-weight: 500;
}

.ma-property-view-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.ma-login-gate .ma-card {
	max-width: 420px;
	margin: 24px auto;
}

.ma-login-gate input[type="text"],
.ma-login-gate input[type="password"] {
	width: 100%;
	border: 1px solid var(--ma-border, #dadce0);
	border-radius: 8px;
	padding: 10px 12px;
	min-height: 42px;
}

.ma-login-gate .button,
.ma-login-gate input[type="submit"] {
	border-radius: 999px !important;
	background: var(--ma-primary, #1a73e8) !important;
	border-color: var(--ma-primary, #1a73e8) !important;
	color: #fff !important;
}

.ma-fields-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.ma-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--ma-muted);
}

.ma-switch,
.ma-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.ma-map-fields {
	display: grid;
	gap: 8px;
}

.ma-wizard-footer {
	display: flex;
	justify-content: flex-start;
	gap: 8px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #f1f3f4;
}

.ma-wizard-msg {
	margin-top: 12px;
	color: #137333;
}

.ma-wizard-msg.is-error {
	color: #c5221f;
}

.ma-success-box {
	text-align: center;
	padding: 24px 8px;
}

.ma-search-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ma-search-form .ma-input {
	flex: 1;
	min-width: 200px;
}

.ma-properties-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.ma-property-card {
	background: var(--ma-surface, #fff);
	border: 1px solid var(--ma-border, #dadce0);
	border-radius: var(--ma-radius, 12px);
	overflow: hidden;
	box-shadow: var(--ma-shadow);
}

.ma-property-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.ma-property-title {
	margin: 0;
	padding: 12px 14px 16px;
	font-size: 1rem;
	font-weight: 500;
}

.ma-property-title a {
	color: var(--ma-text, #202124);
	text-decoration: none;
}

@media (max-width: 768px) {
	.ma-agent-panel {
		grid-template-columns: 1fr;
	}

	.ma-agent-nav {
		position: static;
	}
}
