.cdp-root {
	font-family: Roboto, Arial, sans-serif;
	line-height: 1.6;
	text-align: center;
	margin: 0;
	padding: 0;
}

.cdp-container {
	max-width: 100%;
	margin: 0 auto;
	padding: 2px;
	border-radius: 10px;
}

.cdp-input-group {
	margin-top: 20px;
}

.cdp-textarea {
	padding: 13px;
	margin: 1px 0;
	border-radius: 15px;
	border: 2px solid #007bff;
	font-size: 16px;
	min-height: 200px;
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
}

.cdp-primary-btn,
.cdp-secondary-btn {
	width: 100%;
	padding: 20px;
	margin: 15px 0 1px 0;
	border-radius: 15px;
	border: none;
	font-size: 16px;
	color: #fff;
	cursor: pointer;
	font-weight: bold;
	transition: opacity 0.3s, transform 0.1s;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.cdp-primary-btn {
	background: linear-gradient(135deg, #4c9ef3, #bd39df, #bd39df, #72c4e8, #a3fff5, #e3ffa3);
	background-size: 500% 500%;
}

.cdp-secondary-btn {
	background: linear-gradient(135deg, #4c9ef3, #bd39df);
}

.cdp-primary-btn:hover,
.cdp-secondary-btn:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.cdp-section {
	margin-top: 15px;
}

.cdp-label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

.cdp-select {
	width: 100%;
	padding: 10px;
	margin: 5px 0;
	border-radius: 10px;
	border: 1px solid #ddd;
	font-size: 16px;
	box-sizing: border-box;
}

.cdp-response-container {
	display: grid;
	gap: 20px;
	margin-top: 20px;
}

.cdp-response {
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e2e2e2;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	text-align: left;
}

.cdp-poem-header {
	padding: 22px 28px 14px 28px;
	border-bottom: 1px solid #f0f0f0;
}

.cdp-response-title {
	font-weight: bold;
	font-size: 22px;
	color: #1a1a1a;
	margin: 0;
	outline: none;
	text-align: center;
}

.cdp-poem-body {
	padding: 20px 28px 28px 28px;
	color: #333;
	font-size: 15px;
	line-height: 1.95;
	text-align: center;
}

.cdp-poem-body[contenteditable="true"] {
	outline: none;
}

.cdp-poem-body p {
	margin: 0 0 18px 0;
}

.cdp-poem-body p:last-child {
	margin-bottom: 0;
}

.cdp-action-zone {
	border-top: 0;
	background: transparent;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.cdp-copy-button {
	width: 100%;
	padding: 10px 12px;
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #dfe3ea;
	border-radius: 12px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.2s, transform 0.1s, border-color 0.2s;
	box-sizing: border-box;
}

.cdp-copy-button i {
	color: #007bff;
}

.cdp-copy-button:hover {
	background: #f7f8fb;
	border-color: #cfd6e1;
	transform: translateY(-1px);
}

.cdp-action-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.cdp-mini-btn {
	padding: 12px 10px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13px;
	font-weight: bold;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: opacity 0.2s, transform 0.15s;
}

.cdp-mini-btn:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.cdp-btn-save {
	background: #007bff;
}

.cdp-btn-publish {
	background: #e74c3c;
}

.cdp-download-label {
	font-size: 11px;
	font-weight: bold;
	color: #aaa;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	margin-top: 6px;
}

.cdp-download-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.cdp-download-btn {
	padding: 10px 6px;
	border: 1px solid #dfe3ea;
	border-radius: 12px;
	cursor: pointer;
	font-size: 10px;
	font-weight: 800;
	color: #1a1a1a;
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	transition: background 0.2s, transform 0.15s, border-color 0.2s;
	text-align: center;
	line-height: 1.25;
}

.cdp-download-btn i {
	font-size: 16px;
}

.cdp-download-btn:hover {
	background: #f7f8fb;
	border-color: #cfd6e1;
	transform: translateY(-2px);
}

.cdp-download-btn:active {
	transform: translateY(0);
}

.cdp-download-btn.cdp-btn-txt i {
	color: #27ae60;
}

.cdp-download-btn.cdp-btn-pdf i {
	color: #e74c3c;
}

.cdp-download-btn.cdp-btn-img i {
	color: #8e44ad;
}

.cdp-loading {
	display: block;
	margin-top: 18px;
}

.cdp-loading-inner {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 6px solid rgba(0, 0, 0, 0.08);
	border-top-color: #bd39df;
	animation: cdp-spin 0.9s linear infinite;
}

@keyframes cdp-spin {
	to {
		transform: rotate(360deg);
	}
}

.cdp-loading img {
	max-width: 20%;
	height: auto;
}

.cdp-generating-card {
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e2e2e2;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	text-align: left;
}

.cdp-generating-top {
	padding: 18px 22px 12px 22px;
	border-bottom: 1px solid #f0f0f0;
}

.cdp-generating-title {
	font-weight: 800;
	font-size: 16px;
	color: #1a1a1a;
}

.cdp-generating-sub {
	margin-top: 6px;
	font-size: 13px;
	color: #666;
}

.cdp-generating-progress {
	height: 4px;
	background: #f0f0f0;
	overflow: hidden;
}

.cdp-generating-bar {
	height: 100%;
	width: 35%;
	background: linear-gradient(90deg, #4c9ef3, #bd39df, #72c4e8);
	animation: cdp-progress 1.1s ease-in-out infinite;
}

@keyframes cdp-progress {
	0% {
		transform: translateX(-120%);
	}
	100% {
		transform: translateX(320%);
	}
}

.cdp-generating-skeleton {
	padding: 18px 22px 22px 22px;
}

.cdp-skel-line {
	height: 12px;
	border-radius: 8px;
	background: linear-gradient(90deg, #f2f3f5, #e7e9ee, #f2f3f5);
	background-size: 200% 100%;
	animation: cdp-shimmer 1.2s linear infinite;
	margin: 10px 0;
}

.cdp-skel-gap {
	height: 10px;
}

.cdp-w-70 {
	width: 70%;
}

.cdp-w-76 {
	width: 76%;
}

.cdp-w-80 {
	width: 80%;
}

.cdp-w-88 {
	width: 88%;
}

.cdp-w-90 {
	width: 90%;
}

.cdp-w-92 {
	width: 92%;
}

@keyframes cdp-shimmer {
	0% {
		background-position: 0% 0%;
	}
	100% {
		background-position: 200% 0%;
	}
}

.cdp-toast {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%) translateY(60px);
	background: #1a1a1a;
	color: #fff;
	padding: 12px 24px;
	border-radius: 30px;
	font-size: 14px;
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
	z-index: 9999;
	pointer-events: none;
	white-space: nowrap;
}

.cdp-toast.cdp-show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.cdp-export-options {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 8px;
}

.cdp-export-options select {
	width: 100%;
	padding: 10px;
	border-radius: 10px;
	border: 1px solid #ddd;
	font-size: 12px;
	background: #fff;
}

.cdp-image-template {
	position: fixed;
	left: -9999px;
	top: 0;
	width: 520px;
	background: #fff;
	font-family: Georgia, serif;
	padding: 0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: none;
}

.cdp-public-wrap {
	margin-top: 16px;
}

.cdp-public-body {
	text-align: center;
}

.cdp-public-body p {
	text-align: center;
}

.cdp-public-title {
	margin: 0 0 14px 0;
	padding: 22px 28px 0 28px;
	font-weight: 800;
	font-size: 30px;
	line-height: 1.25;
	color: #1a1a1a;
	text-align: center;
}

body.single-cdp_poem .entry-title,
body.single-cdp_poem .post-title,
body.single-cdp_poem h1.entry-title,
body.single-cdp_poem h1.post-title {
	display: none;
}

body.post-type-archive-cdp_poem .entry-title,
body.post-type-archive-cdp_poem .post-title,
body.post-type-archive-cdp_poem h2.entry-title {
	text-align: center;
}

.cdp-vote-zone {
	margin-top: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.cdp-vote-section {
	margin-top: 14px;
	padding-top: 6px;
	display: flex;
	justify-content: center;
}

.cdp-vote-btn {
	padding: 9px 12px;
	border: 1px solid #dfe3ea;
	border-radius: 999px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 800;
	color: #1a1a1a;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.2s, transform 0.15s, border-color 0.2s, color 0.2s;
}

.cdp-vote-btn:hover {
	background: #f7f8fb;
	border-color: #cfd6e1;
	transform: translateY(-1px);
}

.cdp-vote-btn:active {
	transform: translateY(0);
}

.cdp-vote-like i {
	color: #27ae60;
}

.cdp-vote-dislike i {
	color: #e74c3c;
}

.cdp-vote-count {
	background: rgba(0, 0, 0, 0.06);
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
}

.cdp-vote-like.cdp-vote-active {
	background: #27ae60;
	border-color: #27ae60;
	color: #fff;
}

.cdp-vote-dislike.cdp-vote-active {
	background: #e74c3c;
	border-color: #e74c3c;
	color: #fff;
}

.cdp-vote-btn.cdp-vote-active .cdp-vote-count {
	background: rgba(255, 255, 255, 0.18);
}

.cdp-vote-btn.cdp-vote-active i {
	color: #fff;
}

.cdp-img-gradient-bar {
	height: 8px;
	background: linear-gradient(90deg, #4c9ef3, #bd39df, #72c4e8);
}

.cdp-img-content {
	padding: 36px 44px 40px 44px;
	text-align: center;
}

.cdp-img-title {
	font-size: 22px;
	font-weight: bold;
	color: #1a1a1a;
	margin: 0 0 22px 0;
	line-height: 1.3;
}

.cdp-img-divider {
	width: 50px;
	height: 3px;
	background: linear-gradient(90deg, #4c9ef3, #bd39df);
	margin: 0 auto 22px auto;
	border-radius: 2px;
}

.cdp-img-body {
	font-size: 14px;
	color: #333;
	line-height: 2;
	text-align: center;
	white-space: pre-wrap;
}

.cdp-img-footer {
	margin-top: 28px;
	font-size: 11px;
	color: #bbb;
	font-style: italic;
}

.cdp-img-bottom-bar {
	height: 8px;
	background: linear-gradient(90deg, #72c4e8, #bd39df, #4c9ef3);
}

/* History & Saved Poems styles */
.cdp-history-root {
	font-family: Roboto, Arial, sans-serif;
	color: #333;
	margin: 20px 0;
	padding: 0;
	text-align: left;
}

.cdp-history-container {
	background: #fff;
	border-radius: 16px;
	border: 1px solid #e2e2e2;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	padding: 24px;
	box-sizing: border-box;
}

.cdp-history-header {
	margin-bottom: 24px;
	text-align: center;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 16px;
}

.cdp-history-header h2 {
	font-size: 24px;
	font-weight: 800;
	color: #1a1a1a;
	margin: 0 0 8px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.cdp-history-header h2 i {
	color: #bd39df;
}

.cdp-history-header p {
	font-size: 14px;
	color: #666;
	margin: 0;
}

.cdp-history-tabs {
	display: flex;
	border-bottom: 2px solid #f0f0f0;
	margin-bottom: 20px;
	gap: 8px;
}

.cdp-history-tab-btn {
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 12px 20px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	color: #666;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cdp-history-tab-btn:hover {
	color: #bd39df;
	background: rgba(189, 57, 223, 0.04);
	border-radius: 8px 8px 0 0;
}

.cdp-history-tab-btn.active {
	color: #bd39df;
	border-bottom-color: #bd39df;
}

.cdp-history-filters {
	margin-bottom: 24px;
}

.cdp-search-wrapper {
	display: flex;
	gap: 10px;
	width: 100%;
}

.cdp-history-search {
	flex-grow: 1;
	padding: 12px 16px;
	border: 1.5px solid #e2e2e2;
	border-radius: 12px;
	font-size: 14px;
	outline: none;
	transition: all 0.3s ease;
	box-sizing: border-box;
	background: #fafafc;
}

.cdp-history-search:focus {
	border-color: #bd39df;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(189, 57, 223, 0.15);
}

.cdp-history-search-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, #bd39df 0%, #a229c1 100%);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 0 24px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(189, 57, 223, 0.2);
}

.cdp-history-search-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(189, 57, 223, 0.3);
	background: linear-gradient(135deg, #a229c1 0%, #871ea3 100%);
}

.cdp-history-search-btn:active {
	transform: translateY(0);
}

.cdp-search-svg {
	display: inline-block;
	vertical-align: middle;
}

.cdp-history-panel {
	display: none;
}

.cdp-history-panel.active {
	display: block;
	animation: cdp-fade-in 0.4s ease-out;
}

@keyframes cdp-fade-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.cdp-history-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.cdp-history-card {
	background: #fff;
	border: 1px solid #e9e9e9;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
	position: relative;
}

.cdp-history-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	border-color: #bd39df;
}

.cdp-card-header {
	padding: 16px;
	border-bottom: 1px solid #f9f9f9;
	background: #fafafc;
}

.cdp-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 6px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cdp-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	color: #888;
}

.cdp-card-tags {
	display: flex;
	gap: 4px;
}

.cdp-card-tag {
	background: rgba(0, 123, 255, 0.08);
	color: #007bff;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: 700;
}

.cdp-card-tag.type-tag {
	background: rgba(189, 57, 223, 0.08);
	color: #bd39df;
}

.cdp-card-body {
	padding: 16px;
	font-size: 13px;
	line-height: 1.6;
	color: #555;
	flex-grow: 1;
	overflow: hidden;
	max-height: 120px;
	position: relative;
	text-align: center;
}

.cdp-card-body::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 40px;
	background: linear-gradient(transparent, #fff);
	pointer-events: none;
}

.cdp-card-footer {
	padding: 12px 16px;
	border-top: 1px solid #f9f9f9;
	background: #fafafc;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.cdp-card-actions {
	display: flex;
	gap: 6px;
}

.cdp-card-btn {
	background: #fff;
	border: 1px solid #ddd;
	color: #555;
	padding: 6px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 12px;
	font-weight: bold;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 5px;
}

.cdp-card-btn:hover {
	background: #f0f0f0;
	color: #333;
}

.cdp-card-btn.btn-view {
	background: #bd39df;
	border-color: #bd39df;
	color: #fff;
}

.cdp-card-btn.btn-view:hover {
	background: #a229c1;
	border-color: #a229c1;
}

.cdp-card-btn.btn-delete {
	background: #fff;
	border-color: #ffe6e6;
	color: #e74c3c;
}

.cdp-card-btn.btn-delete:hover {
	background: #ffe6e6;
	color: #c0392b;
}

.cdp-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #888;
}

.cdp-empty-state i {
	font-size: 40px;
	color: #ddd;
	margin-bottom: 12px;
	display: block;
}

.cdp-empty-state p {
	font-size: 15px;
	margin: 0;
}

/* Modal styles */
.cdp-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.55);
	backdrop-filter: blur(4px);
}

.cdp-modal-content {
	background-color: #fefefe;
	margin: 5% auto;
	padding: 0;
	border: none;
	border-radius: 16px;
	width: 90%;
	max-width: 550px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
	animation: cdp-modal-slide 0.3s ease-out;
	overflow: hidden;
}

@keyframes cdp-modal-slide {
	from { transform: translateY(-40px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.cdp-modal-close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	position: absolute;
	right: 20px;
	top: 15px;
	transition: color 0.2s;
	z-index: 10;
}

.cdp-modal-close:hover,
.cdp-modal-close:focus {
	color: #333;
}

.cdp-modal-body {
	position: relative;
}

.cdp-modal-body .cdp-response {
	box-shadow: none;
	border: none;
	border-radius: 0;
}

