Files
betaxab 27382565de feat: Add front-end support for the checkout cashier
cashier.html:
All parameters are clearly defined and passed by Payment.init func.
cashier.js:
Deprecate jQuery support and use Vanilla JS.
2026-02-18 18:19:01 +08:00

202 lines
3.9 KiB
CSS

.selector-section {
display: flex;
flex-direction: column;
background: white !important;
padding: 32px !important;
gap: 32px;
margin-bottom: 32px !important;
border-radius: 7px !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
.selector-content {
display: flex;
flex-direction: column;
gap: 32px;
width: 100%;
}
.selector-container {
display: flex;
flex-direction: column;
gap: 16px;
}
.coin-select {
outline: 1px solid #e8e8e8;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 22px 18px 16px;
}
.coin-select span {
margin: 0;
color: #000;
}
.pay-button {
cursor: pointer;
font-family: Golos, sans-serif;
padding: 18px;
width: 100%;
border: none;
background: #667eea;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.pay-button:hover {
background-color: #5a67d8;
transform: translateY(-1px);
}
.pay-button p {
color: #fff;
margin: 0;
height: 20px;
font-weight: 500;
font-size: 16px;
line-height: 20px;
letter-spacing: -.12px;
display: flex;
align-items: center;
column-gap: 10px;
}
/* Dropdown Styles */
.selector-container {
display: flex;
gap: 10px;
margin-top: 15px;
}
.coin-select {
position: relative;
flex: 1;
background: var(--bg-card-light, #f8f9fa);
/* Fallback or use variable if exists */
border: 1px solid var(--border-color, #e9ecef);
border-radius: 12px;
padding: 12px 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: space-between;
transition: all 0.2s ease;
user-select: none;
}
.coin-select:hover {
border-color: var(--primary-color, #2d60e0);
background: #fff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.coin-select.active {
border-color: var(--primary-color, #2d60e0);
background: #fff;
box-shadow: 0 0 0 3px rgba(45, 96, 224, 0.1);
}
.coin-select span {
margin: 0;
font-weight: 600;
color: #4a5568;
font-size: 15px;
}
.coin-select svg {
color: var(--text-secondary, #8590a6);
transition: transform 0.3s ease;
}
.coin-select.active svg {
transform: rotate(180deg);
color: var(--primary-color, #2d60e0);
}
/* Options Dropdown */
.options-list {
position: absolute;
top: calc(100% + 8px);
left: 0;
width: 100%;
background: #fff;
border: 1px solid var(--border-color, #e9ecef);
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
z-index: 100;
max-height: 280px;
overflow-y: auto;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
padding: 6px;
}
.coin-select.active .options-list {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.option-item {
padding: 10px 12px;
border-radius: 8px;
cursor: pointer;
transition: background 0.15s ease;
display: flex;
align-items: center;
justify-content: space-between;
}
.option-item:hover {
background: var(--bg-hover, #f5f7fa);
}
.option-item.selected {
background: rgba(45, 96, 224, 0.08);
color: var(--primary-color, #2d60e0);
font-weight: 600;
}
.option-item .option-text {
font-size: 14px;
}
.option-item .option-badge {
font-size: 12px;
padding: 2px 6px;
background: #edf2f7;
border-radius: 4px;
color: #718096;
}
/* Scrollbar styling */
.options-list::-webkit-scrollbar {
width: 6px;
}
.options-list::-webkit-scrollbar-thumb {
background-color: #cbd5e0;
border-radius: 3px;
}
.options-list::-webkit-scrollbar-track {
background: transparent;
}
.pay-button:disabled {
background: #bdbdbd; /* 灰色背景 */
color: #f5f5f5;
cursor: not-allowed;
box-shadow: none;
outline: none;
transform: none;
}