/* ============================================
   SAND CALCULATOR FRONTEND STYLES
   ============================================ */

/* Wrapper & Main Container */
.sand-calculator-wrapper {
	background: white;
	border-radius: 16px;
	padding: 40px;
	max-width: 1400px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ============================================
   HEADER SECTION
   ============================================ */

.sand-calc-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 32px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.sand-calc-header-content {
	display: flex;
	gap: 0;
	align-items: flex-start;
	flex: 1;
	min-width: 300px;
}

.sand-calc-header-content > div {
	flex: 1;
}

.sand-calc-title {
	font-size: 32px;
	font-weight: 800;
	color: #0f0f1e;
	margin: 0 0 12px 0;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.sand-calc-subtitle {
	font-size: 15px;
	color: #71717a;
	margin: 0;
	line-height: 1.6;
	font-weight: 400;
}

/* Hint Box */
.sand-calc-hint-box {
	background: linear-gradient(135deg, #f5f3ff 0%, #fafbff 100%);
	border: 1px solid #e0dcff;
	border-radius: 12px;
	padding: 16px 20px;
	flex: 0 1 320px;
	box-shadow: 0 1px 3px rgba(124, 58, 237, 0.08);
}

.sand-calc-hint-title {
	font-size: 13px;
	font-weight: 700;
	color: #7c3aed;
	margin: 0 0 6px 0;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.sand-calc-hint-text {
	font-size: 13px;
	color: #52525b;
	line-height: 1.5;
	margin: 0;
	font-weight: 500;
}

/* ============================================
   FORM SECTIONS
   ============================================ */

.sand-calculator-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 28px;
	align-items: stretch;
}



.sand-calc-section-title {
	font-size: 14px;
	font-weight: 700;
	color: #0f0f1e;
	margin: 0 0 16px 0;
	display: block;
	text-transform: capitalize;
	letter-spacing: 0.2px;
}

/* ============================================
   SELECT DROPDOWN
   ============================================ */

.sand-calc-select {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid #e4e4e7;
	border-radius: 8px;
	font-size: 14px;
	color: #0f0f1e;
	background-color: white;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 18px;
	padding-right: 38px;
	font-weight: 500;
}

.sand-calc-select:hover {
	border-color: #c4b5fd;
	background-color: #faf9ff;
}

.sand-calc-select:focus {
	outline: none;
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
	background-color: white;
}

.sand-calc-select option {
	color: #0f0f1e;
	background: white;
	padding: 8px;
}

/* ============================================
   AREA INPUT SECTION
   ============================================ */

.sand-calc-area-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sand-calc-area-content {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sand-calc-area-label {
	font-size: 12px;
	font-weight: 700;
	color: #52525b;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.sand-calc-section > .sand-calc-area-label {
	margin-bottom: 10px;
}

.sand-calc-area-input-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	position: relative;
}

.sand-calc-input {
	flex: 1;
	padding: 11px 14px;
	border: 1.5px solid #e4e4e7;
	border-radius: 8px;
	font-size: 14px;
	color: #0f0f1e;
	transition: all 0.2s ease;
	font-weight: 500;
	background: white;
}

.sand-calc-input::placeholder {
	color: #a1a1aa;
}

.sand-calc-input:hover {
	border-color: #c4b5fd;
	background-color: #faf9ff;
}

.sand-calc-input:focus {
	outline: none;
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
	background-color: white;
}

.sand-calc-area-unit {
	font-size: 12px;
	font-weight: 700;
	color: #7c3aed;
	padding: 8px 12px;
	background: rgba(124, 58, 237, 0.1);
	border-radius: 6px;
	min-width: 44px;
	text-align: center;
	border: 1px solid rgba(124, 58, 237, 0.2);
}

.sand-calc-area-help {
	font-size: 11px;
	color: #a1a1aa;
	margin-top: 2px;
	font-weight: 500;
}

/* ============================================
   RESULT BOX
   ============================================ */

.sand-calc-result-box {
	background: linear-gradient(135deg, #34267e 0%, #32237B 100%);
	border-radius: 12px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: auto;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: white;
	grid-column: 1 / -1;
}

.sand-calc-result-label {
	font-size: 11px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.8);
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-bottom: 10px;
}

.sand-calc-result-amount {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 16px;
}

.sand-calc-result-amount span {
	font-size: 42px;
	font-weight: 800;
	color: white;
	line-height: 1;
	letter-spacing: -1px;
}

.sand-calc-result-info {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
	padding: 0;
	background: transparent;
	border-radius: 0;
	border-left: none;
	display: block;
	gap: 0;
	font-weight: 500;
}

.sand-calc-result-info span {
	font-weight: 700;
	color: white;
	font-size: 14px;
}

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

.sand-calc-button {
	width: 100%;
	padding: 14px 28px;
	background: linear-gradient(135deg, #34267e 0%, #32237B 100%);
	color: white;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin-top: 20px;
}

.sand-calc-button:hover {
	background: linear-gradient(135deg, #34267e 0%, #32237B 100%);
	transform: translateY(-2px);
}

.sand-calc-button:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.sand-calc-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* ============================================
   RESPONSIVE LAYOUT
   ============================================ */

@media (max-width: 1024px) {
	.sand-calculator-wrapper {
		padding: 32px;
	}

	.sand-calc-header {
		gap: 20px;
	}

	.sand-calc-title {
		font-size: 28px;
	}

	.sand-calc-hint-box {
		flex: 1;
		min-width: 100%;
	}
}

@media (max-width: 768px) {
	.sand-calculator-wrapper {
		padding: 24px;
		margin: 20px 0;
	}

	.sand-calc-header {
		flex-direction: column;
		gap: 16px;
		margin-bottom: 32px;
	}

	.sand-calc-header-content {
		gap: 0;
	}

	.sand-calc-title {
		font-size: 24px;
	}

	.sand-calc-subtitle {
		font-size: 14px;
	}

	.sand-calc-hint-box {
		width: 100%;
	}

	.sand-calculator-form {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-bottom: 24px;
	}

	.sand-calc-section {
		padding: 18px;
	}

	.sand-calc-result-box {
		padding: 20px;
		min-height: auto;
	}

	.sand-calc-result-amount span {
		font-size: 36px;
	}

	.sand-calc-button {
		padding: 12px 24px;
		font-size: 14px;
		margin-top: 16px;
	}
}

@media (max-width: 480px) {
	.sand-calculator-wrapper {
		padding: 16px;
		border-radius: 12px;
	}

	.sand-calc-header-content {
		flex-direction: column;
	}

	.sand-calc-title {
		font-size: 20px;
	}

	.sand-calc-subtitle {
		font-size: 13px;
	}

	.sand-calc-section-title {
		font-size: 13px;
	}

	.sand-calc-result-amount span {
		font-size: 32px;
	}

	.sand-calc-area-input-wrapper {
		flex-direction: column;
	}

	.sand-calc-area-unit {
		width: 100%;
	}
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.sand-calc-hidden {
	display: none !important;
}

.sand-calc-visible {
	display: block !important;
}

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

.sand-calc-loading {
	opacity: 0.6;
	pointer-events: none;
}

.sand-calc-loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(124, 58, 237, 0.3);
	border-radius: 50%;
	border-top-color: #7c3aed;
	animation: sand-calc-spin 0.8s linear infinite;
	margin-left: 8px;
}

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

/* ============================================
   ERROR STATE
   ============================================ */

.sand-calc-error {
	background-color: #fef2f2;
	border-color: #fca5a5;
	color: #dc2626;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	margin: 12px 0;
	display: none;
	border: 1px solid #fecaca;
}

.sand-calc-error.show {
	display: block;
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.sand-calc-success {
	animation: sand-calc-fadeIn 0.3s ease-in;
}

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