/**
 * Components
 * Reusable UI components: buttons, cards, carousels, etc.
 */

/* Django Messages / Alerts */
.messages-container {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 3000;
    max-width: 500px;
}

.alert {
    position: relative;
    padding: 1rem 3rem 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.close-alert {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.close-alert:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .messages-container {
        top: 50px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn:hover,
.btn:focus {
    background: var(--accent-gold);
    color: #fff;
    transform: translateY(-2px);
}

.carousel__btn,
.view-work-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    background: transparent;
    transition: all 0.3s ease;
    letter-spacing: 0.4px;
}

.carousel__btn:hover,
.view-work-btn:hover {
    color: #fff;
    background: var(--accent-gold);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(var(--accent-gold-rgb), 0.5);
}

.carousel__btn:focus {
    outline: 2px solid rgba(var(--accent-gold-rgb), 0.6);
    outline-offset: 3px;
}

.quote-btn {
    background: transparent;
    color: var(--accent-gold);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--accent-gold);
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    margin-left: 4rem;
}

.quote-btn:hover {
    transform: scale(1.05);
}

.mobile-quote-btn {
    display: none;
}

@media (max-width: 1150px) {
    .mobile-quote-btn {
      appearance: none;
      -webkit-appearance: none;
      border: 2px solid var(--accent-gold);
      background: transparent;
      color: var(--accent-gold);

      display: block;
      width: 200px;
      box-sizing: border-box;

      margin: 1rem auto 0;
      padding: 0.6rem 1rem;
      border-radius: 6px;

      font-weight: 600;
      font-size: 0.9rem;
      letter-spacing: 0.3px;
      text-align: center;
      text-decoration: none;

      cursor: pointer;
      transition: all 0.3s ease;
    }
}

/* Carousel Component */
.carousel {
    height: min(70vh, 780px);
}

.carousel__slide {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 400ms ease;
}

.carousel__slide--active {
    opacity: 1;
}

.carousel__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel__arrow {
    z-index: 21;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.6rem 0.9rem;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    line-height: 1;
}

.carousel__arrow:hover {
    background: rgba(0,0,0,0.65);
}

.carousel__arrow--prev {
    left: 1rem;
}

.carousel__arrow--next {
    right: 1rem;
}

.carousel__dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
}

.carousel__dot--active {
    background: #fff;
}

/* Carousel Overlay */
.carousel__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 30, 0.4);
    color: #fff;
    padding: 3rem 4rem;
    border-radius: 12px;
    max-width: 700px;
    width: 80%;
    text-align: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 20;
}

.carousel__overlay h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.carousel__overlay p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ddd;
}

.carousel__overlay h2,
.carousel__overlay p,
.carousel__overlay .carousel__btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.carousel__slide--active .carousel__overlay h2 {
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 0.1s;
}

.carousel__slide--active .carousel__overlay p {
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 0.3s;
}

.carousel__slide--active .carousel__overlay .carousel__btn {
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 0.5s;
}

@media (max-width: 500px) {
    .carousel__arrow {
        display: none;
    }
}

/* Image Grid & Boxes */
.three-image-row {
    background: #000;
    padding: 4rem 0;
}

.image-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 1.2 / 1;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.image-grid > * {
    flex: 1 1 32%;
    max-width: 420px;
}

.image-box {
    position: relative;
    flex: 1 1 32%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 4%;
    left: 4%;
    right: 4%;
    bottom: 4%;
    background: rgba(30, 30, 30, 0.6);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.5rem;
}

.image-overlay h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.image-overlay p {
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    opacity: 1;
}

.service-list {
    list-style: disc;
    color: #fff;
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.service-list li {
    margin-bottom: 0.4rem;
}

.service-list li::marker {
    color: var(--accent-gold);
    font-size: 1.2em;
}

.image-overlay .view-work {
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin: 0.5rem 0 0 0;
    padding: 0;
    opacity: 1;
    text-align: left;
}

@media (max-width: 1150px) {
    .image-grid > * {
        flex: 1 1 45%;
    }
}

@media (max-width: 500px) {
    .image-grid > * {
        flex: 1 1 100%;
    }
}

/* Testimonial Cards */
.testimonials {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1150px) {
    .testimonials {
        grid-template-columns: repeat(2, 1fr);
    }
}

.testimonial {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.testimonial blockquote {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial figcaption {
    font-weight: 600;
    color: #555;
}

/* Home Page Testimonials */
#testimonials {
    background-color: #f7f7f7;
    padding: 60px 20px;
    overflow: hidden;
}

#testimonials h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #2c3e50;
}

.testimonial-cards-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.testimonial-cards {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
    padding: 0 10px;
}

.testimonial-cards.no-transition {
    transition: none;
}

/* Google Review Styling */
.testimonial-card.google-review {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    padding: 20px;
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

.testimonial-card.google-review:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonial-author-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: #202124;
    margin: 0;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-rating {
    display: flex;
    gap: 2px;
}

.star-rating .star {
    color: #fbbc04;
    font-size: 14px;
}

.review-time {
    font-size: 0.75rem;
    color: #70757a;
}

.google-icon {
    flex-shrink: 0;
}

.testimonial-content {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #3c4043;
    margin: 0;
    font-style: normal;
}

/* Legacy testimonial styling (keep for other pages) */
.testimonial-card:not(.google-review) {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
    flex: 1 1 300px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.testimonial-card:not(.google-review) p {
    margin: 0;
}

.testimonial-card:not(.google-review) .testimonial-content {
    font-style: italic;
    margin-bottom: 20px;
    color: #555;
}

.testimonial-card:not(.google-review) .testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-card:not(.google-review) .testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.testimonial-author-position {
    font-size: 0.85rem;
    color: #888;
}

/* Responsive Testimonial Cards */
/* Mobile: 1 card visible */
@media (max-width: 767px) {
    .testimonial-card.google-review {
        width: 350px;
        min-width: 350px;
        max-width: 350px;
    }

    .testimonial-cards-wrapper {
        padding: 0;
        margin: 0 auto;
        max-width: 350px;
    }

    .testimonial-cards {
        padding: 0;
    }
}

/* Tablet: 2 cards visible */
@media (min-width: 768px) and (max-width: 1139px) {
    .testimonial-card.google-review {
        width: 350px;
        min-width: 350px;
        max-width: 350px;
    }
}

/* Desktop: 3 cards visible (350px each + 20px gap = 1090px minimum) */
@media (min-width: 1140px) {
    .testimonial-card.google-review {
        width: 350px;
        min-width: 350px;
        max-width: 350px;
    }
}

/* Value Cards */
.values {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1150px) {
    .values {
        grid-template-columns: repeat(3, 1fr);
    }
}

.value-item {
    text-align: center;
    padding: 1rem;
}

.value-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 2px solid var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
}

/* Process Steps */
.process {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1150px) {
    .process {
        grid-template-columns: repeat(4, 1fr);
    }
}

.step {
    text-align: center;
    padding: 1rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    background-color: var(--accent-gold);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Statistics Counter Section */
.stats-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 4rem 2rem;
    margin: 0;
}

.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    display: block;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 400px;
}

.stat-plus {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: inline-block;
    margin-left: 0.2rem;
}

.stat-plus.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .stats-grid {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-item {
        padding: 1rem;
    }
}

/* Color Samples Grid */
.color-samples-section {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
}

.color-samples-section.partial-flakes {
    background-color: #ffffff;
}

.color-samples-section .section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2a2a2a;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.color-samples-section .section-description {
    text-align: center;
    font-size: 1rem;
    color: #666;
    margin-bottom: 2.5rem;
    margin-top: 0;
}

.color-samples-section.partial-flakes .section-title {
    margin-bottom: 2.5rem;
}

.color-samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.75rem;
    max-width: 1400px;
    margin: 0 auto;
}

.color-sample-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.popular-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-gold);
    color: #1a1a1a;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-sample-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.color-sample-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.color-sample-card h3 {
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: #2a2a2a;
    background: white;
}

/* Custom Options Card */
.custom-options-card {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    cursor: default;
}

.custom-options-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.custom-options-content {
    padding: 2rem;
    text-align: center;
}

.custom-options-card h3 {
    color: #2a2a2a;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    background: transparent;
    padding: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-title {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .color-samples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .color-samples-section {
        padding: 3rem 1rem;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    .lightbox-title {
        bottom: 20px;
        font-size: 1.2rem;
    }
}

/* Intro Section */
.intro-container {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f8f8;
}

.intro-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.intro-section .content {
    flex: 1;
    min-width: 280px;
    padding-right: 20px;
}

.intro-section .content h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: normal;
}

.intro-section .content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.intro-container .btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1f2937;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.intro-container .btn:hover {
    background-color: #4b5563;
}

.intro-section .image {
    flex: 1;
    min-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-section .image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Before/After Slider */
.before-after-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.after-image {
    clip-path: inset(0 50% 0 0);
}

.image-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.image-label-left {
    left: 20px;
}

.image-label-right {
    right: 20px;
}

.slider-control {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 3;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 3px solid #1f2937;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.slider-button::before,
.slider-button::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
}

.slider-button::before {
    left: 30%;
    transform: translate(-50%, -50%);
    border-width: 8px 12px 8px 0;
    border-color: transparent #1f2937 transparent transparent;
}

.slider-button::after {
    right: 30%;
    transform: translate(50%, -50%);
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent #1f2937;
}

.before-after-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: white;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .intro-section {
        flex-direction: column;
        padding: 20px;
    }

    .intro-section .content {
        padding-right: 0;
        margin-bottom: 20px;
        text-align: center;
    }

    .intro-section .image {
        width: 100%;
        max-width: 100%;
    }

    .before-after-slider {
        max-width: 100%;
        width: 100%;
        min-height: 300px;
    }
}

/* Floating Get Quote Button (Mobile Only) */
.floating-quote-btn {
    display: none;
    position: fixed;
    bottom: 1.75rem;
    right: 1.5rem;
    z-index: 2500;
    width: 64px;
    height: 64px;
    background: rgb(218, 201, 166);
    border: none;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.floating-quote-btn img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.floating-quote-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-quote-btn:active {
    transform: scale(1.02);
}

/* Show on all screen sizes */
.floating-quote-btn {
    display: flex;
}

/* First-visit tooltip */
.chat-tooltip {
    position: fixed;
    bottom: calc(1.75rem + 64px + 14px);
    right: 1.5rem;
    background: #fff;
    border-radius: 10px;
    padding: 0.6rem 2rem 0.6rem 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-size: 0.82rem;
    color: #1a1a1a;
    white-space: nowrap;
    z-index: 2498;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    display: none;
}

.chat-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Arrow pointing down toward the button */
.chat-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 26px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

.chat-tooltip-close {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0;
}

.chat-tooltip-close:hover {
    color: #1a1a1a;
}

.chat-tooltip {
    display: block;
}

/* Chat Overlay */
.chat-overlay {
    position: fixed;
    inset: 1.25rem;
    width: auto;
    z-index: 2499;
    visibility: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    overscroll-behavior: contain;
    transition: visibility 0.25s, opacity 0.25s ease, transform 0.25s ease;
    transform-origin: bottom center;
}

.chat-overlay.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-window {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    background: rgb(218, 201, 166);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 3px;
    flex-shrink: 0;
}

.chat-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.chat-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.chat-tagline {
    font-size: 0.7rem;
    color: #555;
}

.chat-close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 0;
    flex-shrink: 0;
}

.chat-close-btn:hover {
    color: #1a1a1a;
}

.chat-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.chat-msg.incoming {
    background: #f0ece3;
    border-radius: 14px 14px 14px 4px;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: #1a1a1a;
    max-width: 90%;
    line-height: 1.45;
}

.chat-msg.incoming p {
    margin: 0;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.chat-form input,
.chat-form textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #1a1a1a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.chat-form input:focus,
.chat-form textarea:focus {
    border-color: rgb(218, 201, 166);
}

.chat-form textarea {
    resize: none;
    height: 65px;
}

.chat-send-btn {
    background: #0071e3;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-weight: 700;
    font-size: 0.83rem;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
    width: 100%;
    font-family: inherit;
}

.chat-send-btn:hover {
    background: #005bbf;
}

.chat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-success-msg {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

