/* ==================== 容器样式 ==================== */
.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.calculator-container {
    max-width: 550px;
    width: 100%;
    overflow: hidden;
}

/* ==================== 输入组样式 ==================== */

.input-group {
    margin-bottom: 25px;
}

.input-label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 767px) {
	.input-label {
	    margin-bottom: 5px;
	}
}
.amount-input{
    width: 100%;
    padding: 2px 18px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 18px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.amount-input:focus {
	border-color: var(--theme-color);
	outline: 0;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(32, 107, 231, .6); 
}

.amount-input:hover {
    border-color: #c0c0c0;
	/* var(--theme-color) */
}

/* ==================== 货币选择样式 ==================== */

.form-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 25px;
}

.form-group {
    flex: 1;
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    height: 52px;
    padding: 8px;
    transition: all 0.3s ease;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #c0c0c0;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 4px rgba(32, 107, 231, 0.1);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    font-weight: 500;
    font-size: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px;
    right: 8px;
}

.select2-dropdown {
    border: 2px solid var(--theme-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.select2-results__option {
    padding: 12px 15px;
    font-size: 15px;
}

/* ==================== 按钮样式 ==================== */

.exchange-button {
    background: #ffffff;
    border: none;
    color: var(--theme-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    font-size: 22px;
    flex-shrink: 0;
	border: 1px solid rgba(32, 107, 231, 0.6);
    /* box-shadow: 0 4px 12px rgba(32, 107, 231, 0.3); */
}

.exchange-button:hover {
    background: var(--theme-hover);
	color: #ffffff;
    transform: rotate(180deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(32, 107, 231, 0.4);
}
.exchange-button:active {
    transform: rotate(180deg) scale(0.95);
}
.exchange-button svg{
	height: 1em;
	width: 1em;
	fill: currentColor;
	overflow: hidden;
}
.calculate-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--theme-color) 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(32, 107, 231, 0.3);
}

.calculate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(32, 107, 231, 0.4);
}

.calculate-button:active {
    transform: translateY(-1px);
}

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

/* ==================== 快速结果样式 ==================== */
.calculator-result{
	display: flex;
	gap: 1rem;
	justify-content: space-around;
	padding: 25px 15px;
}

.quick-result {
	flex: 1;
    font-size: 16px;
    animation: slideIn 0.4s ease;
	/* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
	/* border-radius: 12px; */
}

.quick-result.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-result-content {
    text-align: center;
}

.quick-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--theme-color);
    margin-bottom: 10px;
}

.quick-rate {
    font-weight: 600;
}
@media (max-width: 767px) {
	.calculator-result{
		flex-direction: column-reverse;
		padding: 0;
	}
	.form-convert .btn{
		display: block;
		width: 100%;
	}
	.quick-meta-date{display: block;width: 100%;color: #666;}
}
/* ==================== 错误消息样式 ==================== */

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    animation: shake 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==================== 加载动画样式 ==================== */

.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: spin 0.6s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
	.calculator-container {
		max-width: 100%;
	}
	.form-row {
		flex-direction: column;
		align-items: stretch;
	}

	.exchange-button {
		border-radius: 12px;
		transform: rotate(90deg);
	}

	.exchange-button:hover {
		transform: rotate(270deg);
	}

	.quick-amount {
		font-size: 22px;
	}
}
/* widget */

.cha-box .calculator-container {
	display: flex;
	flex-wrap: nowrap;
	overflow: hidden;
	flex-direction: column;
	gap: 15px;
}
.cha-box .form-row {
	align-items: center;
	margin-top: 20px;
	margin-bottom:0;
	gap:8px;
}
.cha-box .calculator-select{
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
}
.cha-box .form-group{
	display: flex;
}
.cha-box .input-label{
	font-size: 14px;
	font-weight: normal;
	width: 40px;
	margin-bottom: 0;
}
 
.cha-box .exchange-button{
	width: 30px;
	height: 30px;
	transform: rotate(90deg);
}
@media (max-width: 768px) {
	.cha-box .form-row {
		flex-direction: row;
	}
	.cha-box .exchange-button{
		border-radius: 50%;
	}
	.cha-box .form-convert .btn{
		padding: 0;
	}
}