mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireExplorer.git
synced 2026-07-16 10:11:34 +08:00
244 lines
4.1 KiB
SCSS
244 lines
4.1 KiB
SCSS
// Cart floating button
|
|
.ae-cart-float {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
z-index: 1000;
|
|
background: #0073aa;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 50%;
|
|
width: 60px;
|
|
height: 60px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
display: none; // Hidden by default
|
|
|
|
&:hover {
|
|
background: #005a87;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.dashicons {
|
|
font-size: 24px;
|
|
line-height: 24px;
|
|
}
|
|
|
|
&.ae-cart-visible {
|
|
display: block;
|
|
}
|
|
|
|
.ae-cart-count {
|
|
position: absolute;
|
|
top: -5px;
|
|
right: -5px;
|
|
background: #dc3232;
|
|
color: white;
|
|
border-radius: 50%;
|
|
width: 24px;
|
|
height: 24px;
|
|
font-size: 12px;
|
|
line-height: 24px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
// Add to cart button states
|
|
.entry-add-to-cart button {
|
|
&.added-to-cart {
|
|
background: #4caf50 !important;
|
|
border-color: #4caf50 !important;
|
|
color: white !important;
|
|
cursor: pointer !important;
|
|
|
|
.dashicons {
|
|
&:before {
|
|
content: "\f147"; // checkmark icon
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
background: #45a049 !important;
|
|
border-color: #45a049 !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Cart popup overlay
|
|
.ae-cart-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
z-index: 2000;
|
|
display: none;
|
|
|
|
&.ae-cart-open {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
// Cart popup
|
|
.ae-cart-popup {
|
|
background: white;
|
|
border-radius: 8px;
|
|
padding: 30px;
|
|
max-width: 500px;
|
|
width: 90%;
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
position: relative;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
|
|
.ae-cart-close {
|
|
position: absolute;
|
|
top: 15px;
|
|
right: 20px;
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
color: #666;
|
|
|
|
&:hover {
|
|
color: #000;
|
|
}
|
|
}
|
|
|
|
.ae-cart-title {
|
|
margin: 0 0 20px 0;
|
|
font-size: 24px;
|
|
color: #333;
|
|
}
|
|
|
|
.ae-cart-content {
|
|
margin-bottom: 20px;
|
|
|
|
.ae-cart-empty {
|
|
text-align: center;
|
|
color: #666;
|
|
font-style: italic;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.ae-cart-textarea {
|
|
width: 100%;
|
|
min-height: 200px;
|
|
padding: 15px;
|
|
border: 2px solid #ddd;
|
|
border-radius: 4px;
|
|
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
resize: vertical;
|
|
box-sizing: border-box;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
border-color: #0073aa;
|
|
}
|
|
}
|
|
}
|
|
|
|
.ae-cart-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
justify-content: flex-end;
|
|
|
|
.button {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: background-color 0.2s ease;
|
|
|
|
&.button-primary {
|
|
background: #0073aa;
|
|
color: white;
|
|
|
|
&:hover {
|
|
background: #005a87;
|
|
}
|
|
|
|
&:disabled {
|
|
background: #ccc;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
&.button-secondary {
|
|
background: #f1f1f1;
|
|
color: #333;
|
|
|
|
&:hover {
|
|
background: #e1e1e1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Success message
|
|
.ae-cart-success {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
background: #4caf50;
|
|
color: white;
|
|
padding: 12px 20px;
|
|
border-radius: 4px;
|
|
z-index: 3000;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
transform: translateX(100%);
|
|
transition: transform 0.3s ease;
|
|
|
|
&.ae-cart-success-visible {
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
// Mobile responsive
|
|
@media (max-width: 768px) {
|
|
.ae-cart-float {
|
|
width: 50px;
|
|
height: 50px;
|
|
bottom: 15px;
|
|
right: 15px;
|
|
|
|
.dashicons {
|
|
font-size: 20px;
|
|
line-height: 50px;
|
|
}
|
|
|
|
.ae-cart-count {
|
|
width: 20px;
|
|
height: 20px;
|
|
font-size: 10px;
|
|
line-height: 20px;
|
|
}
|
|
}
|
|
|
|
.ae-cart-popup {
|
|
padding: 20px;
|
|
width: 95%;
|
|
|
|
.ae-cart-title {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.ae-cart-actions {
|
|
flex-direction: column;
|
|
|
|
.button {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|