146 lines
3.4 KiB
CSS
146 lines
3.4 KiB
CSS
:root {
|
|
--pinterest-modal-z-index: 10000;
|
|
--pinterest-modal-width: 80vw;
|
|
--pinterest-modal-height: 80vh;
|
|
--pinterest-modal-animation-duration: 0.15s;
|
|
--pinterest-modal-animation-timing: cubic-bezier(.25,.8,.25,1);
|
|
--pinterest-image-height: 200px;
|
|
}
|
|
|
|
#pinterest-modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
z-index: var(--pinterest-modal-z-index);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
animation: fadeIn var(--pinterest-modal-animation-duration) ease forwards;
|
|
}
|
|
|
|
#pinterest-modal {
|
|
width: var(--pinterest-modal-width);
|
|
height: var(--pinterest-modal-height);
|
|
z-index: calc(var(--pinterest-modal-z-index) + 1);
|
|
display: flex;
|
|
overflow: hidden;
|
|
background: rgb(25, 25, 25);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.pinterest-modal-content {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@keyframes fadeOut {
|
|
from { opacity: 1; }
|
|
to { opacity: 0; }
|
|
}
|
|
|
|
.pinterest-image-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
grid-auto-rows: auto;
|
|
gap: 10px;
|
|
padding: 20px;
|
|
overflow-y: auto;
|
|
width: 100%;
|
|
height: 100%;
|
|
max-height: calc(var(--pinterest-modal-height) - 40px);
|
|
margin-top: 20px;
|
|
background: rgb(30, 30, 30);
|
|
position: relative;
|
|
}
|
|
|
|
.pinterest-shadow-top {
|
|
position: absolute;
|
|
top: 20px; /* Account for margin-top of image grid */
|
|
left: 0;
|
|
right: 0;
|
|
height: 12px;
|
|
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
|
|
z-index: 100;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.pinterest-shadow-bottom {
|
|
position: absolute;
|
|
bottom: 20px; /* Account for any bottom margin/padding */
|
|
left: 0;
|
|
right: 0;
|
|
height: 12px;
|
|
background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
|
|
z-index: 100;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.pinterest-image-container {
|
|
position: relative;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
background: rgb(35, 35, 35);
|
|
border: none;
|
|
transition: box-shadow 0.2s ease, transform 0.2s ease, border 0.2s ease;
|
|
width: 100%;
|
|
min-height: 50px;
|
|
grid-row-end: span 5;
|
|
box-sizing: border-box;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
transform: translateZ(0);
|
|
will-change: transform;
|
|
}
|
|
|
|
.pinterest-image-container:hover {
|
|
box-shadow: 0 1px 8px rgba(255, 255, 255, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
outline: 1px solid rgba(255, 255, 255, 0.8);
|
|
transform: translateY(-4px) translateZ(0);
|
|
}
|
|
|
|
.pinterest-image {
|
|
width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.pinterest-image-loading {
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 50px;
|
|
background: rgb(45, 45, 45);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
}
|
|
|
|
.pinterest-image-loading::before {
|
|
content: '';
|
|
width: 30px;
|
|
height: 30px;
|
|
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
border-top: 3px solid #fff;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
|
|
.pinterest-image-container.pinterest-image-selected {
|
|
border: 1px solid #4CAF50 !important;
|
|
box-shadow: 0 0 15px rgba(76, 175, 80, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
|
|
}
|