/* TheEvCal Companion – Inline Checkout Widget */

.theevcal-inline-checkout {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	max-width: 520px;
	margin: 0 auto;
	position: relative;
}

/* ---------------------------------------------------------------
 *  Step visibility
 * ------------------------------------------------------------- */
.theevcal-ic__main {
	display: block;
}

.theevcal-ic__step {
	display: none;
}
.theevcal-ic__step--active {
	display: block;
}

.theevcal-ic__heading {
	font-size: 1.25rem;
	margin: 0 0 16px;
}

/* ---------------------------------------------------------------
 *  Ticket rows
 * ------------------------------------------------------------- */
.theevcal-ic__ticket-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #e0e0e0;
}

.theevcal-ic__ticket-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.theevcal-ic__ticket-name {
	font-weight: 600;
}

.theevcal-ic__ticket-price {
	color: #555;
	font-size: 0.9em;
}

.theevcal-ic__ticket-desc {
	color: #888;
	font-size: 0.85em;
}

.theevcal-ic__ticket-qty {
	display: flex;
	align-items: center;
	gap: 4px;
}

.theevcal-ic__qty-btn {
	width: 32px;
	height: 32px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	font-size: 1.1em;
	cursor: pointer;
	line-height: 1;
}

.theevcal-ic__qty-btn:hover {
	background: #f5f5f5;
}

.theevcal-ic__qty-input {
	width: 48px;
	text-align: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 4px;
	font-size: 1em;
}

/* Hide spin buttons */
.theevcal-ic__qty-input::-webkit-inner-spin-button,
.theevcal-ic__qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.theevcal-ic__qty-input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

/* ---------------------------------------------------------------
 *  Subtotal
 * ------------------------------------------------------------- */
.theevcal-ic__subtotal {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	font-weight: 600;
	font-size: 1.1em;
}

/* ---------------------------------------------------------------
 *  Buttons
 * ------------------------------------------------------------- */
.theevcal-ic__btn {
	display: inline-block;
	padding: 10px 24px;
	border: none;
	border-radius: 6px;
	font-size: 1em;
	cursor: pointer;
	transition: background 0.2s;
}

.theevcal-ic__btn--next,
.theevcal-ic__btn--pay {
	background: #0073aa;
	color: #fff;
	width: 100%;
	margin-top: 8px;
}

.theevcal-ic__btn--next:hover:not(:disabled),
.theevcal-ic__btn--pay:hover {
	background: #005f8d;
}

.theevcal-ic__btn--next:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.theevcal-ic__btn--back {
	background: transparent;
	color: #0073aa;
	padding-left: 0;
	margin-top: 16px;
}

/* ---------------------------------------------------------------
 *  Purchaser info
 * ------------------------------------------------------------- */
.theevcal-ic__purchaser {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.theevcal-ic__label {
	display: flex;
	flex-direction: column;
	font-size: 0.9em;
	font-weight: 500;
	gap: 4px;
}

.theevcal-ic__input {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
}

/* ---------------------------------------------------------------
 *  Address fields
 * ------------------------------------------------------------- */
.theevcal-ic__address {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e0e0e0;
}

.theevcal-ic__address-row {
	display: flex;
	gap: 12px;
}

.theevcal-ic__label--half {
	flex: 1;
}

.theevcal-ic__label--quarter {
	flex: 0.5;
}

@media (max-width: 600px) {
	.theevcal-ic__address-row {
		flex-direction: column;
	}
	.theevcal-ic__label--half,
	.theevcal-ic__label--quarter {
		flex: 1;
	}
}

/* ---------------------------------------------------------------
 *  Gateway panels (no tabs)
 * ------------------------------------------------------------- */
.theevcal-ic__gateways {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.theevcal-ic__gw-panel {
	display: block;
}

.theevcal-ic__gw-panel--stripe {
	order: 1;
}

.theevcal-ic__gw-panel--paypal {
	order: 2;
}

/* Hide PayPal's SEPA and Card buttons - show only PayPal button */
.theevcal-ic__gw-panel--paypal [data-funding-source="card"],
.theevcal-ic__gw-panel--paypal [data-funding-source="sepa"] {
	display: none !important;
}

#theevcal-stripe-element {
	padding: 12px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	margin-bottom: 12px;
	min-height: 44px;
}

/* ---------------------------------------------------------------
 *  Error / Success / Loader
 * ------------------------------------------------------------- */
.theevcal-ic__error {
	background: #fef0f0;
	color: #c0392b;
	border: 1px solid #e6b0aa;
	border-radius: 4px;
	padding: 10px 12px;
	margin-top: 12px;
	font-size: 0.9em;
}

.theevcal-ic__step--success {
	text-align: center;
	padding: 40px 0;
}

.theevcal-ic__success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	background: #27ae60;
	color: #fff;
	border-radius: 50%;
	font-size: 2em;
	line-height: 56px;
}

.theevcal-ic__loader {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.theevcal-ic__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #e0e0e0;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: theevcal-spin 0.7s linear infinite;
}

@keyframes theevcal-spin {
	to { transform: rotate(360deg); }
}
