/* LN Pay CZ - Styles */

:root {
	--primary-color: #f7931a;
	--secondary-color: #4a90e2;
	--success-color: #28a745;
	--error-color: #dc3545;
	--bg-color: #ffffff;
	--text-color: #333333;
	--border-color: #dddddd;
	--shadow: 0 2px 8px rgba( 0, 0, 0, 0.1 );
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: var( --text-color );
	background-color: var( --bg-color );
	line-height: 1.6;
}

.app-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Header */
.app-header {
	background: linear-gradient( 135deg, var( --primary-color ), #ff9f1c );
	color: white;
	padding: 2rem 1rem;
	text-align: center;
}

.app-header h1 {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.app-header .subtitle {
	font-size: 1rem;
	opacity: 0.9;
}

/* Main */
.app-main {
	flex: 1;
	padding: 2rem 1rem;
	max-width: 600px;
	margin: 0 auto;
	width: 100%;
}

/* Sections */
.section {
	display: none;
}

.section.active {
	display: block;
	animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY( 10px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

.section h2 {
	margin-bottom: 1.5rem;
	color: var( --primary-color );
	text-align: center;
}

/* QR Scanner */
#qr-reader {
	margin: 2rem 0;
	border: 2px solid var( --border-color );
	border-radius: 8px;
	overflow: hidden;
}

/* How it works */
.how-it-works {
	margin-top: 2rem;
	padding: 1.5rem;
	background-color: #f8f9fa;
	border-radius: 8px;
	border: 1px solid var( --border-color );
}

.how-it-works h3 {
	color: var( --primary-color );
	margin-bottom: 1rem;
	font-size: 1.1rem;
}

.how-it-works ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.how-it-works li {
	padding: 0.75rem 0;
	padding-left: 1.5rem;
	position: relative;
	line-height: 1.6;
}

.how-it-works li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var( --success-color );
	font-weight: bold;
}

/* Info icon with tooltip */
.info-icon {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	line-height: 1.2em;
	text-align: center;
	border-radius: 50%;
	background-color: white;
	color: var( --secondary-color );
	font-size: 0.9em;
	font-style: normal;
	font-weight: bold;
	cursor: help;
	position: relative;
	vertical-align: middle;
}

.info-icon:hover::after {
	content: attr( data-tooltip );
	position: absolute;
	bottom: 125%;
	left: 50%;
	transform: translateX( -50% );
	background-color: rgba( 0, 0, 0, 0.9 );
	color: white;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.875rem;
	white-space: normal;
	width: 280px;
	max-width: 90vw;
	z-index: 1000;
	line-height: 1.4;
	text-align: left;
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.3 );
}

.info-icon:hover::before {
	content: "";
	position: absolute;
	bottom: 115%;
	left: 50%;
	transform: translateX( -50% );
	border: 6px solid transparent;
	border-top-color: rgba( 0, 0, 0, 0.9 );
	z-index: 1000;
}

/* FAQ Link */
.faq-link-container {
	text-align: center;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var( --border-color );
}

.faq-link {
	display: inline-block;
	color: var( --secondary-color );
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.faq-link:hover {
	background-color: #f0f7ff;
	color: #3a7bc8;
}

/* Buttons */
.btn {
	display: block;
	width: 100%;
	padding: 1rem;
	margin: 0.5rem 0;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-primary {
	background-color: var( --primary-color );
	color: white;
}

.btn-primary:hover {
	background-color: #e08615;
}

.btn-secondary {
	background-color: var( --secondary-color );
	color: white;
}

.btn-secondary:hover {
	background-color: #3a7bc8;
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Payment Details */
.payment-info {
	background-color: #f8f9fa;
	border: 1px solid var( --border-color );
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.info-row {
	display: flex;
	justify-content: space-between;
	padding: 0.75rem 0;
	border-bottom: 1px solid var( --border-color );
}

.info-row:last-child {
	border-bottom: none;
}

.info-row .label {
	font-weight: 600;
	color: #666;
}

.info-row .value {
	text-align: right;
	font-weight: 500;
}

/* Invoice */
.invoice-container {
	text-align: center;
	margin-bottom: 2rem;
}

#invoice-qr {
	margin: 1rem auto;
	padding: 1rem;
	background-color: white;
	border: 2px solid var( --border-color );
	border-radius: 8px;
	display: inline-block;
}

.invoice-string {
	margin-top: 1rem;
	padding: 1rem;
	background-color: #f8f9fa;
	border-radius: 8px;
	word-break: break-all;
	max-height: 150px;
	overflow-y: auto;
}

.invoice-string code {
	font-family: 'Courier New', monospace;
	font-size: 0.75rem;
	color: #666;
}

/* Payment Status */
.payment-status {
	text-align: center;
	padding: 2rem 0;
}

#status-message {
	font-size: 1.25rem;
	font-weight: 600;
	color: var( --secondary-color );
	margin-bottom: 1rem;
}

.spinner {
	margin: 1rem auto;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var( --primary-color );
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate( 0deg ); }
	100% { transform: rotate( 360deg ); }
}

/* Success */
.success-icon {
	font-size: 5rem;
	color: var( --success-color );
	text-align: center;
	margin-bottom: 1rem;
}

#success-section h2 {
	color: var( --success-color );
}

#success-section p {
	text-align: center;
	margin-bottom: 2rem;
	font-size: 1.1rem;
}

/* Invoice state icons */
.state-icon {
	font-size: 5rem;
	text-align: center;
	margin-bottom: 1rem;
}

.expired-icon {
	color: var( --error-color );
}

.error-icon {
	color: var( --error-color );
}

/* Invoice state content containers */
.invoice-state-content {
	text-align: center;
}

.invoice-state-content h3 {
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.invoice-state-content p {
	margin-bottom: 1rem;
	font-size: 1.1rem;
}

/* Back arrow */
.back-arrow {
	cursor: pointer;
	display: inline-block;
	margin-right: 0.5rem;
	transition: transform 0.2s ease;
	font-size: 1.2em;
}

.back-arrow:hover {
	transform: translateX( -3px );
}

/* FAQ Section */
.faq-container {
	margin-bottom: 2rem;
}

.faq-item {
	margin-bottom: 1.5rem;
	background-color: #f8f9fa;
	border: 1px solid var( --border-color );
	border-radius: 8px;
	padding: 1.5rem;
	transition: all 0.3s ease;
}

.faq-item:hover {
	box-shadow: var( --shadow );
	border-color: var( --secondary-color );
}

.faq-question {
	color: var( --primary-color );
	font-size: 1.1rem;
	margin-bottom: 0.75rem;
	font-weight: 600;
}

.faq-answer {
	color: var( --text-color );
	line-height: 1.6;
}

.faq-answer p {
	margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
	margin-bottom: 0;
}

.faq-answer ul {
	margin: 0.75rem 0;
	padding-left: 1.5rem;
}

.faq-answer li {
	margin-bottom: 0.5rem;
}

.faq-answer a {
	color: var( --secondary-color );
	text-decoration: none;
	font-weight: 600;
}

.faq-answer a:hover {
	text-decoration: underline;
}

/* Footer */
.app-footer {
	background-color: #f8f9fa;
	padding: 1rem;
	text-align: center;
	border-top: 1px solid var( --border-color );
	font-size: 0.875rem;
	color: #666;
}

/* Responsive */
@media ( max-width: 480px ) {
	.app-header h1 {
		font-size: 1.5rem;
	}

	.app-main {
		padding: 1rem;
	}

	.btn {
		font-size: 0.9rem;
		padding: 0.875rem;
	}

	.how-it-works {
		padding: 1rem;
	}

	.how-it-works h3 {
		font-size: 1rem;
	}

	.how-it-works li {
		font-size: 0.9rem;
	}

	.info-icon:hover::after {
		width: 240px;
		font-size: 0.8rem;
		padding: 0.5rem 0.75rem;
	}

	.faq-item {
		padding: 1rem;
	}

	.faq-question {
		font-size: 1rem;
	}

	.faq-answer {
		font-size: 0.9rem;
	}
}
