windowseat-reflection-removal-web / css /comparison-widget.css
anton-bayerlab's picture
initial commit
9b5662d
/* Comparison widget layout */
#comparison-widget .ws-card {
border-radius: 24px;
overflow: hidden;
background: #111;
/* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); */
}
#comparison-widget .ws-card-header {
padding: 0.75rem 1.25rem;
background: rgba(201, 230, 170, 0.9);
}
#comparison-widget .ws-card-title {
font-weight: 600;
letter-spacing: 0.04em;
}
#comparison-widget .ws-card-body {
background: #000;
width: auto;
height: auto;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
#comparison-widget img {
display: block;
width: auto; /* Use natural image width */
height: auto; /* Use natural image height */
max-width: 100%;
max-height: none;
object-fit: cover; /* In case there are any minor differences */
}
/* Center the fixed-width containers if needed */
#comparison-widget .ws-card {
margin: 0 auto;
width: fit-content;
}
/* Model selector pills */
.ws-model-selector {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.ws-model-label {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.12em;
opacity: 0.7;
}
.ws-model-pill {
border: none;
border-radius: 999px;
padding: 0.3rem 0.9rem;
font-size: 0.8rem;
background: rgba(255, 255, 255, 0.4);
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.ws-model-pill.is-active {
background: rgba(255, 255, 255, 0.9);
color: #111;
border: 1px solid rgba(255, 255, 255, 0.3);
transform: translateY(-1px);
}
/* Style for disabled WindowSeat button */
.ws-model-pill:disabled {
background: rgba(255, 255, 255, 0.9);
color: #111;
cursor: default;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.ws-model-pill:disabled:hover {
transform: none; /* No hover effect for disabled button */
background: rgba(255, 255, 255, 0.9);
}
/* Hotspot / bulb button */
.ws-card-body-relative {
position: relative;
}
.ws-hotspot-button {
position: absolute;
right: 1rem;
bottom: 1rem;
width: 40px;
height: 40px;
border-radius: 999px;
border: none;
background: rgba(255, 255, 255, 0.9);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.3rem;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.ws-hotspot-button:hover {
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
/* Hotspots (arrows, markers) */
.ws-hotspots-layer {
position: absolute;
inset: 0;
pointer-events: none;
}
.ws-hotspot {
position: absolute;
width: 40px;
height: 40px;
background: rgba(255, 255, 0, 0.15);
border-radius: 999px;
border: 2px solid rgba(255, 255, 255, 0.9);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 1.2rem;
}
.ws-hotspot-arrow {
width: 0;
height: 0;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-left: 14px solid #ffffff;
}
/* Remove header styling, keep only for left card */
#comparison-widget .ws-card:first-child .ws-card-header {
padding: 0.75rem 1.25rem;
background: rgba(201, 230, 170, 0.9);
}
/* Hide header for right card */
#comparison-widget .ws-card:last-child .ws-card-header {
display: none;
}
/* Model selector as overlay */
.ws-model-selector-overlay {
position: absolute;
top: 1rem;
left: 1rem;
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
z-index: 10;
}
/* Semi-transparent overlay buttons */
.ws-model-pill {
border: none;
border-radius: 999px;
padding: 0.4rem 1rem;
font-size: 0.85rem;
background: rgba(0, 0, 0, 0.6); /* Dark semi-transparent */
color: rgba(255, 255, 255, 0.9);
cursor: pointer;
transition: all 0.2s ease;
backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.ws-model-pill:hover {
background: rgba(0, 0, 0, 0.8);
color: #ffffff;
transform: translateY(-1px);
}
.ws-model-pill.is-active {
background: rgba(255, 255, 255, 0.9);
color: #111;
border: 1px solid rgba(255, 255, 255, 0.3);
transform: translateY(-1px);
}
/* Remove old selector styles */
.ws-model-selector,
.ws-model-label {
display: none;
}
/* Make containers responsive on smaller screens */
@media (max-width: 1000px) {
#comparison-widget .ws-card {
width: 100% !important;
max-width: 100% !important;
}
#comparison-widget .ws-card-body {
width: 100% !important;
height: auto !important;
}
#comparison-widget img {
width: 100% !important;
height: auto !important;
max-width: 100% !important;
}
.ws-card {
width: 100% !important;
max-width: 100% !important;
}
.ws-card-body {
width: 100% !important;
}
.ws-card-body img {
width: 100% !important;
height: auto !important;
max-height: none !important;
}
#ws-comparison-slider {
width: 100% !important;
max-height: none !important;
}
#ws-comparison-slider img {
width: 100% !important;
height: auto !important;
max-height: none !important;
}
#ws-image-left,
#ws-image-right {
width: 100% !important;
height: auto !important;
}
.twentytwenty-container {
width: 100% !important;
height: auto !important;
}
}
/* Image Gallery */
#image-gallery {
padding-top: 2rem;
padding-bottom: 2rem;
}
.ws-gallery-grid {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin: 0 auto;
}
.ws-gallery-item {
width: 120px;
height: 120px;
border-radius: 12px;
overflow: hidden;
cursor: pointer;
transition: all 0.2s ease;
border: 3px solid transparent;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ws-gallery-item:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.ws-gallery-item.is-active {
border-color: #4a90e2;
box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}
.ws-gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
/* Responsive gallery */
@media (max-width: 768px) {
.ws-gallery-item {
width: 80px;
height: 80px;
}
.ws-gallery-grid {
gap: 0.5rem;
}
}
#baseline-comparison-section {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
/* Fixed frame for comparison images */
.ws-card {
height: fit-content;
width: fit-content;
max-width: 90vw;
margin: 0 auto;
display: flex;
flex-direction: column;
border-radius: 16px;
overflow: hidden;
padding: 0;
}
.ws-card-body {
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: fit-content;
padding: 0;
margin: 0;
}
.ws-card-body img {
width: auto;
height: auto;
max-width: 100%;
max-height: 600px;
object-fit: contain;
display: block;
border-radius: 12px;
margin: 0;
padding: 0;
}
/* Ensure columns maintain consistent height */
.columns.is-variable {
align-items: stretch;
}
.ws-card-body-relative {
flex: 1;
position: relative;
display: inline-block;
align-items: center;
justify-content: center;
}
/* Ensure the frame stays consistent across different images */
#ws-image-left,
#ws-image-right {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
/* Ensure twentytwenty slider fits based on image dimensions */
#ws-comparison-slider {
width: fit-content;
height: auto;
max-height: 590px;
margin: 0;
padding: 0;
line-height: 0; /* Remove inline spacing */
font-size: 0; /* Remove inline spacing */
}
#ws-comparison-slider img {
width: auto;
height: auto;
max-height: 590px;
object-fit: contain;
border-radius: 12px;
display: block;
margin: 0;
padding: 0;
vertical-align: bottom; /* Remove inline element gap */
}
.ws-card-body-relative .twentytwenty-container {
height: 100%;
line-height: 0; /* Remove inline spacing */
font-size: 0; /* Remove inline spacing */
}
.twentytwenty-container * {
line-height: 0; /* Apply to all children */
vertical-align: bottom; /* Remove gaps */
}
#ws-image-baseline,
#ws-image-windowseat {
border-radius: 12px;
display: block;
vertical-align: bottom; /* Remove inline element gap */
}