/**
 * WooCommerce Chatflow Order - Frontend Conversational Stylesheet
 */

.wcco-chat-container {
	--wcco-theme: #075E54;
	--wcco-accent: #10b981;
	--wcco-bg: #efeae2;
	--wcco-user-bubble: #dcf8c6;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 540px;
	margin: 24px auto;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 12px 36px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	border: 1px solid rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	color: #1e293b;
	line-height: 1.45;
}

/* Header */
.wcco-chat-header {
	background: var(--wcco-theme);
	color: #ffffff;
	padding: 14px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wcco-header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wcco-avatar-wrap {
	position: relative;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}

.wcco-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.85);
	background: #fff;
}

.wcco-online-dot {
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 11px;
	height: 11px;
	background: #22c55e;
	border-radius: 50%;
	border: 2px solid var(--wcco-theme);
}

.wcco-agent-name {
	font-weight: 700;
	font-size: 15px;
	letter-spacing: -0.01em;
}

.wcco-agent-role {
	font-size: 12px;
	opacity: 0.9;
}

.wcco-step-badge {
	background: rgba(255, 255, 255, 0.18);
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

/* Progress Bar */
.wcco-progress-bar {
	height: 4px;
	background: #e2e8f0;
	width: 100%;
}

.wcco-progress-fill {
	height: 100%;
	background: #22c55e;
	transition: width 0.35s ease;
}

/* Chat Body */
.wcco-chat-body {
	background-color: var(--wcco-bg);
	background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 0);
	background-size: 18px 18px;
	padding: 16px;
	min-height: 360px;
	max-height: 540px;
	overflow-y: auto;
	scroll-behavior: smooth;
}

.wcco-chat-date-pill {
	text-align: center;
	background: rgba(255, 255, 255, 0.86);
	color: #475569;
	font-size: 11.5px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	width: fit-content;
	margin: 0 auto 14px auto;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wcco-msg-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 12px;
	animation: wccoFadeUp 0.25s ease-out;
}

.wcco-msg-row.wcco-msg-user {
	justify-content: flex-end;
}

@keyframes wccoFadeUp {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wcco-msg-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.wcco-bubble {
	max-width: 85%;
	padding: 11px 14px;
	border-radius: 14px;
	font-size: 14px;
	position: relative;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	word-wrap: break-word;
}

.wcco-msg-bot .wcco-bubble {
	background: #ffffff;
	color: #1e293b;
	border-bottom-left-radius: 4px;
}

.wcco-msg-user .wcco-bubble {
	background: var(--wcco-user-bubble);
	color: #0f172a;
	border-bottom-right-radius: 4px;
	font-weight: 500;
}

.wcco-bubble-time {
	display: block;
	font-size: 10.5px;
	color: #64748b;
	text-align: right;
	margin-top: 4px;
}

/* Typing indicator */
.wcco-typing-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.wcco-typing-bubble {
	background: #ffffff;
	padding: 10px 14px;
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	display: inline-flex;
	gap: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wcco-typing-bubble span {
	width: 7px;
	height: 7px;
	background: #94a3b8;
	border-radius: 50%;
	animation: wccoBlink 1.3s infinite both;
}

.wcco-typing-bubble span:nth-child(2) {
	animation-delay: 0.2s;
}

.wcco-typing-bubble span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes wccoBlink {
	0%, 80%, 100% {
		opacity: 0.3;
		transform: scale(0.85);
	}
	40% {
		opacity: 1;
		transform: scale(1);
	}
}

/* Dock area for inputs & interactive cards */
.wcco-chat-dock {
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	padding: 14px 16px;
}

/* Package Cards inside Dock */
.wcco-pkg-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wcco-pkg-card {
	background: #ffffff;
	border: 2px solid #cbd5e1;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: all 0.2s ease;
	position: relative;
}

.wcco-pkg-card:hover {
	border-color: var(--wcco-theme);
	background: #f0fdf4;
	transform: translateY(-1px);
}

.wcco-pkg-badge {
	position: absolute;
	top: -10px;
	right: 12px;
	background: #ef4444;
	color: #ffffff;
	font-size: 10px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wcco-pkg-title {
	font-weight: 700;
	font-size: 14.5px;
	color: #0f172a;
}

.wcco-pkg-sub {
	font-size: 12px;
	color: #475569;
	margin-top: 2px;
}

.wcco-pkg-price-box {
	text-align: right;
	flex-shrink: 0;
	margin-left: 10px;
}

.wcco-pkg-price {
	font-weight: 800;
	font-size: 16px;
	color: #059669;
}

.wcco-pkg-old-price {
	font-size: 12px;
	color: #94a3b8;
	text-decoration: line-through;
	display: block;
}

/* Input Controls */
.wcco-input-group {
	display: flex;
	gap: 8px;
}

.wcco-text-input,
.wcco-select-input {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	font-size: 14.5px;
	background: #ffffff;
	color: #0f172a;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.wcco-text-input:focus,
.wcco-select-input:focus {
	border-color: var(--wcco-theme);
}

.wcco-send-btn {
	background: var(--wcco-theme);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	padding: 11px 18px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.2s;
}

.wcco-send-btn:hover {
	opacity: 0.92;
}

.wcco-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.wcco-address-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 8px;
}

/* Receipt / Order Summary inside Chat */
.wcco-receipt-card {
	background: #f8fafc;
	border: 1px dashed #94a3b8;
	border-radius: 10px;
	padding: 12px;
	margin-top: 8px;
	font-size: 13px;
}

.wcco-receipt-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
}

.wcco-receipt-total {
	display: flex;
	justify-content: space-between;
	border-top: 1px solid #cbd5e1;
	padding-top: 8px;
	margin-top: 6px;
	font-weight: 800;
	font-size: 15px;
	color: #059669;
}

/* Payment Method Buttons */
.wcco-pay-option {
	background: #ffffff;
	border: 2px solid #cbd5e1;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: all 0.2s ease;
}

.wcco-pay-option.selected {
	border-color: #059669;
	background: #f0fdf4;
}

.wcco-pay-title {
	font-weight: 700;
	font-size: 14px;
	color: #0f172a;
}

.wcco-pay-sub {
	font-size: 12px;
	color: #475569;
}

.wcco-pay-tag {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
	background: #dcfce7;
	color: #166534;
}

.wcco-checkout-btn {
	width: 100%;
	background: #16a34a;
	color: #ffffff;
	border: none;
	border-radius: 12px;
	padding: 14px 18px;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
	transition: transform 0.15s ease, background 0.15s ease;
}

.wcco-checkout-btn:hover {
	background: #15803d;
	transform: translateY(-1px);
}

/* Footer */
.wcco-chat-footer {
	background: #f1f5f9;
	text-align: center;
	padding: 8px 12px;
	font-size: 11.5px;
	color: #475569;
	border-top: 1px solid #e2e8f0;
}

.wcco-reset-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 12px;
	color: #64748b;
	text-decoration: underline;
	cursor: pointer;
}
