/* ==========================================================================
   WP Helpdesk – Customer-facing frontend styles
   ========================================================================== */

.hd-wrap {
	max-width: 900px;
	margin: 40px auto;
	padding: 0 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	color: #1d2327;
}

/* Page title */
.hd-title {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 8px;
}

.hd-subtitle {
	color: #646970;
	margin: 0 0 32px;
}

/* Back link */
.hd-back-link {
	margin: 0 0 24px;
	font-size: 0.9rem;
}

.hd-back-link a {
	color: #0073aa;
	text-decoration: none;
}

.hd-back-link a:hover {
	text-decoration: underline;
}

/* Action buttons on landing page */
.hd-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 24px;
}

/* Buttons */
.hd-btn {
	display: inline-block;
	padding: 10px 22px;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.hd-btn--primary {
	background: #0073aa;
	color: #fff;
}

.hd-btn--primary:hover:not(:disabled) {
	background: #005177;
	color: #fff;
}

.hd-btn--secondary {
	background: #f0f0f1;
	color: #1d2327;
}

.hd-btn--secondary:hover:not(:disabled) {
	background: #dcdcde;
}

.hd-btn:disabled,
.hd-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Step indicator */
.hd-steps {
	display: flex;
	gap: 0;
	margin: 0 0 32px;
	border-bottom: 2px solid #dcdcde;
	padding-bottom: 12px;
}

.hd-step {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 20px 0 0;
	color: #8c8f94;
	font-size: 0.85rem;
}

.hd-step__number {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #dcdcde;
	color: #646970;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.8rem;
}

.hd-step--active .hd-step__number {
	background: #0073aa;
	color: #fff;
}

.hd-step--active .hd-step__label {
	color: #0073aa;
	font-weight: 600;
}

.hd-step--done .hd-step__number {
	background: #00a32a;
	color: #fff;
}

/* Form structure */
.hd-form-container {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 28px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.hd-form-step__title {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 24px;
}

.hd-form-step--hidden {
	display: none;
}

/* Form fields */
.hd-field {
	margin-bottom: 20px;
}

.hd-label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 6px;
}

.hd-required {
	color: #d63638;
	margin-left: 2px;
}

.hd-input,
.hd-select,
.hd-textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 0.95rem;
	color: #1d2327;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.hd-input:focus,
.hd-select:focus,
.hd-textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.25);
}

.hd-input[readonly],
.hd-textarea[readonly] {
	background: #f6f7f7;
	cursor: default;
}

.hd-textarea {
	resize: vertical;
	min-height: 120px;
}

.hd-field-hint {
	margin: 6px 0 0;
	font-size: 0.85rem;
	color: #646970;
	min-height: 1.2em;
}

/* Form actions */
.hd-form-actions {
	margin-top: 24px;
}

.hd-form-actions--split {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* Error message */
.hd-error-message {
	color: #d63638;
	font-size: 0.9rem;
	margin-top: 12px;
	min-height: 1.2em;
}

/* Confirmation */
.hd-confirmation {
	text-align: center;
	padding: 20px 0;
}

.hd-confirmation__icon {
	font-size: 3rem;
	color: #00a32a;
	margin-bottom: 12px;
}

.hd-confirmation__title {
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0 0 12px;
}

.hd-confirmation__message {
	color: #646970;
	margin: 0 0 24px;
}

/* Topic description summary (shown in step 1 above the detail fields) */
.hd-topic-description-summary {
	background: #f6f7f7;
	border-left: 4px solid #0073aa;
	border-radius: 2px;
	padding: 12px 16px;
	margin-bottom: 24px;
	font-size: 0.9rem;
	color: #3c434a;
}

.hd-topic-description-summary:empty {
	display: none;
}

.hd-topic-description-summary__label {
	font-weight: 600;
	margin-bottom: 4px;
}

.hd-topic-description-summary__text {
	margin: 0;
}

/* Start over / change topic action */
.hd-start-over {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
	color: #646970;
	font-size: 0.85rem;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hd-start-over:hover,
.hd-start-over:focus {
	color: #d63638;
	outline: 2px solid #d63638;
	outline-offset: 2px;
}

.hd-form-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}
