/* Order Page Plugin – front-end styles */
.ck-order {
	--ck-accent: #1de38a;
	--ck-dot: #3d7a0f;
	--ck-text: #111;
	--ck-muted: #8a8f98;
	--ck-border: var(--ck-accent);
	--ck-bg: #f4f4f4;
	--ck-radius: 3px;
	box-sizing: border-box;
	max-width: 1000px;
	margin: 0 auto;
	padding: 24px 22px 32px;
	background: var(--ck-bg);
	color: var(--ck-text);
	font-size: 15px;
	line-height: 1.5;
}
.ck-order *,
.ck-order *::before,
.ck-order *::after { box-sizing: border-box; }

.ck-order .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.ck-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ck-heading {
	margin: 0 0 18px;
	font-size: 28px;
	line-height: 1.15;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .2px;
	color: #0b0b1a;
}
.ck-order form > .ck-heading:not(:first-of-type) { margin-top: 30px; }

.ck-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 26px;
	row-gap: 16px;
}
.ck-field { display: flex; flex-direction: column; min-width: 0; }
.ck-field--full { margin-top: 22px; }

.ck-field > label {
	display: flex;
	align-items: center;
	margin: 0 0 7px;
	font-size: 14px;
	font-weight: 700;
	color: var(--ck-text);
}
.ck-grid:not(.ck-grid--plain) .ck-field > label::before {
	content: "";
	flex: 0 0 auto;
	width: 10px; height: 10px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--ck-dot);
}
.ck-req { margin-left: 2px; }

.ck-order input[type="text"],
.ck-order input[type="email"],
.ck-order input[type="tel"],
.ck-order select,
.ck-order textarea {
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--ck-border);
	border-radius: var(--ck-radius);
	background-color: #fff;
	color: #333;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: none;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.ck-order select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 36px;
	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='none' stroke='%23777' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}
.ck-order select:invalid,
.ck-order select.is-empty { color: #8a8f98; }
.ck-order select option { color: #333; }
.ck-order input::placeholder,
.ck-order textarea::placeholder { color: #8a8f98; opacity: 1; }
.ck-order textarea { min-height: 180px; resize: vertical; }

.ck-order input:focus,
.ck-order select:focus,
.ck-order textarea:focus {
	border-color: var(--ck-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ck-accent) 25%, transparent);
}
.ck-order .has-error input,
.ck-order .has-error select,
.ck-order .has-error textarea,
.ck-order input.has-error,
.ck-order select.has-error { border-color: #e5484d; }
.ck-field-error { margin-top: 5px; font-size: 12.5px; color: #d93036; }

.ck-price {
	margin-top: 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--ck-accent);
	filter: brightness(.92);
}
.ck-price span { white-space: nowrap; }

/* Attachments */
.ck-attach {
	display: grid;
	grid-template-columns: 115px 1fr;
	align-items: center;
	row-gap: 8px;
	margin-top: 14px;
}
.ck-attach__label { color: var(--ck-muted); font-size: 15px; }
.ck-attach__controls { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ck-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ck-file-input:focus-visible + * { outline: 2px solid var(--ck-accent); }
.ck-btn-outline {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 36px;
	margin: 0;
	padding: 6px 14px;
	border: 1px solid var(--ck-accent);
	border-radius: var(--ck-radius);
	background: #fff;
	color: var(--ck-accent);
	filter: brightness(.95);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.ck-btn-outline svg { color: var(--ck-dot); }
.ck-btn-outline:hover,
.ck-btn-outline:focus-visible { background: var(--ck-accent); color: #111; filter: none; }
.ck-file-list, .ck-hint { grid-column: 2; margin: 0; padding: 0; list-style: none; }
.ck-file-list li {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	max-width: 520px;
	margin: 0 0 5px;
	padding: 6px 10px;
	background: #fff;
	border: 1px solid #e3e5e8;
	border-radius: var(--ck-radius);
	font-size: 13.5px;
}
.ck-file-list .ck-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-file-list button {
	flex: 0 0 auto;
	border: 0; background: none; padding: 0 4px;
	color: #d93036; font-size: 18px; line-height: 1; cursor: pointer;
}
.ck-hint { font-size: 12.5px; color: var(--ck-muted); }

/* Submit */
.ck-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 162px;
	margin-top: 34px;
	padding: 12px 34px;
	border: 0;
	border-radius: var(--ck-radius);
	background: var(--ck-accent);
	color: #111;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s, transform .05s;
}
.ck-submit:hover, .ck-submit:focus-visible { filter: brightness(.93); color: #111; }
.ck-submit:active { transform: translateY(1px); }
.ck-submit[disabled] { opacity: .65; cursor: wait; }
.ck-submit--wa { background: #25d366; margin-top: 14px; }
.ck-spinner {
	width: 16px; height: 16px;
	border: 2px solid rgba(0,0,0,.25); border-top-color: #111; border-radius: 50%;
	animation: ck-spin .7s linear infinite;
}
@keyframes ck-spin { to { transform: rotate(360deg); } }

/* Alerts */
.ck-alert {
	margin: 18px 0 0;
	padding: 12px 14px;
	border-radius: var(--ck-radius);
	font-size: 14px;
}
.ck-alert:first-child { margin-top: 0; margin-bottom: 18px; }
.ck-alert--error { background: #fdecec; border: 1px solid #f5c2c4; color: #a4161a; }
.ck-alert--admin { background: #fff8e5; border: 1px solid #f0d58c; color: #6b4a00; margin-top: 10px; }
.ck-alert--success { background: #e7f9ef; border: 1px solid #b6ecd0; color: #0f6b3b; }
.ck-alert ul { margin: 0; padding-left: 18px; }

/* Success panel */
.ck-success { text-align: center; padding: 10px 0; outline: none; }
.ck-success__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 64px; height: 64px; margin-bottom: 12px;
	border-radius: 50%; background: var(--ck-accent); color: #111;
}
.ck-success__meta {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
	margin: 18px 0;
}
.ck-success__meta > div {
	display: flex; flex-direction: column; min-width: 150px;
	padding: 12px 18px; background: #fff; border-radius: 6px; border: 1px solid #e3e5e8;
}
.ck-success__meta strong { font-size: 18px; }
.ck-success .ck-card { text-align: left; }
.ck-success__actions { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.ck-success__actions .ck-submit { margin-top: 0; }
.ck-success__actions .ck-btn-outline { min-height: 46px; padding: 0 22px; }

/* Track page */
.ck-muted { color: var(--ck-muted); font-size: 13.5px; }
.ck-track-form .ck-submit { margin-top: 20px; }
.ck-track-head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px;
	margin-bottom: 18px;
}
.ck-track-head .ck-heading { margin-bottom: 2px; }
.ck-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-badge {
	display: inline-block; padding: 4px 12px; border-radius: 999px;
	font-size: 12.5px; font-weight: 700; background: #e8eaed; color: #333;
}
.ck-badge--in_progress { background: #e3efff; color: #1453a6; }
.ck-badge--revision { background: #f1e8ff; color: #6531b5; }
.ck-badge--on_hold { background: #fff4d6; color: #8a5a00; }
.ck-badge--completed { background: #dcf8e9; color: #0f6b3b; }
.ck-badge--cancelled { background: #fde4e4; color: #a4161a; }
.ck-badge--pay-unpaid { background: #fff0e0; color: #9a4b00; }
.ck-badge--pay-partial { background: #fff4d6; color: #8a5a00; }
.ck-badge--pay-paid { background: #dcf8e9; color: #0f6b3b; }
.ck-badge--pay-refunded { background: #e8eaed; color: #555; }

.ck-progress {
	display: grid; grid-template-columns: repeat(4, 1fr);
	margin: 0 0 6px; padding: 0; list-style: none; counter-reset: ck;
}
.ck-progress li {
	position: relative; padding-top: 30px; text-align: center;
	font-size: 12.5px; color: var(--ck-muted);
}
.ck-progress li span {
	position: absolute; top: 0; left: 50%; transform: translateX(-50%);
	width: 22px; height: 22px; border-radius: 50%;
	background: #fff; border: 2px solid #d5d8dc; z-index: 1;
}
.ck-progress li::before {
	content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: #d5d8dc;
}
.ck-progress li:first-child::before { display: none; }
.ck-progress li.is-done { color: var(--ck-text); font-weight: 600; }
.ck-progress li.is-done span { background: var(--ck-accent); border-color: var(--ck-accent); }
.ck-progress li.is-done::before { background: var(--ck-accent); }
.ck-due { text-align: center; margin: 4px 0 16px; }

.ck-card {
	margin: 16px 0 0; padding: 16px 18px;
	background: #fff; border: 1px solid #e3e5e8; border-radius: 6px;
}
.ck-card--pay { border-left: 4px solid var(--ck-accent); }
.ck-card__title {
	display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
	margin-bottom: 10px; font-weight: 800; font-size: 16px;
}
.ck-amount { font-size: 18px; }
.ck-pay-text { font-size: 14px; }
.ck-card table { width: 100%; border-collapse: collapse; }
.ck-card td { font-size: 14px; }
.ck-details-text { margin-top: 12px; padding: 12px; background: #f7f8f9; border-radius: 4px; font-size: 14px; }
.ck-files { margin: 0; padding: 0; list-style: none; }
.ck-files li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f1f2; font-size: 14px; }
.ck-files li:last-child { border-bottom: 0; }
.ck-files a { color: #0b7a46; font-weight: 600; text-decoration: none; word-break: break-all; }
.ck-files a:hover { text-decoration: underline; }
.ck-messages { margin: 0; padding: 0; list-style: none; }
.ck-messages li { padding: 10px 12px; margin-bottom: 8px; background: #f7f8f9; border-left: 3px solid var(--ck-accent); border-radius: 4px; font-size: 14px; }
.ck-extra-upload { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e3e5e8; }
.ck-extra-upload__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.ck-extra-upload input[type="file"] { font-size: 13px; max-width: 100%; }
.ck-track-foot { margin: 20px 0 0; font-size: 14px; }
.ck-track-foot a { color: #0b7a46; font-weight: 600; }

/* Responsive */
@media (max-width: 640px) {
	.ck-order { padding: 18px 14px 26px; }
	.ck-heading { font-size: 23px; }
	.ck-grid { grid-template-columns: 1fr; row-gap: 14px; }
	.ck-price { margin-top: 2px; }
	.ck-attach { grid-template-columns: 1fr; }
	.ck-file-list, .ck-hint { grid-column: 1; }
	.ck-submit { width: 100%; }
	.ck-progress li { font-size: 11px; }
}

/* Discount */
.ck-was { color: var(--ck-muted); font-weight: 400; font-size: 14px; }
.ck-discount-note { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; background: #dcf8e9; color: #0f6b3b; font-size: 13px; font-weight: 700; }

.ck-hint--wa { margin: 8px 0 0; }

.ck-success .ck-success__title { margin-bottom: 6px; }
.ck-success__subtitle { margin: 0 0 14px; font-size: 19px; font-weight: 600; color: #0b0b1a; }
