/* ========================================
   PAYBACK CALCULATOR STYLES
   ======================================== */

.payback-calculator-container {
	max-width: 800px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.calculator-wrapper {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 4px 15px rgba(124, 58, 237, 0.1);
	border: 1px solid #f0f0f0;
}

.calculator-wrapper h2 {
	color: #7c3aed;
	margin-bottom: 0.5rem;
	font-size: 1.8rem;
}

.calculator-description {
	color: #666;
	margin-bottom: 2rem;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* ========================================
   FORM STYLES
   ======================================== */

.payback-form {
	margin-bottom: 2rem;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	font-weight: 600;
	color: #333;
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
}

.form-group small {
	color: #999;
	font-size: 0.85rem;
	margin-top: 0.3rem;
}

.input-group {
	display: flex;
	align-items: center;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	transition: border-color 0.3s ease;
}

.input-group:focus-within {
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-group .currency {
	padding: 0.75rem 0.75rem;
	background: #f8f9fa;
	color: #7c3aed;
	font-weight: 600;
	border-right: 1px solid #e0e0e0;
}

.input-group input {
	flex: 1;
	border: none;
	padding: 0.75rem;
	font-size: 1rem;
	outline: none;
}

.input-group input::placeholder {
	color: #ccc;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.button-primary {
	background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
}

.button-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.button-primary:active {
	transform: translateY(0);
}

.button-large {
	padding: 1rem 2rem;
	font-size: 1.05rem;
}

/* ========================================
   RESULT STYLES
   ======================================== */

.payback-result {
	background: linear-gradient(135deg, #f3f0ff 0%, #faf5ff 100%);
	border-radius: 12px;
	padding: 2rem;
	margin-top: 2rem;
	border: 2px solid #e0d5ff;
}

.result-card {
	background: white;
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	margin-bottom: 2rem;
	box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.result-card h3 {
	color: #7c3aed;
	margin: 0 0 1rem 0;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.result-value {
	font-size: 3rem;
	font-weight: 800;
	color: #7c3aed;
	margin: 0.5rem 0;
	line-height: 1;
}

.result-label {
	color: #666;
	font-size: 0.95rem;
	font-weight: 500;
}

.result-details {
	background: white;
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.result-details h4 {
	color: #333;
	margin-top: 0;
	margin-bottom: 1rem;
	font-size: 1rem;
}

.result-table {
	width: 100%;
	border-collapse: collapse;
}

.result-table tr {
	border-bottom: 1px solid #f0f0f0;
}

.result-table tr:last-child {
	border-bottom: none;
}

.result-table td {
	padding: 0.75rem 0;
	color: #666;
	font-size: 0.95rem;
}

.result-table td:first-child {
	font-weight: 600;
	color: #333;
}

.result-table td:last-child {
	text-align: right;
	color: #7c3aed;
	font-weight: 600;
}

#payback-chart {
	max-width: 100%;
	height: auto;
	margin-top: 1.5rem;
}

/* ========================================
   INFO SECTION
   ======================================== */

.calculator-info {
	background: white;
	border-radius: 12px;
	padding: 1.5rem;
	margin-top: 2rem;
	border-left: 4px solid #7c3aed;
}

.calculator-info h4 {
	color: #7c3aed;
	margin-top: 0;
	margin-bottom: 0.75rem;
}

.calculator-info p {
	color: #666;
	margin: 0.75rem 0;
	line-height: 1.6;
	font-size: 0.95rem;
}

.calculator-info strong {
	color: #333;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
	.calculator-wrapper {
		padding: 1.5rem;
	}

	.calculator-wrapper h2 {
		font-size: 1.5rem;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.result-value {
		font-size: 2.5rem;
	}

	.payback-calculator-container {
		margin: 1rem auto;
		padding: 0 0.5rem;
	}
}

@media (max-width: 480px) {
	.calculator-wrapper {
		padding: 1rem;
	}

	.calculator-wrapper h2 {
		font-size: 1.3rem;
	}

	.result-value {
		font-size: 2rem;
	}

	.input-group {
		flex-direction: column;
		align-items: stretch;
	}

	.input-group .currency {
		border-right: none;
		border-bottom: 1px solid #e0e0e0;
		text-align: center;
	}

	.button-primary {
		padding: 0.75rem 1rem;
		font-size: 0.95rem;
	}
}

/* ========================================
   LOADING STATE
   ======================================== */

.payback-form.loading .button-primary {
	opacity: 0.7;
	pointer-events: none;
}

.payback-form.loading .button-primary::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 0.5rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	vertical-align: middle;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
