/* Vendora — Submit Link page template (guaqi.com/submit-link style, single column).
   Three stacked cards: Basic Information / Site Introduction / Contact + submit button. */

.vd-sub {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}
.vd-sub-head h1 {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.02em;
	margin-bottom: 6px;
}
.vd-sub-head p {
	color: var(--vd-text-2);
	font-size: 14px;
}

/* Message */
.vd-sub-msg {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border-radius: var(--vd-radius-sm);
	font-size: 14px;
}
.vd-sub-msg.ok {
	background: var(--vd-green-soft);
	color: var(--vd-green);
}
.vd-sub-msg.err {
	background: var(--vd-red-soft);
	color: var(--vd-red);
}

/* Form */
.vd-sub-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.vd-sub-block {
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	border-radius: var(--vd-radius);
	padding: 24px;
}
.vd-sub-block-head {
	margin-bottom: 18px;
}
.vd-sub-block-head h2 {
	font-size: 17px;
	font-weight: 800;
	margin-bottom: 4px;
}
.vd-sub-block-head p {
	color: var(--vd-text-2);
	font-size: 13px;
}

/* Field */
.vd-sub-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 16px;
}
.vd-sub-field:last-child {
	margin-bottom: 0;
}
/* Multi-select checkbox groups (product categories) */
.vd-sub-checks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 8px;
}
.vd-sub-check {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	border: 1px solid var(--vd-border);
	border-radius: 10px;
	cursor: pointer;
	font-size: 13.5px;
	color: var(--vd-text-2);
	transition: all .2s;
}
.vd-sub-check:hover {
	border-color: var(--vd-primary);
}
.vd-sub-check input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--vd-primary);
	cursor: pointer;
}
.vd-sub-check:has(input:checked) {
	border-color: var(--vd-primary);
	background: var(--vd-primary-soft);
	color: var(--vd-primary);
	font-weight: 600;
}
.vd-sub-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--vd-text);
	display: flex;
	align-items: center;
	gap: 6px;
}
.vd-sub .req {
	color: var(--vd-red);
}
.vd-sub .vd-sub-opt {
	color: var(--vd-text-2);
	font-size: 12px;
	font-weight: 400;
}
.vd-sub .vd-sub-file-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.vd-sub .vd-sub-filebtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: var(--vd-primary);
	border-radius: 8px;
	cursor: pointer;
	transition: background .2s;
}
.vd-sub .vd-sub-filebtn:hover {
	background: var(--vd-primary-2);
}
.vd-sub-filelist {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.vd-sub-fileitem {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 10px;
}
.vd-sub-fileitem img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
}
.vd-sub-fileitem-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.vd-sub-fileitem-name {
	font-size: 12px;
	font-weight: 600;
	color: var(--vd-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.vd-sub-fileitem-size {
	font-size: 11px;
	color: var(--vd-text-2);
}
.vd-sub-fileitem-rm {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 14px;
	line-height: 1;
	color: var(--vd-text-2);
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	border-radius: 50%;
	cursor: pointer;
}
.vd-sub-fileitem-rm:hover {
	color: var(--vd-red);
	border-color: var(--vd-red);
}
.vd-sub-file-warn {
	margin-top: 8px;
	font-size: 12px;
	color: var(--vd-red);
}
.vd-sub .vd-sub-file-hint {
	margin-top: 6px;
	font-size: 12px;
	color: var(--vd-text-2);
}
.vd-sub-field input,
.vd-sub-field textarea,
.vd-sub-field select {
	width: 100%;
	padding: 11px 13px;
	font-size: 14px;
	font-family: inherit;
	color: var(--vd-text);
	background: var(--vd-field);
	border: 1px solid var(--vd-border);
	border-radius: var(--vd-radius-sm);
	transition: border-color .2s, background .2s;
}
.vd-sub-field input:focus,
.vd-sub-field textarea:focus,
.vd-sub-field select:focus {
	outline: none;
	border-color: var(--vd-primary-border);
	background: var(--vd-card);
}
.vd-sub-field textarea {
	resize: vertical;
	min-height: 120px;
}
.vd-sub-field select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 38px;
	cursor: pointer;
}

/* Title char count */
.vd-sub-count {
	margin-left: auto;
	font-size: 12px;
	font-weight: 500;
	color: var(--vd-text-3);
}

/* Two-column row (contact) */
.vd-sub-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 16px;
}
.vd-sub-row:last-child {
	margin-bottom: 0;
}
.vd-sub-row .vd-sub-field {
	margin-bottom: 0;
}

/* Plan selection (one row per plan, radio on the right) */
.vd-sub-plans {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
/* Edit mode: locked (read-only) plan display */
.vd-sub-plan-locked {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--vd-inset);
	border: 1px dashed var(--vd-border);
	border-radius: var(--vd-radius-sm);
}
.vd-sub-plan {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	background: var(--vd-field);
	border: 1.5px solid var(--vd-border);
	border-radius: var(--vd-radius-sm);
	cursor: pointer;
	transition: border-color .2s, background .2s;
}
.vd-sub-plan:hover {
	border-color: var(--vd-primary-border);
}
.vd-sub-plan.is-active {
	border-color: var(--vd-primary);
	background: var(--vd-primary-soft);
}
.vd-sub-plan-main {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.vd-sub-plan-side {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}
.vd-sub-plan input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--vd-primary);
	cursor: pointer;
}
.vd-sub-plan-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--vd-text);
}
.vd-sub-plan-price {
	font-size: 14px;
	font-weight: 800;
	color: var(--vd-primary);
	white-space: nowrap;
}
.vd-sub-plan-per {
	font-size: 11px;
	font-weight: 600;
	color: var(--vd-text-3);
	margin-left: 1px;
}
.vd-sub-plan-original {
	font-size: 12px;
	font-weight: 600;
	color: var(--vd-text-3);
	text-decoration: line-through;
	margin-right: 2px;
}
.vd-sub-plan-desc {
	font-size: 12.5px;
	color: var(--vd-text-2);
	line-height: 1.5;
}

/* Paid notice */
.vd-sub-pay-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border-radius: var(--vd-radius-sm);
	font-size: 14px;
	background: var(--vd-amber-soft);
	border: 1px solid rgba(217, 119, 6, .3);
	color: var(--vd-amber);
}
.vd-sub-pay-notice[hidden] {
	display: none;
}
.vd-sub-pay-methods {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
	font-weight: 600;
	white-space: nowrap;
}
.vd-sub-pay-methods label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
}
.vd-sub-pay-methods input[type="radio"] {
	margin: 0;
	accent-color: var(--vd-amber);
}

/* Actions */
.vd-sub-actions {
	display: flex;
	justify-content: flex-end;
}
.vd-sub-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 700;
	font-family: inherit;
	color: #fff;
	background: var(--vd-primary);
	border: none;
	border-radius: var(--vd-radius-sm);
	cursor: pointer;
	transition: background .2s, transform .2s;
}
.vd-sub-btn:hover {
	background: var(--vd-primary-2);
	transform: translateY(-1px);
}
/* submitting state: swap the arrow icon for a spinner */
.vd-sub-btn.is-loading {
	cursor: wait;
}
.vd-sub-btn.is-loading:hover {
	transform: none;
}
.vd-sub-btn.is-loading svg {
	display: none;
}
.vd-sub-btn.is-loading::before {
	content: '';
	width: 16px;
	height: 16px;
	flex: none;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: vd-sub-spin .7s linear infinite;
}
@keyframes vd-sub-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Responsive */
@media (max-width: 600px) {
	.vd-sub-row {
		grid-template-columns: 1fr;
	}
}

/* ---- Success modal (reuses the link-detail modal component) ---- */
body.vd-modal-open {
	overflow: hidden;
}
.vd-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.vd-modal[hidden] {
	display: none;
}
.vd-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 9, 9, 11, .55 );
	-webkit-backdrop-filter: blur( 2px );
	backdrop-filter: blur( 2px );
}
.vd-modal-card {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc( 100vh - 40px );
	overflow-y: auto;
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	border-radius: 16px;
	padding: 30px 26px 26px;
	box-shadow: 0 24px 60px rgba( 0, 0, 0, .35 );
	text-align: center;
}
.vd-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: var(--vd-inset);
	color: var(--vd-text-2);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.vd-modal-close:hover {
	background: var(--vd-border);
	color: var(--vd-text);
}
.vd-modal-title {
	font-size: 18px;
	font-weight: 800;
	margin-bottom: 8px;
}
.vd-modal-hint {
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--vd-text-2);
	margin-bottom: 20px;
}
.vd-modal-submit {
	padding: 12px 30px;
	font-size: 14.5px;
	font-weight: 700;
	font-family: inherit;
	color: #fff;
	background: var(--vd-primary);
	border: none;
	border-radius: 10px;
	cursor: pointer;
}
.vd-modal-submit:hover {
	background: var(--vd-primary-2);
}
.vd-sub-modal-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--vd-green-soft);
	color: var(--vd-green);
	margin-bottom: 14px;
}

/* ---- FAQ row editor (public submit form) ---- */
.vd-faq-editor {
	margin-top: 2px;
}
.vd-faq-rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 14px;
}
.vd-faq-row {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 44px 14px 14px;
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: var(--vd-radius-sm);
}
.vd-faq-row input[type="text"] {
	width: 100%;
	padding: 11px 13px;
	font-size: 14px;
	font-family: inherit;
	color: var(--vd-text);
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	border-radius: var(--vd-radius-sm);
	transition: border-color .2s;
}
.vd-faq-row textarea {
	width: 100%;
	padding: 11px 13px;
	font-size: 14px;
	font-family: inherit;
	color: var(--vd-text);
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	border-radius: var(--vd-radius-sm);
	resize: vertical;
	min-height: 64px;
	transition: border-color .2s;
}
.vd-faq-row input:focus,
.vd-faq-row textarea:focus {
	outline: none;
	border-color: var(--vd-primary-border);
}
.vd-faq-row input::placeholder,
.vd-faq-row textarea::placeholder {
	color: var(--vd-text-3);
}
.vd-faq-rm {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 26px;
	height: 26px;
	border: 1px solid var(--vd-border);
	border-radius: 7px;
	background: var(--vd-card);
	color: var(--vd-text-2);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.vd-faq-rm:hover {
	background: var(--vd-red);
	border-color: var(--vd-red);
	color: #fff;
}
.vd-faq-add {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	font-size: 13.5px;
	font-weight: 600;
	font-family: inherit;
	color: var(--vd-primary);
	background: var(--vd-primary-soft);
	border: 1px solid var(--vd-primary-border);
	border-radius: var(--vd-radius-sm);
	cursor: pointer;
}
.vd-faq-add:disabled {
	opacity: .5;
	cursor: default;
}
.vd-faq-hint {
	color: var(--vd-text-3);
	font-weight: 500;
}
