/**
 * KS Track & Trace - frontend styles.
 * Designed to sit neutrally inside the Orchid Store theme.
 */

.kstt-wrap {
	max-width: 640px;
	margin: 0 auto;
}

.kstt-form {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.04 );
}

.kstt-title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.2;
}

.kstt-intro {
	margin: 0 0 20px;
	color: #555;
	font-size: 15px;
}

/* Type toggle */
.kstt-typetoggle {
	display: flex;
	gap: 8px;
	margin-bottom: 18px;
}

.kstt-type-option {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid #d8d8d8;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	user-select: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.kstt-type-option input {
	margin: 0;
}

.kstt-type-option.kstt-type-active {
	border-color: #e74c3c;
	background: #fdecea;
}

/* Fields */
.kstt-field {
	margin-bottom: 16px;
}

.kstt-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

.kstt-field input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #cfcfcf;
	border-radius: 8px;
	font-size: 15px;
}

.kstt-field input[type="text"]:focus {
	outline: none;
	border-color: #e74c3c;
	box-shadow: 0 0 0 3px rgba( 231, 76, 60, 0.15 );
}

/* Submit */
.kstt-submit {
	width: 100%;
	padding: 13px 16px;
	border: 0;
	border-radius: 8px;
	background: #e74c3c;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.kstt-submit:hover {
	background: #c0392b;
}

.kstt-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Messages */
.kstt-message {
	margin-top: 14px;
	font-size: 14px;
	color: #555;
	min-height: 1em;
}

.kstt-message-error {
	color: #b03030;
}

/* Result card */
.kstt-result {
	margin-top: 24px;
}

.kstt-card {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.04 );
}

.kstt-card-head {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
	margin-bottom: 18px;
}

.kstt-card-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
}

.kstt-card-value {
	display: block;
	font-size: 16px;
	font-weight: 600;
	color: #222;
}

/* Status banner */
.kstt-status {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 8px;
	background: #f4f6f8;
	margin-bottom: 20px;
}

.kstt-status-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin-top: 4px;
	background: #999;
	flex: 0 0 auto;
}

.kstt-state-success .kstt-status-dot { background: #2e9b57; }
.kstt-state-transit .kstt-status-dot { background: #e74c3c; }
.kstt-state-problem .kstt-status-dot { background: #d99a17; }
.kstt-state-unknown .kstt-status-dot { background: #999; }

.kstt-state-success { background: #ecf8f0; }
.kstt-state-transit { background: #fdecea; }
.kstt-state-problem { background: #fdf6e7; }

.kstt-status-text {
	display: block;
	font-size: 15px;
	color: #222;
}

.kstt-status-meta {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: #666;
}

/* Timeline */
.kstt-timeline {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.kstt-step {
	position: relative;
	padding: 0 0 18px 28px;
	font-size: 15px;
}

.kstt-step:last-child {
	padding-bottom: 0;
}

.kstt-step-marker {
	position: absolute;
	left: 0;
	top: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid #cfcfcf;
	background: #fff;
}

.kstt-step::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 18px;
	bottom: 0;
	width: 2px;
	background: #e2e2e2;
}

.kstt-step:last-child::before {
	display: none;
}

.kstt-step-done .kstt-step-marker {
	border-color: #2e9b57;
	background: #2e9b57;
}

.kstt-step-done .kstt-step-label {
	color: #222;
	font-weight: 600;
}

.kstt-step-pending .kstt-step-label {
	color: #999;
}

.kstt-step-date {
	display: block;
	font-size: 13px;
	color: #888;
	margin-top: 1px;
}

/* Sections */
.kstt-section {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.kstt-section-title {
	margin: 0 0 10px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #777;
}

.kstt-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kstt-items li {
	padding: 4px 0;
	font-size: 15px;
}

.kstt-item-qty {
	display: inline-block;
	min-width: 32px;
	font-weight: 600;
	color: #555;
}

.kstt-address {
	font-style: normal;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
}

/* GLS link */
.kstt-gls {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.kstt-gls-link {
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: #c0392b;
}

.kstt-gls-link:hover {
	text-decoration: underline;
}

/* Responsive */
@media ( max-width: 480px ) {
	.kstt-form,
	.kstt-card {
		padding: 20px 16px;
	}
	.kstt-card-head {
		gap: 14px;
	}
}
