/* Tokosupala Make Offer — frontend styles
   Netral & minimal supaya menyatu dengan tema toko. */

.tsmo-wrap { margin: 12px 0 0; }

.tsmo-open {
	display: inline-block;
	width: 100%;
	padding: 14px 22px;
	background: transparent;
	color: currentColor;
	border: 1.5px solid currentColor;
	border-radius: 4px;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.tsmo-open:hover { opacity: .72; }

/* ---------------------------------------------------------------- */
/* Modal                                                            */
/* ---------------------------------------------------------------- */
.tsmo-modal { position: fixed; inset: 0; z-index: 999999; display: none; }
.tsmo-modal.is-open { display: block; }
body.tsmo-lock { overflow: hidden; }

.tsmo-backdrop {
	position: absolute; inset: 0;
	background: rgba(0, 0, 0, .55);
	backdrop-filter: blur(2px);
	animation: tsmo-fade .18s ease;
}

.tsmo-box {
	position: relative;
	margin: 5vh auto;
	max-width: 440px;
	width: calc(100% - 32px);
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	color: #111;
	border-radius: 10px;
	padding: 28px 26px 24px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	animation: tsmo-pop .2s ease;
}

@keyframes tsmo-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes tsmo-pop { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }

.tsmo-x {
	position: absolute; top: 10px; right: 12px;
	background: none; border: 0;
	font-size: 28px; line-height: 1;
	color: #999; cursor: pointer; padding: 4px 8px;
}
.tsmo-x:hover { color: #111; }

.tsmo-title { margin: 0 0 6px; font-size: 21px; font-weight: 700; color: #111; }
.tsmo-intro { margin: 0 0 18px; font-size: 14px; color: #666; line-height: 1.5; }

.tsmo-prod {
	display: flex; flex-direction: column; gap: 3px;
	padding: 12px 14px; margin-bottom: 18px;
	background: #f6f6f6; border-radius: 6px;
	font-size: 14px; color: #111;
}
.tsmo-prod span { font-size: 13px; color: #777; }

/* Form */
.tsmo-form label {
	display: block; margin-bottom: 14px;
	font-size: 13px; font-weight: 600; color: #333;
}
.tsmo-req { color: #c0392b; }
.tsmo-opt { color: #999; font-weight: 400; }

.tsmo-form input,
.tsmo-form textarea {
	display: block; width: 100%; box-sizing: border-box;
	margin-top: 6px; padding: 11px 12px;
	font-size: 15px; font-family: inherit; color: #111;
	background: #fff;
	border: 1px solid #d5d5d5; border-radius: 5px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.tsmo-form input:focus,
.tsmo-form textarea:focus {
	outline: 0; border-color: #111;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .07);
}
.tsmo-form textarea { resize: vertical; min-height: 68px; }

/* Kolom nominal dengan simbol mata uang */
.tsmo-amt { position: relative; }
.tsmo-amt span {
	position: absolute; left: 12px; top: 50%;
	transform: translateY(-25%);
	font-size: 15px; font-weight: 600; color: #666; pointer-events: none;
}
.tsmo-amt input { padding-left: 34px; font-weight: 700; font-size: 17px; }

.tsmo-submit {
	width: 100%; margin-top: 4px; padding: 14px;
	background: #111; color: #fff;
	border: 0; border-radius: 5px;
	font-size: 15px; font-weight: 700; font-family: inherit;
	cursor: pointer; transition: opacity .15s ease;
}
.tsmo-submit:hover { opacity: .85; }
.tsmo-submit:disabled { opacity: .5; cursor: not-allowed; }

.tsmo-note { margin: 12px 0 0; font-size: 12px; color: #999; text-align: center; line-height: 1.5; }

.tsmo-msg { margin-bottom: 12px; font-size: 13.5px; line-height: 1.5; }
.tsmo-msg.is-error {
	padding: 10px 12px; border-radius: 5px;
	background: #fdecea; color: #a12525; border: 1px solid #f5c6c2;
}

/* Sukses */
.tsmo-ok { text-align: center; padding: 22px 8px 8px; }
.tsmo-ok-ico {
	width: 52px; height: 52px; margin: 0 auto 14px;
	display: flex; align-items: center; justify-content: center;
	background: #e6f6ea; color: #0a7d28;
	border-radius: 50%; font-size: 26px; font-weight: 700;
}
.tsmo-ok p { margin: 0; font-size: 15px; color: #333; line-height: 1.6; }

/* Mode gelap mengikuti preferensi perangkat */
@media (prefers-color-scheme: dark) {
	.tsmo-box { background: #1a1a1a; color: #f0f0f0; }
	.tsmo-title { color: #fff; }
	.tsmo-prod { background: #262626; color: #f0f0f0; }
	.tsmo-form label { color: #ddd; }
	.tsmo-form input, .tsmo-form textarea {
		background: #262626; color: #f5f5f5; border-color: #3d3d3d;
	}
	.tsmo-form input:focus, .tsmo-form textarea:focus {
		border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .1);
	}
	.tsmo-submit { background: #fff; color: #111; }
	.tsmo-ok p { color: #ddd; }
}

@media (max-width: 480px) {
	.tsmo-box { margin: 0; width: 100%; max-width: none; min-height: 100vh; border-radius: 0; padding-top: 44px; }
}
