/**
 * Frontend styles for FreightGuard Quotes
 *
 * @package estrats\FreightGuardQuotes\Frontend
 */

/* Base styles - 1280px container for forms */
#fg-quote-form {
	max-width: 1280px;
	margin: 0 auto;
	padding: 20px;
	width: 100%;
	box-sizing: border-box;
}

/* Messages */
.fg-message {
	padding: 12px 16px;
	margin-bottom: 20px;
	border-radius: 4px;
	border: 1px solid;
}

.fg-message-error {
	background-color: #fee;
	border-color: #fcc;
	color: #c33;
}

.fg-message-warning {
	background-color: #fff8e1;
	border-color: #ffc107;
	color: #856404;
}

.fg-message-info {
	background-color: #e3f2fd;
	border-color: #2196f3;
	color: #0d47a1;
}

.fg-message-success {
	background-color: #e8f5e9;
	border-color: #4caf50;
	color: #2e7d32;
}

/* Repeat discount message (estimate and payment pages) */
.fg-repeat-discount-message {
	margin-bottom: 1em;
	color: #c33;
	font-weight: 500;
	line-height: 1.4;
}

/* Form fields */
.fg-form-field {
	margin-bottom: 20px;
}

/* Hide unwanted br and empty p tags that WordPress wpautop generates inside forms */
#fg-coverage-form-element br,
#fg-payment-form-element br,
.fg-form-section > p:empty,
.fg-form-row > p:empty,
.fg-form-field > br {
	display: none !important;
}

.fg-form-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
	line-height: 1.4;
}

.fg-form-field label strong {
	color: #d32f2f;
	font-weight: bold;
	font-size: 14px;
}

/* Match old site body12pxbold styling for required fields. */
.body12pxbold {
	color: #d32f2f;
	font-weight: bold;
	font-size: 14px;
}

.fg-form-field .required {
	color: #d32f2f;
	margin-left: 4px;
	font-weight: bold;
	font-size: 14px;
}

.fg-form-field input[type="text"],
.fg-form-field input[type="email"],
.fg-form-field input[type="password"],
.fg-form-field input[type="tel"],
.fg-form-field input[type="number"],
.fg-form-field input[type="date"],
.fg-form-field input[type="datetime"],
.fg-form-field select,
.fg-form-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.4;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.fg-form-field input:focus,
.fg-form-field select:focus,
.fg-form-field textarea:focus {
	outline: none;
	border-color: #2196f3;
	box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.fg-form-field input.fg-error,
.fg-form-field select.fg-error,
.fg-form-field textarea.fg-error {
	border-color: #d32f2f;
}

.fg-form-field select {
	/* Remove native browser arrow and add custom arrow */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	padding-right: 35px;
}

.fg-form-field select[multiple] {
	min-height: 100px;
	padding: 8px;
	font-size: 14px;
	/* Remove arrow styling for multiple selects */
	background-image: none;
	padding-right: 8px;
	-webkit-appearance: listbox;
	-moz-appearance: listbox;
	appearance: listbox;
}

.fg-form-field textarea {
	resize: vertical;
	min-height: 80px;
	font-size: 14px;
}

.fg-radio-group {
	display: flex;
	gap: 20px;
	margin-top: 8px;
}

.fg-radio-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: normal;
	font-size: 14px;
	cursor: pointer;
	line-height: 1.4;
}

.fg-radio-label input[type="radio"] {
	width: auto;
	margin: 0;
	cursor: pointer;
}

.fg-form-field .description {
	font-size: 13px;
	color: #666;
	margin-top: 4px;
	font-style: italic;
	line-height: 1.4;
}

.fg-form-field .Body1 {
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}

/* Error messages */
.fg-error-message {
	display: none;
	color: #d32f2f;
	font-size: 14px;
	margin-top: 4px;
}

.fg-error-message:not(:empty) {
	display: block;
}

/* Buttons */
.fg-button {
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	text-decoration: none;
	display: inline-block;
}

.fg-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.fg-button-primary {
	background-color: #2196f3;
	color: #fff;
}

.fg-button-primary:hover:not(:disabled) {
	background-color: #1976d2;
	transform: translateY(-1px);
}

.fg-button-primary:active:not(:disabled) {
	transform: translateY(0);
}

.fg-button-secondary {
	background-color: #757575;
	color: #fff;
}

.fg-button-secondary:hover:not(:disabled) {
	background-color: #616161;
}

/* Loading state */
.fg-loading {
	position: relative;
	opacity: 0.7;
	pointer-events: none;
}

.fg-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #2196f3;
	border-top-color: transparent;
	border-radius: 50%;
	animation: fg-spin 0.6s linear infinite;
}

@keyframes fg-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Form actions - flex layout for proper button alignment */
.fg-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	justify-content: flex-end;
	align-items: center;
	margin-top: 30px;
	width: 100%;
}

.fg-form-actions .forminator-button,
.fg-form-actions .fg-button,
.fg-form-actions button {
	min-width: 140px;
}

.fg-form-actions > p {
	width: 100%;
	margin-bottom: 0;
}

/* Quote result */
.fg-quote-result {
	background-color: #f5f5f5;
	padding: 24px;
	border-radius: 4px;
	margin-top: 20px;
}

.fg-quote-result h3 {
	margin-top: 0;
	margin-bottom: 20px;
	color: #333;
}

.fg-premium-details {
	margin-bottom: 20px;
}

.fg-premium-details p {
	margin: 12px 0;
	font-size: 16px;
}

.fg-premium-details strong {
	display: inline-block;
	min-width: 150px;
	color: #333;
}

.fg-premium-details span {
	color: #2196f3;
	font-weight: 600;
}

/* Form steps */
.fg-form-step {
	display: block;
}

/* Removed !important rule that was preventing JavaScript from showing steps */
/* .fg-form-step[style*="display: none"] {
    display: none !important;
} */

/* Step Indicator */
.fg-step-indicator {
	position: relative;
	margin-bottom: 30px;
	padding: 20px 0;
}

.fg-progress-bar {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 2px;
	background-color: #ddd;
	transform: translateY(-50%);
	z-index: 1;
	transition: width 0.3s ease;
}

.fg-step-items {
	display: flex;
	justify-content: space-between;
	position: relative;
	z-index: 2;
}

.fg-step-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.fg-step-number {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #fff;
	border: 2px solid #ddd;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: #999;
	margin-bottom: 8px;
	transition: all 0.3s ease;
}

.fg-step-item.active .fg-step-number {
	background-color: #2196f3;
	border-color: #2196f3;
	color: #fff;
}

.fg-step-item.completed .fg-step-number {
	background-color: #4caf50;
	border-color: #4caf50;
	color: #fff;
}

.fg-step-item.completed .fg-step-number::after {
	content: "✓";
	font-size: 20px;
}

.fg-step-label {
	font-size: 14px;
	color: #666;
	text-align: center;
}

.fg-step-item.active .fg-step-label {
	color: #2196f3;
	font-weight: 600;
}

.fg-step-item.completed .fg-step-label {
	color: #4caf50;
}

/* Form sections */
/* Coverage form: single column of sections, each section has 2-column fields */
#fg-coverage-form-element {
	display: block;
	max-width: 100%;
	box-sizing: border-box;
}

/* Two-column layout for fields within each section */
.fg-form-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 40px;
	padding: 20px;
	background-color: #f9f9f9;
	border-radius: 4px;
	break-inside: avoid;
	page-break-inside: avoid;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

/* Prevent form fields from forcing container to expand */
#fg-coverage-form-element .fg-form-field {
	min-width: 0;
	box-sizing: border-box;
}

.fg-form-section h3 {
	grid-column: 1 / -1;
}

/* Rows (e.g. City/State, Zip/Country) span full width and contain two fields */
.fg-form-section > .fg-form-row {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

/* Optional: field spans both columns (e.g. address, textarea) */
.fg-form-section > .fg-form-field.fg-form-field--full {
	grid-column: 1 / -1;
}

/* Form actions at bottom of coverage form (keep flex for buttons) */
#fg-coverage-form-element > .fg-form-actions {
	margin-top: 30px;
}

.fg-form-section h3 {
	margin-top: 0;
	margin-bottom: 20px;
	color: #333;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	border-bottom: 2px solid #2196f3;
	padding-bottom: 10px;
	text-transform: uppercase;
}

.fg-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

/* Coverage Summary */
.fg-coverage-summary {
	background-color: #f5f5f5;
	padding: 24px;
	border-radius: 4px;
	margin-bottom: 30px;
}

.fg-coverage-summary h3 {
	margin-top: 0;
	margin-bottom: 20px;
	color: #333;
}

.fg-summary-details p {
	margin: 12px 0;
	font-size: 16px;
}

.fg-summary-details strong {
	display: inline-block;
	min-width: 150px;
	color: #333;
}

.fg-summary-details span {
	color: #2196f3;
	font-weight: 600;
}

.fg-summary-details .fg-total {
	border-top: 2px solid #ddd;
	padding-top: 12px;
	margin-top: 12px;
	font-size: 18px;
}

.fg-summary-details .fg-total strong {
	font-size: 18px;
}

.fg-summary-details .fg-total span {
	font-size: 20px;
	color: #4caf50;
}

/* Payment Form Specific */
#fg-payment-form-element .fg-form-field input[type="text"] {
	font-size: 16px; /* Prevents zoom on iOS for card number */
}

/* Payment: Card number (wide) + CVV (narrow) on one row */
#fg-payment-form-element .fg-form-row--card-cvv {
	grid-template-columns: 1fr minmax(100px, 140px);
	gap: 24px;
}

/* Standalone page containers - same 1280px width as main form */
#fg-quote-estimate,
#fg-quote-coverage,
#fg-quote-payment,
#fg-quote-registration {
	max-width: 1280px;
	margin: 0 auto;
	padding: 20px;
	width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
}

/* Purchase Coverage: constrain Elementor container and widget that wrap the shortcode */
.e-con-inner:has(#fg-quote-coverage),
.elementor-widget-text-editor:has(#fg-quote-coverage) {
	max-width: 1280px !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box !important;
}

/* Purchase Coverage: force form to stay in container (override theme/Elementor) */
.fg-quote-coverage.fg-form-container,
#fg-quote-coverage.fg-form-container {
	max-width: 1280px !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
}

.fg-quote-coverage #fg-coverage-form-element,
#fg-quote-coverage #fg-coverage-form-element {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.fg-quote-coverage .fg-form-section,
#fg-quote-coverage .fg-form-section {
	max-width: 100% !important;
	min-width: 0 !important;
}

.fg-quote-coverage #fg-coverage-form-element .fg-form-field,
#fg-quote-coverage #fg-coverage-form-element .fg-form-field {
	min-width: 0 !important;
}

.fg-quote-coverage .fg-form-row,
#fg-quote-coverage .fg-form-row {
	min-width: 0 !important;
	max-width: 100% !important;
}

.fg-quote-coverage .fg-form-field input,
.fg-quote-coverage .fg-form-field select,
.fg-quote-coverage .fg-form-field textarea,
#fg-quote-coverage .fg-form-field input,
#fg-quote-coverage .fg-form-field select,
#fg-quote-coverage .fg-form-field textarea {
	max-width: 100% !important;
	box-sizing: border-box !important;
}

#fg-quote-estimate .fg-form-actions,
#fg-quote-coverage .fg-form-actions,
#fg-quote-payment .fg-form-actions {
	justify-content: flex-end;
}

/* Success Page */
#fg-quote-success {
	max-width: 800px;
	margin: 0 auto;
	padding: 40px 20px;
	text-align: center;
}

.fg-success-message {
	background-color: #e8f5e9;
	border: 2px solid #4caf50;
	border-radius: 4px;
	padding: 30px;
	margin-bottom: 30px;
}

.fg-success-message h2 {
	color: #2e7d32;
	margin-top: 0;
}

.fg-quote-details {
	background-color: #f9f9f9;
	padding: 24px;
	border-radius: 4px;
	margin-bottom: 30px;
	text-align: left;
}

.fg-quote-details h3 {
	margin-top: 0;
	margin-bottom: 20px;
	color: #333;
}

.fg-details-list p {
	margin: 12px 0;
	font-size: 16px;
}

.fg-details-list strong {
	display: inline-block;
	min-width: 120px;
	color: #333;
}

/* Quote History */
#fg-quote-history {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.fg-quote-detail {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.fg-quote-detail h2 {
	margin-top: 0;
	margin-bottom: 16px;
}

.fg-quote-detail-back {
	margin: 0 0 16px;
}

.fg-quote-detail-section {
	background-color: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 18px;
	margin-bottom: 16px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fg-quote-detail-section h3 {
	margin-top: 0;
	margin-bottom: 12px;
	color: #333;
	font-size: 18px;
}

.fg-table-wrapper {
	overflow-x: auto;
}

.fg-table {
	width: 100%;
	border-collapse: collapse;
}

.fg-table th,
.fg-table td {
	padding: 10px 12px;
	border-top: 1px solid #eee;
	vertical-align: top;
	text-align: left;
}

.fg-table thead th {
	border-top: none;
	background-color: #f5f5f5;
	color: #333;
	font-weight: 600;
	white-space: nowrap;
}

.fg-table tbody th {
	width: 240px;
	background-color: #fafafa;
	color: #333;
	font-weight: 600;
}

.fg-table-striped tbody tr:nth-child(even) {
	background-color: #fafafa;
}

.fg-quote-history-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
}

.fg-quote-history-header {
	display: grid;
	grid-template-columns: 140px 1fr 120px 120px 180px;
	gap: 15px;
	padding: 15px;
	background-color: #f5f5f5;
	border-bottom: 2px solid #ddd;
	font-weight: 600;
	color: #333;
}

.fg-quote-history-row {
	display: grid;
	grid-template-columns: 140px 1fr 120px 120px 180px;
	gap: 15px;
	padding: 15px;
	border-bottom: 1px solid #eee;
	align-items: center;
}

.fg-quote-history-row:hover {
	background-color: #f9f9f9;
}

.fg-quote-col-id {
	font-weight: 600;
	color: #2196f3;
	word-break: break-all;
	min-width: 0; /* Allow column to shrink if needed */
	overflow-wrap: break-word;
}

.fg-quote-col-status {
	display: flex;
	align-items: center;
}

.fg-status-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.fg-status-badge.fg-status-draft {
	background-color: #e0e0e0;
	color: #666;
}

.fg-status-badge.fg-status-pending {
	background-color: #fff3cd;
	color: #856404;
}

.fg-status-badge.fg-status-active {
	background-color: #cfe2ff;
	color: #084298;
}

.fg-status-badge.fg-status-success {
	background-color: #d1e7dd;
	color: #0f5132;
}

.fg-status-badge.fg-status-warning {
	background-color: #fff3cd;
	color: #856404;
}

.fg-status-badge.fg-status-error {
	background-color: #f8d7da;
	color: #842029;
}

.fg-quote-col-actions {
	display: flex;
	gap: 8px;
}

.fg-button-small {
	padding: 6px 12px;
	font-size: 14px;
}

#fg-quote-history-empty {
	text-align: center;
	padding: 60px 20px;
	color: #666;
}

#fg-quote-history-pagination {
	text-align: center;
	margin-top: 30px;
}

/* Saved Cards */
#saved-cards-container {
	margin-bottom: 20px;
	padding: 15px;
	background-color: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #ddd;
}

#saved-cards-container select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
}

#saved-cards-container label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

#new-card-fields {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 2px solid #eee;
}

#new-card-fields h4 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #333;
}

@media (max-width: 768px) {
	.fg-form-section {
		grid-template-columns: 1fr;
	}

	.fg-form-row {
		grid-template-columns: 1fr;
	}

	.fg-step-label {
		font-size: 12px;
	}

	.fg-step-number {
		width: 32px;
		height: 32px;
		font-size: 14px;
	}

	.fg-coverage-summary,
	.fg-quote-details {
		padding: 20px;
	}

	.fg-quote-history-header,
	.fg-quote-history-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.fg-quote-history-header {
		display: none; /* Hide header on mobile */
	}

	.fg-quote-history-row {
		border: 1px solid #ddd;
		border-radius: 4px;
		margin-bottom: 15px;
		padding: 15px;
	}

	.fg-quote-col-id::before {
		content: "Quote ID: ";
		font-weight: 600;
	}

	.fg-quote-col-date::before {
		content: "Date: ";
		font-weight: 600;
	}

	.fg-quote-col-status::before {
		content: "Status: ";
		font-weight: 600;
	}

	.fg-quote-col-amount::before {
		content: "Amount: ";
		font-weight: 600;
	}

	.fg-quote-col-actions {
		margin-top: 10px;
		flex-direction: column;
	}

	.fg-quote-col-actions .fg-button {
		width: 100%;
	}

	.fg-quote-detail-section {
		padding: 16px;
	}

	.fg-table tbody th {
		width: 160px;
	}
}

/* Responsive design */
@media (max-width: 768px) {
	#fg-quote-form,
	#fg-quote-estimate,
	#fg-quote-coverage,
	#fg-quote-payment,
	#fg-quote-registration {
		padding: 15px;
	}

	.fg-form-field input[type="text"],
	.fg-form-field input[type="email"],
	.fg-form-field input[type="tel"],
	.fg-form-field input[type="number"],
	.fg-form-field input[type="date"],
	.fg-form-field select {
		font-size: 16px; /* Prevents zoom on iOS */
	}

	.fg-form-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.fg-form-actions .forminator-button,
	.fg-form-actions .fg-button,
	.fg-form-actions button {
		width: 100%;
		min-width: 0;
	}

	.fg-button {
		width: 100%;
		margin-bottom: 10px;
	}

	#fg-payment-form-element .fg-form-row--card-cvv,
	#fg-payment-form-element .fg-form-row {
		grid-template-columns: 1fr;
	}
}

/* Registration message */
.fg-registration-message {
	margin-top: 8px;
	padding: 10px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
}

.fg-registration-message.error {
	background-color: #fee;
	border: 1px solid #fcc;
	color: #c33;
}

.fg-login-link {
	margin-left: 8px;
	font-weight: bold;
	color: #2196f3;
	text-decoration: underline;
}

.fg-login-link:hover {
	color: #1976d2;
	text-decoration: none;
}

/* Login button in registration message: same style as Get Quote but smaller height. */
.fg-registration-message .fg-login-button-inline,
.fg-registration-message a.forminator-button.fg-login-button-inline {
	display: inline-block;
	padding: 8px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	min-height: auto;
	height: auto;
	text-decoration: none;
	color: #fff;
	vertical-align: middle;
	border: none;
	border-radius: 24px;
	background-color: #e64a19;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.fg-registration-message .fg-login-button-inline:hover,
.fg-registration-message a.forminator-button.fg-login-button-inline:hover {
	color: #fff;
	text-decoration: none;
	background-color: #d84315;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Standalone customer login / registration pages */
.fg-customer-auth {
	max-width: 1280px;
	margin: 0 auto;
	padding: 20px;
	width: 100%;
	box-sizing: border-box;
}

.fg-form-links {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
}

/* My Account page: two-column layout (profile | password). */
.fg-my-account {
	max-width: 1280px;
	margin: 0 auto;
	padding: 20px;
	box-sizing: border-box;
}

.fg-my-account h2 {
	margin-top: 0;
	margin-bottom: 24px;
	font-size: 1.5rem;
}

.fg-my-account__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: start;
}

.fg-my-account__section {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 24px;
}

.fg-my-account__section h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 1.1rem;
}

.fg-my-account .fg-form-field {
	margin-bottom: 16px;
}

.fg-my-account .fg-form-field label {
	display: block;
	margin-bottom: 6px;
}

.fg-my-account .fg-form-actions {
	margin-top: 20px;
}

.fg-my-account .fg-form-actions .fg-button {
	min-width: 140px;
}

@media (max-width: 768px) {
	.fg-my-account__grid {
		grid-template-columns: 1fr;
	}
}

.fg-form-links a {
	color: #2196f3;
	text-decoration: none;
	font-size: 14px;
}

.fg-form-links a:hover {
	text-decoration: underline;
	color: #1976d2;
}

.fg-remember-me {
	margin-bottom: 16px;
}

.fg-remember-me label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: normal;
	cursor: pointer;
}

.fg-remember-me input[type="checkbox"] {
	width: auto;
	margin: 0;
	vertical-align: middle;
}

.fg-password-wrapper {
	position: relative;
	display: flex;
	align-items: stretch;
}

.fg-password-wrapper input {
	flex: 1;
	padding-right: 70px;
}

.fg-password-toggle {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	padding: 6px 10px;
	font-size: 13px;
	line-height: 1.2;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	color: #333;
}

.fg-password-toggle:hover {
	background: #eee;
	border-color: #ccc;
}

.fg-logged-in-message {
	padding: 20px;
	margin: 20px 0;
	background-color: #e8f5e9;
	border: 1px solid #4caf50;
	border-radius: 4px;
	color: #2e7d32;
}

.fg-logged-in-message p {
	margin: 0 0 12px 0;
}

.fg-logged-in-message p:last-child {
	margin-bottom: 0;
}

.fg-logged-in-message .fg-button {
	margin-right: 10px;
	margin-bottom: 8px;
}

/* Coverport invite modal */
.fg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	background: rgba(0, 0, 0, 0.5);
	transition: visibility 0.2s, opacity 0.2s;
}

.fg-modal[aria-hidden="false"].fg-modal-open {
	visibility: visible;
	opacity: 1;
}

.fg-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	margin: 20px;
	overflow: auto;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fg-modal-content {
	display: flex;
	flex-direction: column;
}

.fg-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #e0e0e0;
}

.fg-modal-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.fg-modal-close {
	background: none;
	border: none;
	padding: 4px 8px;
	font-size: 1.5rem;
	line-height: 1;
	color: #666;
	cursor: pointer;
}

.fg-modal-close:hover {
	color: #333;
}

.fg-modal-body {
	padding: 20px;
}

.fg-modal-footer {
	display: flex;
	justify-content: flex-end;
	padding: 12px 20px;
	border-top: 1px solid #e0e0e0;
	gap: 10px;
}

/* Coverport (XS Coverage) button + modal – styled to match marketing page */
.fg-coverport-invite .fg-coverport-invite-trigger {
	background-color: #282a2c;
	color: #ffffff;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: 999px;
	padding: 12px 40px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
	border: 2px solid #282a2c;
}

.fg-coverport-invite .fg-coverport-invite-trigger:hover,
.fg-coverport-invite .fg-coverport-invite-trigger:focus {
	background-color: #ff6b35;
	border-color: #ff6b35;
	transform: translateY(-1px);
}

.fg-coverport-invite .fg-coverport-invite-trigger:active {
	transform: translateY(0);
}

/* Make the Coverport modal larger and match the framed style */
#fg-coverport-modal .fg-modal-dialog {
	max-width: 720px;
	margin: 40px 20px;
	background-color: #4f6475; /* outer frame */
	padding: 24px;
	border-radius: 6px;
}

#fg-coverport-modal .fg-modal-content {
	background-color: #ffffff;
	border-radius: 4px;
	overflow: hidden;
}

#fg-coverport-modal .fg-modal-header {
	border-color: #d9dfe4;
}

#fg-coverport-modal .fg-modal-body {
	padding: 24px 32px;
}

#fg-coverport-modal .fg-form-group {
	margin-bottom: 20px;
}

#fg-coverport-modal .fg-form-control {
	width: 100%;
	padding: 10px 12px;
	border-radius: 4px;
	border: 1px solid #ddd;
	font-size: 14px;
}

#fg-coverport-modal .fg-form-control:focus {
	outline: none;
	border-color: #2196f3;
	box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

#fg-coverport-modal .fg-modal-close {
	color: #ffffff;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	padding: 4px 8px;
}

#fg-coverport-modal .fg-modal-close:hover {
	color: #ff7a2f; /* bright orange close icon */
}

/* Coverport modal Submit button: gray default, orange on hover */
#fg-coverport-modal #fg-coverport-submit {
	background-color: #282a2c;
	border: 2px solid #282a2c;
	color: #ffffff;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border-radius: 4px;
	padding: 12px 32px;
}

#fg-coverport-modal #fg-coverport-submit:hover,
#fg-coverport-modal #fg-coverport-submit:focus {
	background-color: #ff6b35;
	border-color: #ff6b35;
}

.fg-coverport-msg {
	margin: 16px 0 0;
	text-align: center;
	font-weight: 500;
}

.fg-coverport-success {
	color: #2e7d32;
}

.fg-coverport-error {
	color: #c62828;
}

/* Packaging checkboxes (scrollable, similar height to former multi-select) */
.fg-packaging-wrap {
	margin-top: 4px;
}

.fg-packaging-checkboxes {
	display: block;
	max-height: 100px;
	overflow-y: auto;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}

.fg-packaging-option {
	display: block;
	margin-bottom: 6px;
	cursor: pointer;
	font-weight: normal;
}

.fg-packaging-option:last-child {
	margin-bottom: 0;
}

.fg-packaging-option input {
	margin-right: 8px;
	vertical-align: middle;
}

.fg-packaging-hint {
	color: #d32f2f;
	font-weight: bold;
	font-size: 13px;
	line-height: 1.4;
	float: right;
}
