/**
 * Qintil Paste — Frontend Styles
 * Used by the [qintil_paste_form] shortcode and paste view pages.
 */

/* -------------------------------------------------------------------------
   Shared / Reset
-------------------------------------------------------------------------- */
.qp-wrap,
.qp-paste-view {
	max-width: 960px;
	margin: 40px auto;
	padding: 0 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	color: #1a1a1a;
}

.qp-btn {
	display: inline-block;
	padding: 8px 14px;
	background: #111827;
	color: #f9fafb;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none;
	transition: background 0.15s ease;
}

.qp-btn:hover,
.qp-btn:focus {
	background: #374151;
	color: #f9fafb;
}

.qp-btn-primary {
	padding: 10px 22px;
	font-size: 15px;
}

.qp-btn-copy {
	flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   Submission Form
-------------------------------------------------------------------------- */
.qp-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.qp-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.qp-optional {
	font-weight: 400;
	color: #6b7280;
	font-size: 12px;
	margin-left: 4px;
}

.qp-field input[type="text"],
.qp-field textarea,
.qp-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	background: #f9fafb;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.qp-field input[type="text"]:focus,
.qp-field textarea:focus,
.qp-field select:focus {
	outline: none;
	border-color: #6366f1;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.qp-field textarea {
	min-height: 320px;
	resize: vertical;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 13px;
	line-height: 1.55;
}

.qp-field-hint {
	margin-top: 4px;
	font-size: 12px;
	color: #9ca3af;
}

.qp-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.qp-field-half {
	flex: 1;
	min-width: 180px;
}

.qp-visibility-badge {
	display: inline-block;
	padding: 7px 12px;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 13px;
	color: #6b7280;
}

/* -------------------------------------------------------------------------
   Success / Error notices
-------------------------------------------------------------------------- */
.qp-success,
.qp-error {
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 16px;
	font-size: 14px;
}

.qp-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.qp-error {
	background: #fff1f2;
	border: 1px solid #fecdd3;
	color: #9f1239;
}

.qp-success-url {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.qp-output-url {
	flex: 1;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 13px;
	background: #fff;
	color: #111827;
}

/* -------------------------------------------------------------------------
   Paste View Page
-------------------------------------------------------------------------- */
.qp-paste-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.qp-paste-topbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.qp-paste-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.qp-paste-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.qp-paste-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f3f4f6;
}

.qp-paste-meta code {
	background: #f3f4f6;
	border-radius: 4px;
	padding: 1px 5px;
	font-size: 12px;
}

.qp-paste-body {
	background: #0f172a;
	color: #e2e8f0;
	padding: 18px 20px;
	border-radius: 8px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 13px;
	line-height: 1.6;
	margin: 0;
	max-height: 70vh;
}

/* -------------------------------------------------------------------------
   Responsive tweaks
-------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.qp-wrap,
	.qp-paste-view {
		padding: 0 12px;
		margin: 24px auto;
	}

	.qp-paste-topbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.qp-row {
		flex-direction: column;
	}
}
