/* 实时汇率查询工具特定样式 */

.converter-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
}

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

.form-group label {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}

.textarea-input, .select-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #f1f5f9;
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease;
}

.textarea-input:focus, .select-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.currency-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.currency-row .form-group {
  flex: 1;
}

.swap-icon {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  padding-bottom: 2px;
}

.result-panel-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.result-content {
  text-align: center;
  width: 100%;
}

.result-placeholder {
  color: #64748b;
  font-style: italic;
}

.rate-main {
  margin-bottom: 20px;
}

.rate-value {
  font-size: 36px;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 8px;
}

.rate-base {
  font-size: 16px;
  color: #94a3b8;
}

.rate-meta {
  font-size: 13px;
  color: #64748b;
  padding: 10px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 6px;
  display: inline-block;
}

/* 搜索下拉框样式 */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: #f1f5f9;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.searchable-select-trigger:hover {
  border-color: #10b981;
}

.searchable-select-trigger .arrow {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.searchable-select.open .searchable-select-trigger .arrow {
  transform: rotate(180deg);
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.searchable-select.open .searchable-select-dropdown {
  display: flex;
}

.search-input-container {
  padding: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: #10b981;
}

.options-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
}

.options-list::-webkit-scrollbar {
  width: 4px;
}

.options-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 4px;
}

.option-item {
  padding: 10px 12px;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-item:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.option-item.selected {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 600;
}

.option-item.hidden {
  display: none;
}

/* 适配移动端 */
@media (max-width: 640px) {
  .currency-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .swap-icon {
    height: auto;
    padding: 10px 0;
    transform: rotate(90deg);
  }
  
  .rate-value {
    font-size: 28px;
  }
}

/* 主题适配 */
.light-theme .textarea-input, 
.light-theme .select-input,
.light-theme .searchable-select-trigger {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e293b;
}

.light-theme .searchable-select-trigger:hover {
  border-color: #10b981;
}

.light-theme .searchable-select-dropdown {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.light-theme .search-input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

.light-theme .search-input-container {
  border-bottom-color: #f1f5f9;
}

.light-theme .option-item {
  color: #64748b;
}

.light-theme .option-item:hover {
  background: rgba(16, 185, 129, 0.08);
}

.light-theme .option-item.selected {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.light-theme .rate-meta {
  background: #f8fafc;
}
