Files
wordpress-theme-aksrt/assets/css/frontend/remote-modal.css
T
2026-08-04 23:24:37 +08:00

344 lines
7.0 KiB
CSS

/**
* Remote modal + ajax list primitives (shared).
*
* @package AKSRT
*/
/* ---- scroll lock ---- */
html.aksrt-remote-modal-open,
body.aksrt-remote-modal-open {
overflow: hidden;
}
/* ---- remote modal shell ---- */
.aksrt-remote-modal {
position: fixed;
inset: 0;
z-index: 100050;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
pointer-events: none;
}
.aksrt-remote-modal.is-open {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
.aksrt-remote-modal__overlay {
position: absolute;
inset: 0;
background: rgba(15, 18, 28, 0.48);
backdrop-filter: blur(2px);
}
.aksrt-remote-modal__dialog {
position: relative;
z-index: 1;
width: min(440px, calc(100vw - 32px));
max-height: min(88vh, 720px);
overflow: auto;
background: var(--surface-1, #fff);
border-radius: 16px;
box-shadow: 0 18px 48px rgba(15, 18, 28, 0.22);
transform: translateY(12px) scale(0.98);
transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
color: var(--color-ink, #1f2937);
}
.aksrt-remote-modal.is-open .aksrt-remote-modal__dialog {
transform: translateY(0) scale(1);
}
.aksrt-remote-modal--bottom {
align-items: flex-end;
}
.aksrt-remote-modal--bottom .aksrt-remote-modal__dialog {
width: 100%;
max-width: 100%;
border-radius: 16px 16px 0 0;
max-height: 90vh;
transform: translateY(24px);
}
.aksrt-remote-modal--bottom.is-open .aksrt-remote-modal__dialog {
transform: translateY(0);
}
.aksrt-remote-modal__content {
padding: 18px 18px 16px;
}
.aksrt-remote-modal__loading,
.aksrt-remote-modal__error-body {
padding: 28px 8px;
text-align: center;
color: var(--color-ink-2, #6b7280);
font-size: 14px;
}
.aksrt-remote-modal__skeleton {
display: grid;
gap: 12px;
padding: 8px 2px;
}
.aksrt-remote-modal__skeleton-line,
.aksrt-remote-modal__skeleton-block {
display: block;
border-radius: 8px;
background: linear-gradient(90deg, rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.3), rgba(148, 163, 184, 0.16));
background-size: 200% 100%;
animation: aksrt-modal-skeleton 1.2s ease-in-out infinite;
}
.aksrt-remote-modal__skeleton-line {
width: 72%;
height: 12px;
}
.aksrt-remote-modal__skeleton-line.is-wide {
width: 92%;
height: 18px;
}
.aksrt-remote-modal__skeleton-line.is-short {
width: 44%;
}
.aksrt-remote-modal__skeleton-block {
width: 100%;
min-height: 84px;
}
.aksrt-remote-modal__retry {
cursor: pointer;
}
@keyframes aksrt-modal-skeleton {
0% { background-position: 100% 0; }
100% { background-position: -100% 0; }
}
.aksrt-remote-modal .touch.border-title,
.aksrt-remote-modal .border-title {
font-size: 16px;
font-weight: 700;
margin: 0 0 14px;
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 6px;
}
.aksrt-remote-modal .abs-close,
.aksrt-remote-modal .aksrt-remote-modal__close {
position: absolute;
top: 10px;
right: 10px;
width: 32px;
height: 32px;
border: 0;
border-radius: 999px;
background: transparent;
color: var(--color-ink-3, #9ca3af);
cursor: pointer;
font-size: 18px;
line-height: 1;
}
.aksrt-remote-modal .but-average.modal-buts,
.aksrt-remote-modal .modal-buts {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-top: 16px;
}
.aksrt-remote-modal .but-average.modal-buts .but,
.aksrt-remote-modal .modal-buts .but,
.aksrt-remote-modal .modal-buts button {
min-height: 40px;
border-radius: 10px;
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-4, #f3f4f6);
color: var(--color-ink, #111);
font-weight: 600;
cursor: pointer;
}
.aksrt-remote-modal .modal-buts .but.c-blue,
.aksrt-remote-modal .modal-buts button.c-blue,
.aksrt-remote-modal .modal-buts .btn-primary {
background: var(--color-primary, #f04494);
border-color: color-mix(in srgb, var(--color-primary, #f04494) 70%, #000 0%);
color: var(--color-on-primary, #fff);
}
/* ---- ajax list ---- */
.ajaxpager.is-ajax-loading {
position: relative;
min-height: 80px;
}
.ajaxpager .post_ajax_loader,
.ajaxpager .post-ajax-loader {
display: none;
}
.ajaxpager .post_ajax_loader.is-loading,
.ajaxpager .post-ajax-loader.is-loading {
display: block;
}
.ajax-item.is-fading {
opacity: 0.35;
transition: opacity 0.15s ease;
}
/* ---- order review modal content ---- */
.order-comment-from .shop-score-box {
display: flex;
align-items: center;
gap: 8px;
min-height: 36px;
}
.order-comment-from .score-title {
width: 4.5em;
flex: 0 0 auto;
font-size: 13px;
color: var(--color-ink-2, #6b7280);
}
.order-comment-from .score-icon {
display: inline-flex;
gap: 4px;
align-items: center;
height: 30px;
}
.order-comment-from .icon-star {
display: inline-flex;
width: 22px;
height: 22px;
color: #d1d5db;
cursor: pointer;
transition: color 0.12s ease, transform 0.12s ease;
}
.order-comment-from .icon-star svg {
width: 22px;
height: 22px;
fill: currentColor;
}
.order-comment-from .icon-star.active,
.order-comment-from .icon-star.hover {
color: #fc7049;
}
.order-comment-from .icon-star.hover {
transform: scale(1.08);
}
.order-comment-from .score-text {
min-width: 3em;
font-size: 13px;
color: var(--color-ink-2, #6b7280);
}
.order-comment-from textarea.form-control {
width: 100%;
border: 1px solid var(--color-line, #e5e7eb);
border-radius: 10px;
padding: 10px 12px;
font-size: 14px;
resize: vertical;
min-height: 96px;
background: var(--surface-1, #fff);
color: var(--color-ink, #111);
}
.order-comment-from .form-upload .preview {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.order-comment-from .form-upload .preview .add,
.order-comment-from .form-upload .preview .preview-item {
width: 80px;
height: 80px;
border-radius: 10px;
border: 1px dashed var(--color-line, #d1d5db);
background: var(--surface-4, #f9fafb);
position: relative;
overflow: hidden;
cursor: pointer;
}
.order-comment-from .form-upload .preview .add::before,
.order-comment-from .form-upload .preview .add::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
background: var(--color-ink-3, #9ca3af);
transform: translate(-50%, -50%);
}
.order-comment-from .form-upload .preview .add::before {
width: 22px;
height: 2px;
}
.order-comment-from .form-upload .preview .add::after {
width: 2px;
height: 22px;
}
.order-comment-from .form-upload .preview .preview-item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.order-comment-from .form-upload .preview .preview-item .remove {
position: absolute;
top: 2px;
right: 2px;
width: 20px;
height: 20px;
border: 0;
border-radius: 999px;
background: rgba(0, 0, 0, 0.55);
color: #fff;
font-size: 12px;
line-height: 1;
cursor: pointer;
}
.order-comment-from .form-upload .hide {
display: none !important;
}
.order-comment-from .review-error {
color: #ef4444;
font-size: 13px;
margin-top: 8px;
}
@media (max-width: 768px) {
.aksrt-remote-modal:not(.aksrt-remote-modal--bottom) .aksrt-remote-modal__dialog {
width: calc(100vw - 20px);
}
}