/* MyYAAhati frontend styles */

.asas-myyaahati-form {
	max-width: 640px;
	margin: 1.5em auto;
	padding: 1.5em;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.asas-myyaahati-tier-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 1em;
}

.asas-myyaahati-tier-card {
	display: block;
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s ease;
}

.asas-myyaahati-tier-card:has(input:checked) {
	border-color: #2271b1;
	background: #f0f6fc;
}

.asas-myyaahati-tier-card input[type=radio] {
	display: none;
}

.asas-myyaahati-tier-card strong {
	display: block;
	font-size: 1.1em;
}

.asas-myyaahati-tier-card .tier-price {
	display: block;
	color: #2271b1;
	font-weight: 600;
	margin: 4px 0;
}

.asas-myyaahati-tier-card .tier-coverage {
	display: block;
	color: #666;
	font-size: 0.85em;
}

.asas-myyaahati-form p {
	margin: 0.75em 0;
}

.asas-myyaahati-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.asas-myyaahati-form input[type=text],
.asas-myyaahati-form input[type=email],
.asas-myyaahati-form input[type=tel] {
	width: 100%;
	padding: 8px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
}

.asas-myyaahati-form input[readonly] {
	background: #f6f7f7;
}

.myya-lookup-status {
	display: block;
	margin-top: 4px;
	color: #666;
	font-size: 0.85em;
}

.asas-myyaahati-messages {
	margin: 1em 0;
}

.myya-error {
	color: #b32d2e;
	background: #fcf0f1;
	border-left: 4px solid #b32d2e;
	padding: 8px 12px;
}

.myya-success {
	color: #1e4620;
	background: #edfaef;
	border-left: 4px solid #1e4620;
	padding: 8px 12px;
}

.asas-myyaahati-closed,
.asas-myyaahati-placeholder {
	max-width: 640px;
	margin: 2em auto;
	padding: 1.5em;
	background: #f6f7f7;
	border-radius: 8px;
	text-align: center;
	color: #666;
}

@media (max-width: 600px) {
	.asas-myyaahati-tier-cards {
		grid-template-columns: 1fr;
	}
	.myya-row { grid-template-columns: 1fr; }
}

/* Stepper */
.myya-stepper {
	list-style: none;
	display: flex;
	gap: 24px;
	padding: 0;
	margin: 0 0 1.5em;
	counter-reset: step;
}

.myya-step {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #999;
	font-weight: 600;
}

.myya-step .num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid #ddd;
	background: #fff;
	color: #999;
	font-weight: 700;
}

.myya-step-active { color: #2271b1; }
.myya-step-active .num { border-color: #2271b1; background: #2271b1; color: #fff; }
.myya-step-done { color: #1e4620; }
.myya-step-done .num { border-color: #1e4620; background: #1e4620; color: #fff; }

/* Form layout */
.myya-panel { padding-top: 0.5em; }

.myya-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 12px;
}

.myya-col-full { grid-column: 1 / -1; }

.myya-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 0.95em;
}

.myya-row label em {
	color: #b32d2e;
	font-style: normal;
	font-weight: 400;
}

.myya-row input[type=text],
.myya-row input[type=email],
.myya-row input[type=tel],
.myya-row select {
	width: 100%;
	padding: 8px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
}

.myya-row small {
	display: block;
	margin-top: 4px;
	font-size: 0.85em;
}

.myya-row small a { color: #2271b1; }

.myya-phone {
	display: flex;
	align-items: stretch;
}

.myya-phone-prefix {
	display: inline-flex;
	align-items: center;
	padding: 0 10px;
	background: #f0f0f1;
	border: 1px solid #ccd0d4;
	border-right: none;
	border-radius: 4px 0 0 4px;
	font-weight: 600;
}

.myya-phone input {
	border-radius: 0 4px 4px 0 !important;
}

/* Pakej options */
.myya-pakej {
	margin: 1.5em 0;
	padding-top: 1em;
	border-top: 1px solid #eee;
}

.myya-pakej-label {
	font-weight: 700;
	display: block;
	margin-bottom: 8px;
}

.myya-pakej-option {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 8px;
	border: 1px solid #eee;
	border-radius: 4px;
	margin-bottom: 6px;
	cursor: pointer;
}

.myya-pakej-option:hover {
	background: #fafafa;
}

.myya-pakej-option input[type=radio] { margin-top: 4px; }

/* Pengakuan */
.myya-pengakuan {
	margin: 1.5em 0;
	padding: 1em;
	background: #fafafa;
	border-radius: 6px;
}

.myya-pengakuan h3 { margin-top: 0; }

.myya-pengakuan label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin-bottom: 8px;
	font-weight: 400;
}

.myya-pengakuan input[type=checkbox] { margin-top: 4px; }

/* Actions */
.myya-actions {
	margin-top: 1.5em;
	display: flex;
	gap: 8px;
	justify-content: space-between;
}

/* Subscriber dashboard */
.asas-myyaahati-dashboard {
	max-width: 720px;
	margin: 1.5em auto;
}

.myya-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 1.5em;
	margin-bottom: 1em;
}

.myya-card header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.75em;
}

.myya-card header h3 {
	margin: 0;
}

.myya-status {
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: 600;
}

.myya-status-active    { background: #edfaef; color: #1e4620; }
.myya-status-created   { background: #f0f0f1; color: #50575e; }
.myya-status-past_due,
.myya-status-halted    { background: #fcf0f1; color: #b32d2e; }
.myya-status-cancelled,
.myya-status-completed { background: #f0f0f1; color: #50575e; }

.myya-grid {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 1em 0;
}

.myya-grid dt {
	font-weight: 600;
	color: #50575e;
}

.myya-grid dd {
	margin: 0;
}

.myya-payment-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.5em;
}

.myya-payment-table th,
.myya-payment-table td {
	padding: 6px 8px;
	border-bottom: 1px solid #eee;
	text-align: left;
	font-size: 0.9em;
}

.myya-inline-form {
	display: inline-block;
	margin-right: 8px;
	margin-top: 0.5em;
}
