/* ==========================================================================
   Flipthinks Login/Register Popup — Stylesheet
   ========================================================================== */

/* Prevent body scroll while popup is open */
body.flipthinks-popup-open {
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Overlay (backdrop)
   -------------------------------------------------------------------------- */
.flipthinks-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.flipthinks-popup-overlay:not( [hidden] ) {
	opacity: 1;
}

.flipthinks-popup-overlay[hidden] {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Modal container
   -------------------------------------------------------------------------- */
.flipthinks-popup-modal {
	position: relative;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	max-width: 900px;
	width: 100%;
	height: 90vh;
	box-shadow: 0 8px 32px rgba( 0, 0, 0, 0.22 );
	transform: translateY( 20px );
	transition: transform 0.5s ease;
}

.flipthinks-popup-overlay:not( [hidden] ) .flipthinks-popup-modal {
	transform: translateY( 0 );
}

/* --------------------------------------------------------------------------
   Close button (top-right)
   -------------------------------------------------------------------------- */
.flipthinks-popup-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	z-index: 10;
	padding: 2px 8px;
	border-radius: 20px;
	transition: background 0.4s, color 0.4s;
}

.flipthinks-popup-close:hover,
.flipthinks-popup-close:focus {
	background: #f0f0f0;
	color: #111;
	outline: none;
}

/* --------------------------------------------------------------------------
   Left image panel
   -------------------------------------------------------------------------- */
.flipthinks-popup-image-panel {
	flex: 0 0 42%;
	max-width: 42%;
	overflow: hidden;
}

.flipthinks-popup-image-panel img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center center !important;
	display: block !important;
	max-width: 100% !important;
}

/* --------------------------------------------------------------------------
   Right form panel
   -------------------------------------------------------------------------- */
.flipthinks-popup-form-panel {
	flex: 1 1 58%;
	padding: 40px 32px 30px;
	box-sizing: border-box;
}

/* When no image, constrain and center the form panel */
.flipthinks-popup-modal:not( .has-image ) .flipthinks-popup-form-panel {
	flex: 1 1 100%;
	max-width: 480px;
	margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Tabs navigation
   -------------------------------------------------------------------------- */
.flipthinks-popup-tabs {
	display: flex;
	position: relative;
	border-bottom: 2px solid #e0e0e0;
	text-align: center;

	--indicator-left: 0px;
	--indicator-width: 0px;
}

/* Sliding indicator */
.flipthinks-popup-tabs::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: var(--indicator-left);
	width: var(--indicator-width);
	height: 3px;
	background: #7f54b3;

	/* Disable animation initially */
	transition: none;
}

/* Enable animation after init */
.flipthinks-popup-tabs.ready::after {
	transition: left 0.3s ease, width 0.3s ease;
}

.flipthinks-popup-tab {
	flex: 1;
	background: transparent;
	border: none;
	padding: 10px 16px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	color: #777;
	transition: color 0.15s;
}

.flipthinks-popup-tab.active,
.flipthinks-popup-tab[aria-selected="true"] {
	color: #000 !important;
}

.flipthinks-popup-tab:hover:not(.active) {
	color: #333;
}

/* --------------------------------------------------------------------------
   Tab panels
   -------------------------------------------------------------------------- */
.flipthinks-popup-panel--hidden {
	display: none !important;
}

.flipthinks-popup-panel{
    overflow-y: auto;
	scrollbar-width: thin;
	height: 70vh;
	padding-top: 20px;
}

/* --------------------------------------------------------------------------
   Message / feedback area
   -------------------------------------------------------------------------- */
.flipthinks-popup-message {
	margin: 6px 0 10px;
	font-size: 14px;
	line-height: 1.5;
}

.flipthinks-popup-message:not( :empty ) {
	padding: 10px 14px;
	border-radius: 4px;
}

.flipthinks-popup-message.is-error {
	background: #fff3f3;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

.flipthinks-popup-message.is-success {
	background: #f1f8e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

/* --------------------------------------------------------------------------
   Inline label (Remember me)
   -------------------------------------------------------------------------- */
.flipthinks-popup-inline-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: normal;
	cursor: pointer;
}

.flipthinks-popup-inline-label input[type="checkbox"] {
	width: auto !important;
	cursor: pointer;
	margin: 0;
}

/* --------------------------------------------------------------------------
   Lost password link
   -------------------------------------------------------------------------- */
.flipthinks-popup-lost-password {
	text-align: right;
	margin-top: 4px;
	font-size: 15px;
	transition: 0.4s ease-in-out!important;
}

.flipthinks-popup-lost-password a {
	color: #00bfff;
}

.flipthinks-popup-lost-password a:hover{
	color: #000;
}

/* --------------------------------------------------------------------------
   Country select height match
   -------------------------------------------------------------------------- */
.flipthinks-popup-form-panel select[name="country"] {
	width: 100%;
	height: 40px;
	padding: 0 8px;
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Trigger button
   -------------------------------------------------------------------------- */
.flipthinks-popup-trigger {
	display: inline-block;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Prevent WooCommerce's default show-password button from appearing in
   plugin-rendered password fields — we provide our own toggle buttons.
   -------------------------------------------------------------------------- */
.flipthinks-popup-overlay .show-password-input,
.flipthinks-password-row .show-password-input {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Neutralise WooCommerce's <span class="password-input"> wrapper that may
   be injected around password inputs (e.g. on variation selection).  Using
   display:contents lets the wrapped input participate in the parent flex
   layout as if the wrapper were not there.
   -------------------------------------------------------------------------- */
.flipthinks-popup-overlay .password-input,
.flipthinks-password-wrap .password-input {
	display: contents !important;
}

/* --------------------------------------------------------------------------
   Responsive — collapse image panel below 640 px
   -------------------------------------------------------------------------- */
@media ( max-width: 640px ) {
	.flipthinks-popup-image-panel {
		display: none;
	}

	.flipthinks-popup-form-panel {
		padding: 40px 20px 24px;
		flex: 1 1 100%;
	}
}

@media ( max-width: 400px ) {
	.flipthinks-popup-form-panel {
		padding: 36px 14px 20px;
	}
}
