/**
 * Copilot Chat Widget — Frontend Styles
 *
 * BEM-like naming prefixed with .ccw- to avoid conflicts.
 *
 * @package CopilotChatWidget
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
	--ccw-z-index: 999999;
	--ccw-bubble-size: 60px;
	--ccw-bubble-size-mobile: 50px;
	--ccw-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	--ccw-shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
	--ccw-radius: 12px;
	--ccw-radius-msg: 18px;
	--ccw-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--ccw-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ==========================================================================
   Widget Container
   ========================================================================== */

.ccw-widget {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: var(--ccw-z-index);
	font-family: var(--ccw-font-family);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.ccw-widget--left {
	right: auto;
	left: 20px;
}

/* ==========================================================================
   Chat Bubble
   ========================================================================== */

.ccw-bubble {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ccw-bubble-size);
	height: var(--ccw-bubble-size);
	border-radius: 50%;
	border: none;
	cursor: pointer;
	color: #fff;
	box-shadow: var(--ccw-shadow-heavy);
	transition: transform var(--ccw-transition), box-shadow var(--ccw-transition);
	animation: ccw-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both;
	outline: none;
}

.ccw-bubble:hover {
	transform: scale(1.08);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.ccw-bubble:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), var(--ccw-shadow-heavy);
}

.ccw-bubble:active {
	transform: scale(0.96);
}

.ccw-bubble__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ccw-bubble__icon svg {
	fill: none;
}

/* Badge */
.ccw-bubble__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: opacity var(--ccw-transition), transform var(--ccw-transition);
}

.ccw-bubble__badge--hidden {
	opacity: 0;
	transform: scale(0);
}

/* Entrance Animation */
@keyframes ccw-entrance {
	0% {
		opacity: 0;
		transform: scale(0.3) translateY(20px);
	}
	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Pulse Animation */
.ccw-bubble--pulse {
	animation: ccw-pulse 2s ease-in-out;
}

@keyframes ccw-pulse {
	0%, 100% {
		box-shadow: var(--ccw-shadow-heavy);
	}
	50% {
		box-shadow: 0 0 0 12px rgba(0, 120, 212, 0.2), var(--ccw-shadow-heavy);
	}
}

/* Hidden state */
.ccw-bubble--hidden {
	opacity: 0;
	transform: scale(0);
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
}

/* ==========================================================================
   Chat Window
   ========================================================================== */

.ccw-window {
	position: absolute;
	bottom: calc(var(--ccw-bubble-size) + 16px);
	right: 0;
	border-radius: var(--ccw-radius);
	background: #fff;
	box-shadow: var(--ccw-shadow-heavy);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform-origin: bottom right;
	transition: opacity var(--ccw-transition), transform var(--ccw-transition);
}

.ccw-widget--left .ccw-window {
	right: auto;
	left: 0;
	transform-origin: bottom left;
}

/* Open/Close Animations */
.ccw-window--opening {
	animation: ccw-window-open 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ccw-window--closing {
	animation: ccw-window-close 0.25s ease-in forwards;
}

@keyframes ccw-window-open {
	0% {
		opacity: 0;
		transform: scale(0.85) translateY(20px);
	}
	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@keyframes ccw-window-close {
	0% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
	100% {
		opacity: 0;
		transform: scale(0.85) translateY(20px);
	}
}

/* Header */
.ccw-window__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	color: #fff;
	flex-shrink: 0;
}

.ccw-window__header-left {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.ccw-window__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ccw-window__title {
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ccw-window__header-right {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.ccw-window__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s;
}

.ccw-window__btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

.ccw-window__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Messages Area */
.ccw-window__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f5f5f5;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ccw-window__messages::-webkit-scrollbar {
	width: 4px;
}

.ccw-window__messages::-webkit-scrollbar-track {
	background: transparent;
}

.ccw-window__messages::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 2px;
}

/* GDPR Notice */
.ccw-gdpr-notice {
	text-align: center;
	font-size: 11px;
	color: #999;
	padding: 4px 8px;
	background: rgba(0, 0, 0, 0.03);
	border-radius: 8px;
	margin-bottom: 4px;
}

/* Message Bubbles */
.ccw-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: var(--ccw-radius-msg);
	word-wrap: break-word;
	animation: ccw-msg-in 0.3s ease-out;
	position: relative;
}

@keyframes ccw-msg-in {
	0% {
		opacity: 0;
		transform: translateY(8px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.ccw-msg--bot {
	align-self: flex-start;
	background: #fff;
	color: #333;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ccw-msg--user {
	align-self: flex-end;
	color: #fff;
	border-bottom-right-radius: 4px;
	white-space: pre-wrap;
}

.ccw-msg__text {
	margin: 0;
}

.ccw-msg-break {
	height: 10px;
}

.ccw-msg__text strong {
	font-weight: 700;
}

.ccw-msg__text em {
	font-style: italic;
}

.ccw-msg__text ul,
.ccw-msg__text ol {
	margin: 4px 0;
	padding-left: 18px;
}

.ccw-msg__text li {
	margin-bottom: 2px;
}

.ccw-msg__text a {
	color: #2E75B6;
	text-decoration: underline;
}

.ccw-msg--user .ccw-msg__text a {
	color: #fff;
}

.ccw-msg__text hr {
	border: none;
	border-top: 1px solid #ddd;
	margin: 8px 0;
}

/* ==========================================================================
   Product Cards (Table → Card Conversion)
   ========================================================================== */

.ccw-product-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 8px 0;
}

/* Variant header (blue left border + subtle background) */
.ccw-variant-header {
	font-weight: 600;
	font-size: 13px;
	color: var(--ccw-accent-color, #2E75B6);
	background: rgba(46, 117, 182, 0.08);
	padding: 6px 10px;
	border-radius: 6px;
	margin: 10px 0 6px;
	border-left: 3px solid var(--ccw-accent-color, #2E75B6);
	align-self: stretch;
}

.ccw-variant-header + .ccw-product-list {
	margin-top: 4px;
}

.ccw-order-products-readonly .ccw-variant-header {
	margin: 6px -10px 4px;
	padding: 4px 10px;
	font-size: 12px;
	border-radius: 0;
}

.ccw-order-products-readonly .ccw-variant-header:first-child {
	margin-top: 0;
	border-radius: 6px 6px 0 0;
}

/* Variant picker (in form flow) */
.ccw-variant-picker {
	align-self: stretch;
	margin: 8px 0;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-variant-select {
	background: rgba(0, 0, 0, 0.02);
	border-radius: 8px;
	padding: 8px 10px;
	margin-bottom: 6px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}

.ccw-variant-select--unchecked {
	opacity: 0.5;
}

.ccw-variant-select--unchecked .ccw-variant-products {
	text-decoration: line-through;
	color: #bbb;
}

.ccw-variant-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	margin-bottom: 4px;
}

.ccw-variant-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--ccw-accent-color, #2E75B6);
	cursor: pointer;
	flex-shrink: 0;
}

.ccw-variant-check-label {
	font-weight: 600;
	font-size: 13px;
	color: var(--ccw-accent-color, #2E75B6);
}

.ccw-variant-products {
	margin-top: 4px;
	padding-left: 24px;
}

.ccw-variant-products .ccw-order-product-line {
	font-size: 12px;
	line-height: 1.5;
	color: #444;
}

.ccw-variant-products .ccw-order-product-location {
	font-size: 11px;
	color: #888;
	margin-left: 18px;
}

.ccw-product-card {
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	padding: 8px 10px;
	border-left: 3px solid var(--ccw-accent-color, #2E75B6);
}

.ccw-product-name {
	font-weight: 600;
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 2px;
}

.ccw-product-details {
	font-size: 12px;
	color: #555;
	line-height: 1.4;
}

.ccw-product-nr {
	color: #777;
}

.ccw-product-qty strong {
	color: #1a1a1a;
}

.ccw-product-location {
	font-size: 11px;
	color: #888;
	margin-top: 2px;
}

.ccw-total-box {
	background: rgba(46, 117, 182, 0.1);
	border-radius: 8px;
	padding: 8px 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	margin-top: 8px;
}

.ccw-disclaimer {
	font-size: 11px;
	color: #999;
	font-style: italic;
	text-align: center;
	margin-top: 2px;
}

.ccw-cta {
	font-size: 12px;
	color: #555;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Order Summary Styles
   ========================================================================== */

.ccw-order-header {
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 8px;
	line-height: 1.3;
}

.ccw-order-section-label {
	font-size: 10px;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
	margin-top: 4px;
}

.ccw-order-divider {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	margin: 8px 0 6px;
}

.ccw-customer-data {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3px;
}

.ccw-customer-row {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 12px;
	line-height: 1.4;
}

.ccw-customer-icon {
	font-size: 12px;
	flex-shrink: 0;
	width: 16px;
	text-align: center;
}

.ccw-customer-value {
	color: #333;
	word-break: break-word;
}

.ccw-msg-text {
	font-size: 12px;
	line-height: 1.5;
	margin-bottom: 4px;
}

/* ==========================================================================
   Read-Only Product Summary (Order Form Header)
   ========================================================================== */

.ccw-order-products-readonly {
	background: rgba(0, 0, 0, 0.03);
	border-radius: 8px;
	padding: 10px 12px;
	margin: 8px 0;
	align-self: stretch;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-order-product-line {
	font-size: 12px;
	line-height: 1.5;
	color: #444;
	padding: 2px 0;
}

.ccw-order-product-total {
	font-size: 12px;
	font-weight: 600;
	color: #333;
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Success Message (After Order Submission)
   ========================================================================== */

.ccw-success-message {
	text-align: center;
	padding: 20px 12px;
	align-self: stretch;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-success-icon {
	font-size: 36px;
	margin-bottom: 8px;
}

.ccw-success-title {
	font-weight: 600;
	font-size: 15px;
	color: #1E8449;
	margin-bottom: 6px;
}

.ccw-success-text {
	font-size: 12px;
	color: #666;
	line-height: 1.5;
}

/* Prevent long words from breaking layout in bot messages */
.ccw-msg--bot .ccw-msg__text {
	word-break: break-word;
	overflow-wrap: break-word;
}

.ccw-msg__time {
	display: block;
	font-size: 10px;
	margin-top: 4px;
	opacity: 0.6;
}

.ccw-msg--bot .ccw-msg__time {
	text-align: left;
}

.ccw-msg--user .ccw-msg__time {
	text-align: right;
}

/* Thinking Indicator (Progressive) */
.ccw-thinking-bubble {
	align-self: flex-start;
	background: #fff;
	border-radius: var(--ccw-radius-msg);
	border-bottom-left-radius: 4px;
	padding: 12px 16px;
	max-width: 85%;
	min-width: 200px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	animation: ccw-fadeIn 0.3s ease;
}

.ccw-thinking-header {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ccw-dots {
	display: flex;
	gap: 4px;
	align-items: center;
	flex-shrink: 0;
}

.ccw-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #2E75B6;
	opacity: 0.4;
	animation: ccw-dotPulse 1.4s infinite ease-in-out;
}

.ccw-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.ccw-dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes ccw-dotPulse {
	0%, 80%, 100% {
		opacity: 0.3;
		transform: scale(0.8);
	}
	40% {
		opacity: 1;
		transform: scale(1.1);
	}
}

.ccw-thinking-text {
	font-size: 12px;
	color: #888;
	font-style: italic;
	opacity: 0;
	transition: opacity 0.3s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ccw-thinking-text--visible {
	opacity: 1;
}

.ccw-progress-track {
	width: 100%;
	height: 3px;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 2px;
	overflow: hidden;
	margin-top: 8px;
}

.ccw-progress-fill {
	height: 100%;
	width: 0%;
	background: #2E75B6;
	border-radius: 2px;
	transition: width 0.8s ease-out;
}

.ccw-fade-out {
	animation: ccw-fadeOut 0.3s ease forwards;
}

@keyframes ccw-fadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ccw-fadeOut {
	from { opacity: 1; }
	to { opacity: 0; transform: translateY(-4px); }
}

/* Error Message */
.ccw-error {
	text-align: center;
	padding: 16px;
	align-self: center;
}

.ccw-error__text {
	color: #e74c3c;
	font-size: 13px;
	margin: 0 0 8px;
}

.ccw-error__retry {
	background: none;
	border: 1px solid #e74c3c;
	color: #e74c3c;
	padding: 6px 16px;
	border-radius: 20px;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.2s, color 0.2s;
}

.ccw-error__retry:hover {
	background: #e74c3c;
	color: #fff;
}

/* Input Area */
.ccw-window__input-area {
	display: flex;
	align-items: flex-end;
	padding: 8px 12px;
	border-top: 1px solid #e5e5e5;
	background: #fff;
	gap: 8px;
	flex-shrink: 0;
}

.ccw-window__input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 8px 14px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	resize: none;
	outline: none;
	max-height: 100px;
	overflow-y: auto;
	transition: border-color 0.2s;
}

.ccw-window__input:focus {
	border-color: #0078D4;
}

.ccw-window__input::placeholder {
	color: #aaa;
}

.ccw-window__send {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
	transition: opacity 0.2s, transform 0.2s;
}

.ccw-window__send:hover {
	opacity: 0.85;
}

.ccw-window__send:active {
	transform: scale(0.92);
}

.ccw-window__send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Footer */
.ccw-window__footer {
	text-align: center;
	padding: 6px;
	font-size: 10px;
	color: #bbb;
	background: #fff;
	border-top: 1px solid #f0f0f0;
	flex-shrink: 0;
}

/* ==========================================================================
   Order Form (In-Chat)
   ========================================================================== */

.ccw-order-form {
	background: #fff;
	border-radius: var(--ccw-radius);
	padding: 16px;
	margin: 8px 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	align-self: stretch;
	max-width: 100%;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-order-form__title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #333;
}

.ccw-order-form__group {
	margin-bottom: 10px;
}

.ccw-order-form__label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #555;
	margin-bottom: 3px;
}

.ccw-order-form__label--required::after {
	content: " *";
	color: #e74c3c;
}

.ccw-order-form__input,
.ccw-order-form__select,
.ccw-order-form__textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-family: inherit;
	font-size: 13px;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.ccw-order-form__input:focus,
.ccw-order-form__select:focus,
.ccw-order-form__textarea:focus {
	border-color: #0078D4;
}

.ccw-order-form__row {
	display: flex;
	gap: 8px;
}

.ccw-order-form__row .ccw-order-form__group {
	flex: 1;
}

.ccw-order-form__textarea {
	resize: vertical;
	min-height: 50px;
}

.ccw-order-form__actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.ccw-order-form__btn {
	flex: 1;
	padding: 10px 12px;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.15s;
	text-align: center;
}

.ccw-order-form__btn:hover {
	opacity: 0.9;
}

.ccw-order-form__btn:active {
	transform: scale(0.97);
}

.ccw-order-form__btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ccw-order-form__btn--email {
	background: #0078D4;
	color: #fff;
}

.ccw-order-form__btn--whatsapp {
	background: #25D366;
	color: #fff;
}

.ccw-order-form__status {
	text-align: center;
	font-size: 12px;
	margin-top: 8px;
	padding: 6px;
	border-radius: 6px;
}

.ccw-order-form__status--success {
	background: #d4edda;
	color: #155724;
}

.ccw-order-form__status--error {
	background: #f8d7da;
	color: #721c24;
}

/* ==========================================================================
   Form Prefill (Conversational Flow)
   ========================================================================== */

.ccw-form-prefill {
	align-self: flex-start;
	max-width: 85%;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-form-prefill__value {
	background: #e8f4fd;
	color: #1a5a96;
	padding: 8px 14px;
	border-radius: var(--ccw-radius-msg);
	border-bottom-left-radius: 4px;
	font-size: 13px;
	margin-bottom: 4px;
	word-wrap: break-word;
	white-space: pre-wrap;
}

/* ==========================================================================
   Action Buttons (Post-Consultation)
   ========================================================================== */

.ccw-action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px 0;
	margin-top: 8px;
	align-self: flex-start;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-action-buttons--wrap {
	max-width: 100%;
}

.ccw-action-btn {
	border: none;
	border-radius: 20px;
	padding: 8px 16px;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	transition: all 0.2s;
}

.ccw-action-btn:focus-visible {
	outline: 2px solid #2E75B6;
	outline-offset: 2px;
}

.ccw-action-btn--primary {
	background: #2E75B6;
	color: #fff;
}

.ccw-action-btn--primary:hover {
	background: #1a5a96;
}

.ccw-action-btn--secondary {
	background: #f0f0f0;
	color: #333;
	border: 1px solid #ddd;
}

.ccw-action-btn--secondary:hover {
	background: #e0e0e0;
}

/* Used/disabled state — buttons stay visible after click */
/* Cancel button during form flow */
.ccw-form-cancel-row {
	align-self: flex-start;
	margin-top: 4px;
	animation: ccw-msg-in 0.3s ease-out;
}

.ccw-action-btn--cancel {
	background: transparent;
	color: #999;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 6px 14px;
	cursor: pointer;
	font-family: inherit;
	font-size: 12px;
	transition: all 0.2s;
}

.ccw-action-btn--cancel:hover {
	color: #e74c3c;
	border-color: #e74c3c;
}

/* Used/disabled state — buttons stay visible after click */
.ccw-action-btn--used {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
}

.ccw-action-btn--selected {
	opacity: 0.8;
	outline: 2px solid var(--ccw-accent-color, #2E75B6);
	outline-offset: -2px;
}

.ccw-action-btn--whatsapp {
	background: #25D366;
	color: #fff;
}

.ccw-action-btn--whatsapp:hover {
	background: #1da851;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 480px) {
	.ccw-window__input {
		font-size: 16px !important;
	}

	.ccw-bubble {
		width: var(--ccw-bubble-size-mobile);
		height: var(--ccw-bubble-size-mobile);
	}

	.ccw-window {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100% !important;
		height: 100% !important;
		border-radius: 0;
		z-index: calc(var(--ccw-z-index) + 1);
	}

	.ccw-window--opening {
		animation: ccw-window-open-mobile 0.3s ease-out forwards;
	}

	@keyframes ccw-window-open-mobile {
		0% {
			opacity: 0;
			transform: translateY(100%);
		}
		100% {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.ccw-window--closing {
		animation: ccw-window-close-mobile 0.25s ease-in forwards;
	}

	@keyframes ccw-window-close-mobile {
		0% {
			opacity: 1;
			transform: translateY(0);
		}
		100% {
			opacity: 0;
			transform: translateY(100%);
		}
	}
}

/* Hide on mobile if configured */
.ccw-widget--no-mobile {
	/* JS handles the actual hide, this is a fallback via media query */
}

@media (max-width: 480px) {
	.ccw-widget--no-mobile {
		display: none !important;
	}
}

/* ==========================================================================
   WebChat Overrides (when embedded)
   ========================================================================== */

.ccw-webchat-container {
	flex: 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Hide WebChat's built-in send box when we use our own */
.ccw-webchat-container .webchat__send-box {
	display: none !important;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.ccw-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.ccw-bubble,
	.ccw-window,
	.ccw-msg,
	.ccw-order-form {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}

	.ccw-typing__dot {
		animation: none;
		opacity: 0.6;
	}
}
