/* ============================================================
   Taj Tour Chatbot — frontend styles
   ============================================================ */

#ttc-root {
	--ttc-primary:      #1e7a8a;
	--ttc-primary-dark: #155f6d;
	--ttc-bg:           #ffffff;
	--ttc-bg-soft:      #f4f9fa;
	--ttc-text:         #1c2230;
	--ttc-text-light:   #6b7280;
	--ttc-border:       #e0e8ea;
	--ttc-bot-bubble:   #eef6f8;
	--ttc-radius:       18px;
	--ttc-shadow:       0 16px 48px rgba(0, 60, 80, 0.18), 0 2px 8px rgba(0, 60, 80, 0.08);
	--ttc-bottom:       24px;
	--ttc-side:         24px;

	position: fixed;
	bottom: var(--ttc-bottom);
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#ttc-root.ttc-bottom-right { right: var(--ttc-side); }
#ttc-root.ttc-bottom-left  { left:  var(--ttc-side); }

/* ── Toggle button ─────────────────────────────────────────── */

.ttc-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, var(--ttc-primary), var(--ttc-primary-dark));
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 12px 18px;
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(30, 122, 138, 0.38);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	position: relative;
	z-index: 2;
}

.ttc-toggle:hover {
	transform: scale(1.04);
	box-shadow: 0 6px 28px rgba(30, 122, 138, 0.48);
}

.ttc-toggle-icon { font-size: 20px; }

.ttc-cta-label {
	white-space: nowrap;
	font-size: 13.5px;
}

.ttc-pulse {
	animation: ttcPulse 2.5s ease-in-out infinite;
}

#ttc-root.ttc-open .ttc-pulse {
	animation: none;
}

@keyframes ttcPulse {
	0%, 100% { box-shadow: 0 4px 20px rgba(30, 122, 138, 0.38); }
	50%       { box-shadow: 0 4px 32px rgba(30, 122, 138, 0.6); }
}

/* ── Panel ─────────────────────────────────────────────────── */

.ttc-panel {
	position: absolute;
	bottom: calc(100% + 12px);
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 580px;
	max-height: 78vh;
	background: var(--ttc-bg);
	border-radius: var(--ttc-radius);
	box-shadow: var(--ttc-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
	transition: opacity 0.22s ease, transform 0.22s ease;
}

#ttc-root.ttc-bottom-right .ttc-panel { right: 0; }
#ttc-root.ttc-bottom-left  .ttc-panel { left: 0; transform-origin: bottom left; }

.ttc-hidden {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.92) translateY(10px);
}

/* ── Header ────────────────────────────────────────────────── */

.ttc-header {
	background: linear-gradient(135deg, var(--ttc-primary), var(--ttc-primary-dark));
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.ttc-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ttc-avatar {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255,255,255,.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex-shrink: 0;
	overflow: hidden;
}

.ttc-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 10px;
}

.ttc-title {
	font-weight: 700;
	font-size: 14.5px;
	line-height: 1.2;
}

.ttc-subtitle {
	font-size: 11.5px;
	opacity: 0.85;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 2px;
}

.ttc-dot {
	width: 7px;
	height: 7px;
	background: #4ade80;
	border-radius: 50%;
	flex-shrink: 0;
	animation: ttcDotPulse 2s ease-in-out infinite;
}

@keyframes ttcDotPulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.5; }
}

.ttc-restart {
	background: rgba(255,255,255,.15);
	border: none;
	color: #fff;
	font-size: 18px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.ttc-restart:hover { background: rgba(255,255,255,.28); }

/* ── Messages area ─────────────────────────────────────────── */

.ttc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}

.ttc-messages::-webkit-scrollbar { width: 4px; }
.ttc-messages::-webkit-scrollbar-track { background: transparent; }
.ttc-messages::-webkit-scrollbar-thumb { background: var(--ttc-border); border-radius: 2px; }

.ttc-msg { display: flex; }
.ttc-msg.ttc-user { justify-content: flex-end; }
.ttc-msg.ttc-bot  { justify-content: flex-start; }

.ttc-bubble {
	max-width: 86%;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 13px;
	line-height: 1.5;
}

.ttc-bot-bubble {
	background: var(--ttc-bot-bubble);
	color: var(--ttc-text);
	border-bottom-left-radius: 4px;
}

.ttc-user-bubble {
	background: var(--ttc-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* ── Typing indicator ──────────────────────────────────────── */

.ttc-typing {
	background: var(--ttc-bot-bubble);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	padding: 10px 16px;
	display: flex;
	gap: 4px;
	align-items: center;
}

.ttc-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ttc-primary);
	opacity: 0.5;
	animation: ttcTyping 1.2s ease-in-out infinite;
}

.ttc-typing span:nth-child(2) { animation-delay: 0.15s; }
.ttc-typing span:nth-child(3) { animation-delay: 0.30s; }

@keyframes ttcTyping {
	0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
	40%            { transform: scale(1.1); opacity: 1; }
}

/* ── Destination grid ──────────────────────────────────────── */

.ttc-dest-grid {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.ttc-dest-card {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ttc-bg);
	border: 1.5px solid var(--ttc-border);
	border-radius: 12px;
	padding: 10px 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.ttc-dest-card:hover {
	border-color: var(--ttc-primary);
	box-shadow: 0 4px 14px rgba(30, 122, 138, 0.12);
	transform: translateY(-1px);
}

.ttc-dest-card:active { transform: scale(0.98); }

.ttc-dest-img {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--ttc-bg-soft);
}

.ttc-dest-placeholder {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	background: var(--ttc-bg-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	flex-shrink: 0;
}

.ttc-dest-info { flex: 1; min-width: 0; }

.ttc-dest-title {
	font-weight: 600;
	font-size: 13.5px;
	color: var(--ttc-text);
}

/* Rating row inside destination cards — reuses the same star/review classes */
.ttc-dest-info .ttc-rating-row {
	margin-top: 4px;
}

.ttc-dest-arrow {
	color: var(--ttc-primary);
	font-size: 20px;
	font-weight: 300;
	flex-shrink: 0;
}

.ttc-dest-grid.ttc-locked .ttc-dest-card {
	opacity: 0.45;
	pointer-events: none;
}

/* ── Package list ──────────────────────────────────────────── */

.ttc-pkg-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.ttc-pkg-card {
	background: var(--ttc-bg);
	border: 1.5px solid var(--ttc-border);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease;
}

.ttc-pkg-card:hover {
	box-shadow: 0 6px 20px rgba(30, 122, 138, 0.1);
}

.ttc-pkg-img-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 12px 12px 0 0;
	flex-shrink: 0;
}

.ttc-pkg-img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}

/* Popular / Best Seller ribbon — diagonal banner top-left */

.ttc-pkg-ribbon {
	position: absolute;
	top: 16px;
	left: -26px;
	z-index: 5;
	width: 110px;
	background: linear-gradient(135deg, #e63329, #c0392b);
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 5px 0;
	transform: rotate( -45deg );
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: clip;
}

.ttc-pkg-info {
	padding: 10px 12px;
	flex: 1;
}

.ttc-pkg-title {
	font-weight: 700;
	font-size: 13.5px;
	color: var(--ttc-text);
	line-height: 1.4;
	word-break: break-word;
}

.ttc-pkg-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.ttc-duration-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #f0f9fb;
	color: var(--ttc-primary);
	border: 1px solid #c5e8ed;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
	white-space: nowrap;
}

.ttc-dur-icon { font-size: 13px; line-height: 1; }
.ttc-dur-text { font-size: 11px; }

/* Star rating */

.ttc-rating-row {
	display: flex;
	align-items: center;
	gap: 5px;
}

.ttc-stars {
	position: relative;
	display: inline-block;
	font-size: 13px;
	line-height: 1;
	letter-spacing: 1px;
}

.ttc-stars-bg { color: #d1d5db; }

.ttc-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #f59e0b;
}

.ttc-reviews-count {
	font-size: 11px;
	color: var(--ttc-text-light);
}

.ttc-pkg-price-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.ttc-price-base {
	text-decoration: line-through;
	font-size: 12px;
	color: var(--ttc-text-light);
	font-weight: 400;
}

.ttc-price-disc {
	font-size: 18px;
	font-weight: 800;
	color: var(--ttc-primary);
}

.ttc-price-only {
	font-size: 18px;
	font-weight: 800;
	color: var(--ttc-primary);
}

.ttc-price-contact {
	font-size: 12px;
	color: var(--ttc-text-light);
}

.ttc-save-badge {
	background: #dcfce7;
	color: #166534;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 20px;
	text-transform: uppercase;
}

.ttc-book-btn {
	display: block;
	width: calc(100% - 24px);
	margin: 0 12px 12px;
	background: linear-gradient(135deg, var(--ttc-primary), var(--ttc-primary-dark));
	color: #fff;
	border: none;
	border-radius: 9px;
	padding: 10px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ttc-book-btn:hover { opacity: 0.9; }

.ttc-pkg-list.ttc-locked .ttc-book-btn {
	opacity: 0.4;
	pointer-events: none;
}

/* ── Back button ───────────────────────────────────────────── */

.ttc-back-btn {
	background: none;
	border: 1.5px solid var(--ttc-border);
	color: var(--ttc-primary);
	font-size: 12.5px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 20px;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.ttc-back-btn:hover { border-color: var(--ttc-primary); }

/* ── Booking form ──────────────────────────────────────────── */

.ttc-form {
	background: var(--ttc-bg);
	border: 1.5px solid var(--ttc-border);
	border-radius: 14px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
}

.ttc-book-summary {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ttc-bg-soft);
	border-radius: 10px;
	padding: 10px;
}

.ttc-summary-img {
	width: 46px;
	height: 46px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

.ttc-summary-info { flex: 1; min-width: 0; }

.ttc-summary-pkg {
	font-weight: 600;
	font-size: 13px;
	color: var(--ttc-text);
	line-height: 1.3;
	word-break: break-word;
}

.ttc-summary-dest {
	font-size: 11.5px;
	color: var(--ttc-text-light);
	margin-top: 3px;
}

.ttc-form-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ttc-lbl {
	font-size: 12px;
	font-weight: 600;
	color: var(--ttc-text-light);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ttc-input {
	border: 1.5px solid var(--ttc-border);
	border-radius: 9px;
	padding: 9px 11px;
	font-size: 13px;
	color: var(--ttc-text);
	background: #fff;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
}

.ttc-input:focus {
	outline: none;
	border-color: var(--ttc-primary);
	box-shadow: 0 0 0 3px rgba(30, 122, 138, 0.12);
}

select.ttc-input { appearance: auto; }

.ttc-form-row.ttc-invalid .ttc-input {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.ttc-inline-err {
	font-size: 11.5px;
	color: #b91c1c;
}

.ttc-form-error {
	font-size: 12px;
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 7px;
	padding: 8px 11px;
}

/* Phone wrap */

.ttc-phone-wrap {
	display: flex;
	gap: 6px;
}

.ttc-code-select {
	width: auto;
	flex: 0 0 auto;
	min-width: 90px;
	max-width: 130px;
}

.ttc-phone-num { flex: 1; }

/* Pax (adults / children) */

.ttc-pax-wrap {
	display: flex;
	gap: 10px;
}

.ttc-pax-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ttc-pax-lbl {
	font-size: 12px;
	font-weight: 600;
	color: var(--ttc-text-light);
}

.ttc-pax-input {
	text-align: center;
	font-size: 15px;
	font-weight: 600;
}

/* Submit */

.ttc-submit-btn {
	background: linear-gradient(135deg, var(--ttc-primary), var(--ttc-primary-dark));
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 13px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 4px;
	transition: opacity 0.15s ease;
}

.ttc-submit-btn:hover:not(:disabled) { opacity: 0.9; }

.ttc-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ── Mobile ────────────────────────────────────────────────── */

@media (max-width: 480px) {
	#ttc-root.ttc-bottom-right,
	#ttc-root.ttc-bottom-left {
		right: var(--ttc-side, 16px);
		left: auto;
		bottom: var(--ttc-bottom, 16px);
	}

	.ttc-panel {
		position: fixed;
		inset: 0;
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
		bottom: 0;
		transform-origin: center bottom;
	}

	.ttc-toggle { position: relative; z-index: 1000000; }
}
