/**
 * Twilio Bridge Connect Styles.
 *
 * @package TwilioBridgeConnect
 */

#tbc-form-container {
	margin: 40px auto;
	padding: 40px;
	border-radius: 12px;
	background-color: #ffffff;
	box-shadow: none;
	overflow: hidden;
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	text-align: center;
}

.tbc-steps-wrapper {
	display: flex;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	width: 100%;
}

.tbc-step {
	min-width: 100%;
	width: 100%;
	box-sizing: border-box;
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	opacity: 0;
	transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
	width: 100%;
}

.tbc-step.active {
	opacity: 1;
}

#tbc-connect-form label {
	display: block;
	margin-bottom: 30px;
	font-weight: 600;
	font-size: 36px;
	line-height: 1.2;
	color: var(--tbc-label-color, #0e2119);
	width: 100%;
	text-align: center;
}

/* Error Text Styling */
.tbc-step-error {
	color: #dc3545;
	font-size: 16px;
	font-weight: 500;
	margin-bottom: 20px;
	padding: 10px;
	background-color: #fff5f5;
	border-radius: 6px;
	border-left: 4px solid #dc3545;
	display: none;
	width: 100%;
	max-width: 500px;
	box-sizing: border-box;
	text-align: center;
}

/* Selection Grid for Step 1 */
.tbc-selection-grid {
	max-width: 700px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 30px;
	width: 100%;
}

[data-step="2"] .tbc-selection-grid {
	grid-template-columns: repeat(2, 1fr);
}

.tbc-selection-box {
	border: 2px solid #ddd;
	border-radius: 12px;
	padding: 50px 20px 30px;
	text-align: left;
	cursor: pointer;
	transition: all 0.3s ease;
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	position: relative;
}
.tbc-selection-box::before {
	content: "";
	position: absolute;
	top: 10px;
	right: 10px;
	width: 24px;
	height: 24px;
	border-radius: 20px;
	box-shadow:
		inset 0px 0px 0px 1px var(--tbc-primary-color),
		inset 0px 0px 0px 22px transparent;
	transition: 0.2s ease-in-out;
}
.tbc-selection-box.selected::before {
	box-shadow:
		inset 0px 0px 0px 1px var(--tbc-primary-color),
		inset 0px 0px 0px 3px #fff,
		inset 0px 0px 0px 22px var(--tbc-primary-color);
}

.tbc-selection-box:hover {
	border-color: var(--tbc-primary-color, #acca47);
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tbc-selection-box.selected {
	border-color: var(--tbc-primary-color, #acca47);
	background-color: rgba(172, 202, 71, 0.05);
}

.tbc-selection-box .tbc-icon {
	width: 60px;
	height: 60px;
	margin-bottom: 20px;
	color: var(--tbc-primary-color, #acca47);
}

.tbc-selection-box .tbc-icon svg {
	width: 100%;
	height: 100%;
}

.tbc-selection-box h3 {
	margin: 0 0 10px 0;
	font-weight: 600;
	font-size: 22px;
	color: var(--tbc-heading-color, #0e2119);
}

.tbc-selection-box p {
	margin: 0;
	font-size: 15px;
	color: #666;
	line-height: 1.4;
}

.tbc-step-description {
	font-size: 22px;
	color: #666;
	margin-bottom: 30px;
}

.tbc-info-box {
	text-align: left;
	display: flex;
	align-items: center;
	gap: 20px;
	background: var(--tbc-primary-color);
	color: var(--tbc-label-color);
	padding: 20px;
	border-radius: 10px;
	max-width: 800px;
}

.tbc-info-box .tbc-benefit-content h4 {
	margin-bottom: 5px;
	color: var(--tbc-btn-text-color, #ffffff);
	font-size: 20px;
}

.tbc-info-box .tbc-benefit-content p {
	font-size: 16px;
	color: var(--tbc-btn-text-color, #ffffff);
	margin-bottom: 0px;
}

@media (max-width: 767px) {
	.tbc-info-box {
		flex-direction: column;
		text-align: center;
	}

	.tbc-info-box .tbc-benefit-content h4 {
		font-size: 18px;
	}

	.tbc-info-box .tbc-benefit-content p {
		font-size: 14px;
	}
}

.tbc-step[data-step="1"] .tbc-info-box {
	margin: 30px 0;
}

/* Option List & Boxes */
.tbc-option-list {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 15px;
	width: 100%;
	max-width: 800px;
	margin-bottom: 30px;
}

.tbc-option-list-stacked {
	flex-direction: column;
	align-items: center;
	max-width: 500px;
}

.tbc-option-list-stacked .tbc-date-picker-wrapper,
.tbc-option-list-stacked .tbc-option-box {
	width: 100%;
}

.tbc-step[data-step="10"] .tbc-option-box {
	padding: 12px 20px;
	font-size: 16px;
	width: auto;
	min-width: 180px;
	margin: 0 auto;
	height: auto;
	flex: 0 0 auto;
}

.tbc-option-box {
	border: 1px solid #ddd;
	border-radius: 5px;
	padding: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	background: #fff;
	text-align: left;
	font-size: 18px;
	font-weight: 500;
	flex: 1 1 200px;
	min-width: 200px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	padding-top: 50px;
	position: relative;
}

.tbc-option-box::before {
	content: "";
	position: absolute;
	top: 10px;
	right: 10px;
	width: 24px;
	height: 24px;
	border-radius: 20px;
	box-shadow:
		inset 0px 0px 0px 1px #ddd,
		inset 0px 0px 0px 22px transparent;
	transition: 0.2s ease-in-out;
}
.tbc-option-box.selected::before {
	box-shadow:
		inset 0px 0px 0px 1px var(--tbc-primary-color),
		inset 0px 0px 0px 3px #fff,
		inset 0px 0px 0px 22px var(--tbc-primary-color);
}

.tbc-option-box.no-circle {
	padding-top: 20px;
}
.tbc-option-box.no-circle::before {
	display: none;
}

.tbc-option-box:hover {
	border-color: var(--tbc-primary-color, #acca47);
	background-color: rgba(172, 202, 71, 0.02);
}

.tbc-option-box.selected {
	border-color: var(--tbc-primary-color, #acca47);
	background-color: rgba(172, 202, 71, 0.05);
}

.tbc-option-box strong {
	display: block;
	font-size: 20px;
	margin-bottom: 5px;
	color: var(--tbc-heading-color, #0e2119);
}

.tbc-option-box span {
	font-size: 15px;
	color: #666;
	font-weight: 400;
}

/* Results List (Step 4) */
.tbc-results-list {
	width: 100%;
	max-width: 600px;
	margin: 30px auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
}

.tbc-result-item {
	background: #f7faed;
	border: 2px solid var(--tbc-primary-color, #acca47);
	border-radius: 12px;
	padding: 20px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--tbc-heading-color, #0e2119);
	gap: 12px;
	transition: transform 0.3s ease;
	animation: tbcScaleIn 0.5s ease forwards;
	opacity: 0;
}

.tbc-result-item:nth-child(2) {
	animation-delay: 0.2s;
}
.tbc-result-item:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes tbcScaleIn {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.tbc-result-item:hover {
	transform: translateY(-5px);
}

.tbc-check {
	color: var(--tbc-primary-color, #acca47);
	background: #fff;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Checkbox Styling */
.tbc-newsletter-box {
	width: 100%;
	max-width: 500px;
	margin: 20px auto;
	text-align: left;
	background: #f9f9f9;
	padding: 20px;
	border-radius: 12px;
}

#tbc-connect-form .tbc-checkbox-container {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.5;
	color: #444;
	position: relative;
	user-select: none;
	margin-bottom: 0 !important;
	text-align: left;
}

#tbc-connect-form .tbc-checkbox-container input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.tbc-checkmark {
	min-width: 24px;
	height: 24px;
	background-color: #fff;
	border: 2px solid #ddd;
	border-radius: 4px;
	position: relative;
	transition: all 0.2s;
}

#tbc-connect-form .tbc-checkbox-container:hover input ~ .tbc-checkmark {
	border-color: var(--tbc-primary-color, #acca47);
}

#tbc-connect-form .tbc-checkbox-container input:checked ~ .tbc-checkmark {
	background-color: var(--tbc-primary-color, #acca47);
	border-color: var(--tbc-primary-color, #acca47);
}

.tbc-checkmark:after {
	content: "";
	position: absolute;
	display: none;
	left: 8px;
	top: 3px;
	width: 6px;
	height: 12px;
	border: solid white;
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

#tbc-connect-form .tbc-checkbox-container input:checked ~ .tbc-checkmark:after {
	display: block;
}

.tbc-checkbox-text strong {
	color: var(--tbc-heading-color, #0e2119);
	font-size: 16px;
	display: block;
	margin-bottom: 2px;
}

/* Intro Expert (Step 9) */
.tbc-intro-expert {
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.tbc-intro-expert p {
	font-size: 28px;
	line-height: 1.4;
	color: var(--tbc-heading-color, #0e2119);
	margin-bottom: 0;
	opacity: 0;
	display: none;
	transition: opacity 0.8s ease-in-out;
	font-weight: 500;
}

.tbc-intro-expert p.tbc-fade-in {
	display: block;
	opacity: 1;
}

.tbc-intro-expert p.tbc-fade-out {
	opacity: 0;
}

.tbc-user-name {
	font-weight: bold;
	color: var(--tbc-heading-color, #0e2119);
}

/* Graph Container */
.tbc-graph-container {
	width: 100%;
	max-width: 600px;
	margin: 20px auto 30px;
}

.tbc-graph-container img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Date Picker */
#tbc-connect-form input[type="date"] {
	width: 100%;
	max-width: 500px;
	padding: 18px;
	margin-bottom: 15px;
	border: 2px solid #ddd;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: 20px;
	transition: border-color 0.3s;
}

/* Inputs */
#tbc-connect-form input[type="text"],
#tbc-connect-form input[type="email"],
#tbc-connect-form input[type="tel"] {
	width: 100%;
	max-width: 500px;
	margin-bottom: 15px;
	border: 1px solid #ddd;
	border-radius: 5px;
	box-sizing: border-box;
	font-size: 20px;
	height: 55px;
	transition: border-color 0.3s;
	text-align: left;
}

#tbc-connect-form input:focus {
	border-color: var(--tbc-primary-color, #acca47);
	outline: none;
}

.tbc-address-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
	width: 100%;
	max-width: 500px;
}

.tbc-address-grid input {
	margin-bottom: 0 !important;
}

.tbc-navigation {
	display: flex;
	gap: 20px;
	margin-top: 10px;
	justify-content: center;
	width: 100%;
}

#tbc-connect-form button {
	padding: 13px 25px;
	background-color: var(--tbc-primary-color, #acca47);
	color: var(--tbc-btn-text-color, #ffffff);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	font-size: 16px;
	transition:
		background-color 0.3s,
		opacity 0.3s;
	display: flex;
	align-items: center;
	gap: 10px;
}

#tbc-connect-form button:hover {
	opacity: 0.9;
}

#tbc-connect-form button.tbc-prev-btn {
	background-color: #f0f0f0;
	color: #0e2119;
}

/* Looping Messages */
#tbc-loop-messages {
	text-align: center;
	min-height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tbc-loop-msg {
	display: none;
	font-size: 28px;
	font-weight: 700;
	color: var(--tbc-heading-color, #0e2119);
}

.tbc-loop-msg.active {
	display: block;
	animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
	0% {
		opacity: 0;
		transform: translateY(10px);
	}
	20% {
		opacity: 1;
		transform: translateY(0);
	}
	80% {
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		opacity: 0;
		transform: translateY(-10px);
	}
}

.tbc-loader {
	border: 5px solid #f3f3f3;
	border-top: 5px solid var(--tbc-primary-color, #acca47);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
	margin: 30px auto;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Call Status Container & Cards */
#tbc-call-status-container {
	margin: 20px auto;
	width: 100%;
}

.tbc-status-card {
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 16px;
	padding: 40px 30px;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	animation: tbcFadeIn 0.5s ease;
}

.tbc-status-card.success {
	border-color: var(--tbc-primary-color, #acca47);
	background: #f7faed;
}

.tbc-status-card.error {
	border-color: #dc3545;
	background: #fff8f8;
}

.tbc-status-card h3 {
	font-size: 28px;
	margin: 0 0 10px 0;
	color: var(--tbc-heading-color, #0e2119);
}

.tbc-status-card p {
	font-size: 18px;
	color: #666;
	margin-bottom: 25px;
}

.tbc-btn-glow {
	padding: 20px 40px !important;
	background-color: var(--tbc-primary-color, #acca47) !important;
	box-shadow: 0 0 0 0 rgba(172, 202, 71, 0.7);
	animation: tbcPulseBtn 2s infinite;
}

@keyframes tbcPulseBtn {
	0% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(172, 202, 71, 0.7);
	}
	70% {
		transform: scale(1.05);
		box-shadow: 0 0 0 15px rgba(172, 202, 71, 0);
	}
	100% {
		transform: scale(1);
		box-shadow: 0 0 0 0 rgba(172, 202, 71, 0);
	}
}

.tbc-pulse-ring {
	width: 80px;
	height: 80px;
	background: var(--tbc-primary-color, #acca47);
	border-radius: 50%;
	margin: 0 auto 20px;
	position: relative;
}

.tbc-pulse-ring::before {
	content: "";
	position: absolute;
	width: 100%;
	height: 100%;
	background: inherit;
	border-radius: 50%;
	opacity: 0.6;
	animation: tbcPulseRing 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes tbcPulseRing {
	0% {
		transform: scale(1);
		opacity: 0.6;
	}
	100% {
		transform: scale(2.5);
		opacity: 0;
	}
}

@keyframes tbcFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#tbc-message.success {
	background-color: #f7faed;
	color: #0e2119;
	border-color: var(--tbc-primary-color, #acca47);
}

#tbc-message.error {
	background-color: #fff8f8;
	color: #dc3545;
	border-color: #dc3545;
}

.tbc-message-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 25px;
	color: var(--tbc-primary-color, #acca47);
}

.tbc-message-icon svg {
	width: 100%;
	height: 100%;
}

.tbc-message-title {
	font-size: 32px;
	font-weight: 800;
	margin: 0 0 15px 0;
	color: var(--tbc-heading-color, #0e2119);
}

.tbc-message-body {
	font-size: 18px;
	line-height: 1.6;
	color: #444;
}

.tbc-input-error {
	border-color: #dc3545 !important;
	background-color: #fff8f8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
	#tbc-form-container {
		margin: 10px;
		padding: 20px;
	}

	#tbc-connect-form label {
		font-size: 24px;
		margin-bottom: 20px;
	}

	.tbc-selection-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	#tbc-connect-form button {
		width: 100%;
	}

	.tbc-navigation {
		flex-direction: column-reverse;
		gap: 10px;
	}
}

/* Outside Hours Pretty Box */
.tbc-outside-hours-card {
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 20px;
	padding: 50px 40px;
	max-width: 650px;
	margin: -20px auto;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
	text-align: center;
	animation: tbcFadeIn 0.6s ease-out;
}

.tbc-clock-icon {
	width: 80px;
	height: 80px;
	background: #f0f4f8;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 30px;
	color: var(--tbc-primary-color, #acca47);
	border: 2px solid #e2e8f0;
}

.tbc-outside-hours-card h2 {
	font-size: 34px !important;
	color: var(--tbc-heading-color, #0e2119);
	margin-bottom: 25px !important;
	font-weight: 800 !important;
}

.tbc-outside-hours-card p {
	font-size: 18px !important;
	line-height: 1.8 !important;
	color: #555 !important;
	white-space: pre-line;
	margin-bottom: 0 !important;
}

.tbc-hours-badge {
	display: inline-block;
	background: #f7faed;
	color: #0e2119;
	padding: 10px 25px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 15px;
	margin-top: 30px;
	border: 1px solid var(--tbc-primary-color, #acca47);
}
