Fix chat modal flicker

This commit is contained in:
fatihalp 2026-03-08 23:17:02 +03:00
parent 4f0b6d0ef2
commit 5ce2b15d3d
2 changed files with 286 additions and 167 deletions

View File

@ -105,31 +105,33 @@
</div> </div>
</div> </div>
<div class="ld-header-actions"> <div class="ld-header-side">
<button <div class="ld-header-actions" aria-label="Listing actions">
type="button" <button
class="ld-header-action" type="button"
data-listing-share class="ld-header-action"
data-share-url="{{ $shareUrl }}" data-listing-share
data-share-title="{{ $displayTitle }}" data-share-url="{{ $shareUrl }}"
> data-share-title="{{ $displayTitle }}"
Share >
</button> Share
</button>
@auth @auth
<form method="POST" action="{{ route('favorites.listings.toggle', $listing) }}" class="ld-inline-form"> <form method="POST" action="{{ route('favorites.listings.toggle', $listing) }}" class="ld-inline-form">
@csrf @csrf
<button type="submit" class="ld-header-action {{ $isListingFavorited ? 'is-active' : '' }}"> <button type="submit" class="ld-header-action {{ $isListingFavorited ? 'is-active' : '' }}">
{{ $isListingFavorited ? 'Saved' : 'Save listing' }} {{ $isListingFavorited ? 'Saved' : 'Save listing' }}
</button> </button>
</form> </form>
@else @else
<a href="{{ route('login') }}" class="ld-header-action">Save listing</a> <a href="{{ route('login') }}" class="ld-header-action">Save listing</a>
@endauth @endauth
<button type="button" class="ld-header-action" onclick="window.print()"> <button type="button" class="ld-header-action" onclick="window.print()">
Print Print
</button> </button>
</div>
</div> </div>
</section> </section>
@ -138,42 +140,6 @@
<div class="lt-gallery-main"> <div class="lt-gallery-main">
<div class="lt-gallery-top"> <div class="lt-gallery-top">
<div class="ld-gallery-chip">Photo gallery</div> <div class="ld-gallery-chip">Photo gallery</div>
<div class="lt-gallery-utility">
<button
type="button"
class="lt-icon-btn"
data-listing-share
data-share-url="{{ $shareUrl }}"
data-share-title="{{ $displayTitle }}"
aria-label="Share listing"
>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9">
<path d="M15 8a3 3 0 1 0-2.83-4H12a3 3 0 0 0 .17 1L8.91 6.94a3 3 0 0 0-1.91-.69 3 3 0 1 0 1.91 5.31l3.27 1.94A3 3 0 0 0 12 15a3 3 0 1 0 2.82 4H15a3 3 0 0 0-.17-1l-3.26-1.94a3 3 0 0 0 0-3.12L14.83 10A3 3 0 0 0 15 10h0a3 3 0 0 0 0-2Z"/>
</svg>
</button>
@auth
<form method="POST" action="{{ route('favorites.listings.toggle', $listing) }}">
@csrf
<button
type="submit"
class="lt-icon-btn {{ $isListingFavorited ? 'is-active' : '' }}"
aria-label="{{ $isListingFavorited ? 'Remove from saved listings' : 'Save listing' }}"
>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9">
<path d="M12 21l-1.45-1.32C5.4 15.03 2 12.01 2 8.31 2 5.3 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08A6.04 6.04 0 0116.5 3C19.58 3 22 5.3 22 8.31c0 3.7-3.4 6.72-8.55 11.39L12 21z"/>
</svg>
</button>
</form>
@else
<a href="{{ route('login') }}" class="lt-icon-btn" aria-label="Sign in to save this listing">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9">
<path d="M12 21l-1.45-1.32C5.4 15.03 2 12.01 2 8.31 2 5.3 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08A6.04 6.04 0 0116.5 3C19.58 3 22 5.3 22 8.31c0 3.7-3.4 6.72-8.55 11.39L12 21z"/>
</svg>
</a>
@endauth
</div>
</div> </div>
@if($initialGalleryImage) @if($initialGalleryImage)
@ -382,22 +348,6 @@
<button type="button" class="lt-btn lt-btn-outline" disabled>No contact</button> <button type="button" class="lt-btn lt-btn-outline" disabled>No contact</button>
@endif @endif
</div> </div>
@if($listing->user && ! $isOwnListing)
@auth
<form method="POST" action="{{ route('favorites.sellers.toggle', $listing->user) }}" class="lt-action-form">
@csrf
<input type="hidden" name="redirect_to" value="{{ request()->fullUrl() }}">
<button type="submit" class="lt-btn lt-btn-outline">
{{ $isSellerFavorited ? 'Saved seller' : 'Save seller' }}
</button>
</form>
@else
<a href="{{ $loginRedirectRoute }}" class="lt-btn lt-btn-outline">Save seller</a>
@endauth
@elseif($isOwnListing)
<button type="button" class="lt-btn lt-btn-outline" disabled>Your account</button>
@endif
</div> </div>
</div> </div>

View File

@ -1893,9 +1893,10 @@ summary::-webkit-details-marker {
.ld-header-card { .ld-header-card {
display: grid; display: grid;
gap: 18px; gap: 24px;
padding: 18px 16px; padding: 22px 20px;
margin-bottom: 16px; margin-bottom: 16px;
align-items: start;
} }
.ld-header-ref { .ld-header-ref {
@ -1930,6 +1931,13 @@ summary::-webkit-details-marker {
flex-wrap: wrap; flex-wrap: wrap;
gap: 10px; gap: 10px;
align-items: center; align-items: center;
justify-content: flex-start;
}
.ld-header-side {
display: grid;
align-content: start;
justify-items: start;
} }
.ld-inline-form { .ld-inline-form {
@ -2117,6 +2125,18 @@ summary::-webkit-details-marker {
} }
@media (min-width: 721px) { @media (min-width: 721px) {
.ld-header-card {
grid-template-columns: minmax(0, 1fr) auto;
}
.ld-header-side {
justify-items: end;
}
.ld-header-actions {
justify-content: flex-end;
}
.lt-wrap { .lt-wrap {
padding: 22px 16px 56px; padding: 22px 16px 56px;
} }
@ -2256,6 +2276,10 @@ summary::-webkit-details-marker {
} }
@media (min-width: 900px) { @media (min-width: 900px) {
.ld-header-card {
grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}
.ld-stage { .ld-stage {
grid-template-columns: minmax(0, 1fr) 360px; grid-template-columns: minmax(0, 1fr) 360px;
grid-template-areas: grid-template-areas:
@ -2396,80 +2420,83 @@ summary::-webkit-details-marker {
@media (max-width: 720px) { @media (max-width: 720px) {
.lt-wrap { .lt-wrap {
padding: 18px 12px calc(130px + env(safe-area-inset-bottom, 0px)); padding: 14px 10px calc(94px + env(safe-area-inset-bottom, 0px));
} }
.lt-card { .lt-card {
border-radius: 24px; border-radius: 22px;
} }
.lt-media-card, .ld-header-card {
.lt-summary-card, gap: 14px;
.lt-detail-card { padding: 16px 14px;
padding: 14px; margin-bottom: 12px;
} }
.lt-media-card { .ld-header-title {
padding: 0; font-size: 1.28rem;
border: 0; line-height: 1.14;
border-radius: 0; letter-spacing: -0.04em;
background: transparent;
box-shadow: none;
backdrop-filter: none;
} }
.lt-gallery-main, .ld-header-ref {
.lt-gallery-main img, margin-bottom: 6px;
.lt-gallery-main-empty { font-size: 0.72rem;
min-height: 420px;
} }
.lt-gallery-main { .ld-header-meta {
border-radius: 0; gap: 6px 10px;
background: #2b2d31; margin-top: 10px;
box-shadow: none; font-size: 0.82rem;
} }
.lt-gallery-main::after { .ld-header-actions {
display: none; gap: 8px;
} }
.lt-gallery-main img { .ld-header-action {
padding: 0; min-height: 36px;
padding: 0 12px;
font-size: 0.82rem;
}
.ld-gallery-card,
.ld-summary-card,
.ld-seller-card,
.ld-tab-card {
padding: 12px;
}
.ld-stage {
gap: 12px;
}
.ld-gallery-card .lt-gallery-main,
.ld-gallery-card .lt-gallery-main img,
.ld-gallery-card .lt-gallery-main-empty {
min-height: 286px;
}
.ld-gallery-card .lt-gallery-main {
border-radius: 18px;
background: linear-gradient(180deg, #edf2f7 0%, #dbe3ee 100%);
}
.ld-gallery-card .lt-gallery-main img {
padding: 18px;
object-fit: contain; object-fit: contain;
} }
.lt-title { .ld-gallery-chip {
max-width: none; min-height: 30px;
font-size: 1.18rem; padding: 0 10px;
line-height: 1.45; font-size: 0.68rem;
letter-spacing: -0.02em;
}
.lt-price {
margin-top: 0;
font-size: 1.95rem;
}
.lt-overline,
.lt-overview-grid,
.lt-gallery-pills,
.lt-side-card,
.lt-contact-strip,
.lt-report,
.lt-policy {
display: none;
} }
.lt-gallery-top { .lt-gallery-top {
align-items: flex-start; align-items: flex-start;
} }
.lt-gallery-utility {
margin-left: auto;
}
.lt-icon-btn,
.lt-gallery-nav { .lt-gallery-nav {
border-color: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.14);
background: rgba(29, 29, 31, 0.52); background: rgba(29, 29, 31, 0.52);
@ -2478,37 +2505,89 @@ summary::-webkit-details-marker {
backdrop-filter: blur(12px); backdrop-filter: blur(12px);
} }
.lt-summary-card { .ld-summary-card {
position: relative; gap: 14px;
z-index: 3;
margin-top: -22px;
border-radius: 22px 22px 0 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background: rgba(255, 255, 255, 0.98);
} }
.lt-summary-card + .lt-detail-card { .ld-summary-head {
margin-top: 0; gap: 8px 14px;
border-top-left-radius: 0; align-items: flex-start;
border-top-right-radius: 0;
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
} }
.lt-summary-meta-row { .ld-summary-price {
margin-top: 14px; font-size: clamp(1.95rem, 10vw, 2.5rem);
padding-top: 14px;
} }
.lt-summary-meta-item { .ld-summary-date {
font-size: 0.82rem;
}
.ld-summary-location {
font-size: 0.92rem;
line-height: 1.4;
}
.lt-spec-row {
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
padding: 10px 0;
}
.lt-spec-row span {
font-size: 0.84rem; font-size: 0.84rem;
} }
.lt-overview-grid, .lt-spec-row strong {
.lt-feature-grid, font-size: 0.86rem;
.lt-video-grid, }
.lt-row-2 {
grid-template-columns: 1fr; .ld-seller-card {
gap: 12px;
}
.ld-seller-card .lt-actions {
display: none;
}
.ld-seller-links {
gap: 8px 12px;
}
.ld-seller-link {
font-size: 0.86rem;
}
.lt-contact-panel {
gap: 6px;
padding: 12px;
border-radius: 16px;
}
.lt-contact-primary {
font-size: 1rem;
}
.lt-contact-secondary {
font-size: 0.82rem;
}
.ld-tab-card {
margin-top: 14px;
}
.lt-tab-list {
gap: 6px;
margin-bottom: 12px;
}
.lt-tab-button {
min-height: 38px;
font-size: 0.82rem;
}
.lt-description {
font-size: 0.9rem;
line-height: 1.7;
} }
.lt-related-head { .lt-related-head {
@ -2517,12 +2596,44 @@ summary::-webkit-details-marker {
} }
.lt-rel-card { .lt-rel-card {
min-width: 220px; min-width: 176px;
width: 220px; width: 176px;
border-radius: 20px;
} }
.lt-rel-photo { .lt-rel-photo {
height: 156px; height: 132px;
}
.lt-rel-body {
padding: 12px;
}
.lt-rel-price {
font-size: 0.98rem;
}
.lt-rel-title {
font-size: 0.86rem;
min-height: 2.7em;
}
.lt-rel-city {
margin-top: 8px;
font-size: 0.78rem;
}
.lt-pill-wrap {
margin-top: 18px;
}
.lt-pill-title {
font-size: 1rem;
}
.lt-pill {
padding: 8px 12px;
font-size: 0.82rem;
} }
.lt-mobile-actions { .lt-mobile-actions {
@ -2532,19 +2643,18 @@ summary::-webkit-details-marker {
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: 45; z-index: 45;
padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)); padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
background: linear-gradient(180deg, rgba(245, 245, 247, 0) 0%, rgba(245, 245, 247, 0.88) 28%, rgba(245, 245, 247, 0.98) 100%); background: linear-gradient(180deg, rgba(245, 245, 247, 0) 0%, rgba(245, 245, 247, 0.88) 28%, rgba(245, 245, 247, 0.98) 100%);
backdrop-filter: blur(14px); backdrop-filter: blur(14px);
} }
.lt-mobile-actions-shell { .lt-mobile-actions-shell {
display: grid; display: block;
gap: 10px;
max-width: 28rem; max-width: 28rem;
margin: 0 auto; margin: 0 auto;
padding: 10px; padding: 8px;
border: 1px solid rgba(29, 29, 31, 0.08); border: 1px solid rgba(29, 29, 31, 0.08);
border-radius: 22px; border-radius: 20px;
background: rgba(255, 255, 255, 0.96); background: rgba(255, 255, 255, 0.96);
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
} }
@ -2552,29 +2662,88 @@ summary::-webkit-details-marker {
.lt-mobile-actions-row { .lt-mobile-actions-row {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px; gap: 8px;
} }
.lt-chat-widget { .lt-chat-widget {
right: 10px; right: 12px;
bottom: calc(104px + env(safe-area-inset-bottom, 0px)); bottom: calc(78px + env(safe-area-inset-bottom, 0px));
left: 10px; left: auto;
justify-items: stretch; justify-items: end;
} }
.lt-chat-panel { .lt-chat-panel {
width: 100%; width: min(360px, calc(100vw - 20px));
border-radius: 22px; border-radius: 20px;
} }
.lt-chat-launcher { .lt-chat-launcher {
max-width: 100%; min-width: 88px;
max-width: none;
min-height: 48px;
padding: 0 14px;
border-radius: 18px;
width: auto; width: auto;
box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}
.lt-chat-launcher-copy {
gap: 0;
}
.lt-chat-launcher-kicker {
color: var(--oc-text);
font-size: 0.82rem;
letter-spacing: 0.03em;
}
.lt-chat-launcher-name {
display: none;
}
.lt-chat-launcher-badge {
min-width: 22px;
height: 22px;
padding: 0 6px;
font-size: 0.72rem;
} }
.lt-chat-thread { .lt-chat-thread {
min-height: 220px; min-height: 180px;
max-height: 44vh; max-height: 34vh;
}
.lt-chat-head {
padding: 12px 14px 10px;
}
.lt-chat-name {
font-size: 0.95rem;
}
.lt-chat-meta {
font-size: 0.74rem;
}
.lt-chat-close {
width: 34px;
height: 34px;
}
.lt-chat-form {
grid-template-columns: minmax(0, 1fr) 42px;
gap: 8px;
padding: 10px 12px 12px;
}
.lt-chat-input {
min-height: 42px;
font-size: 0.88rem;
}
.lt-chat-send {
width: 42px;
height: 42px;
} }
} }