body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: url('/img/bg-card.jpg') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}


.container {
    width: 100%;
    max-width: 1000px;
    background: white;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.9), 0 0 0 6px rgba(255,255,255,0.3), 0 25px 70px rgba(0,0,0,0.25);
}

.header{ margin-bottom:30px; }

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}  
.logo-box{
    width:60px;
    height:60px;
    border-radius:12px;
    background:#f3eeff;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    flex-shrink:0;
}
.logo-box img{ width:100%; height:100%; object-fit:contain; }
.logo-placeholder{ font-size:28px; }
.header h1{ margin:0; font-size:32px; font-weight:600; }
.subtitle{ font-size:18px; color:#6b7280; margin-top:4px; }
.info{
    display:flex;
    gap:30px;
    flex-wrap:wrap;
    font-size:14px;
    color:#555;
    margin-top:10px;
}
.content{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
}
.services h3{ margin-bottom:15px; }
.service{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 18px;
    background:#f7f7f9;
    border-radius:10px;
    margin-bottom:10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.service-nome{ font-size:14px; font-weight:500; }
.service-meta{ display:flex; gap:12px; align-items:center; font-size:13px; color:#666; }
.service-prezzo{ color:#8150B9; font-weight:600; }
.chatbox{
    background:#fafafa;
    border-radius:12px;
    padding:25px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:12px;
}
.chatbox h3{ margin-top:0; }
.chatbox p{ color:#666; margin-bottom:25px; }
.chat-btn{
    background:#8150B9;
    color:white;
    border:none;
    padding:14px;
    font-size:16px;
    border-radius:30px;
    cursor:pointer;
    transition:.2s;
    font-family:'Poppins',sans-serif;
}
.chat-btn:hover{ background:#6f3fa6; }
@media(max-width:768px){
    .container{ padding:25px; }
    .content{ grid-template-columns:1fr; }
    .header h1{ font-size:26px; }
}

.show-more-btn {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.show-more-btn:hover {
    background: #f9fafb;
}
.container {
    position: relative;
    overflow: hidden;
}

.show-more-btn {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.show-more-btn:hover {
    background: #f9fafb;
}

.panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 100;
}
.panel-backdrop.open {
    display: block;
}

.bottom-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    border-top: 1px solid #f0f0f0;
    padding: 12px 20px 0;
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.28s ease;
    max-height: calc(100dvh - var(--cta-offset, 100px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.bottom-panel > :last-child {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--cta-offset, 100px));
}
.bottom-panel.open {
    transform: translateY(0);
}

.panel-handle {
    width: 36px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    margin: 0 auto 14px;
}
.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 500;
    color: #111;
}
.panel-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}


.header-info-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
}

.status-open {
    background: #f0fdf4;
    border: 0.5px solid #bbf7d0;
    color: #15803d;
}

.status-closed {
    background: #fef2f2;
    border: 0.5px solid #fecaca;
    color: #b91c1c;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-open .status-dot { background: #22C55E; }
.status-closed .status-dot { background: #ef4444; }
.status-open .status-info-icon { color: #15803d; }
.status-closed .status-info-icon { color: #b91c1c; }

.orari-dropdown {
    font-size: 12px;
    color: #6b7280;
    padding: 7px 11px;
    background: #f7f5fb;
    border-radius: 8px;
    border: 0.5px solid #e8e0f5;
}

.info-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.info-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f5f0ff, #ede9fe);
    border: 0.5px solid #d8b4fe;
    border-radius: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: #3b0764;
    transition: opacity 0.15s;
}

.info-tab:hover { opacity: 0.8; }

.info-tab-label {
    font-size: 10px;
    color: #7c3aed;
    margin-bottom: 1px;
}

.info-tab-value {
    font-size: 12px;
    font-weight: 600;
    color: #3b0764;
}

@media (max-width: 640px) {
    .header-info-right {
        align-items: flex-start;
        width: 100%;
    }
    
    }
	.info-tabs {
        width: 100%;
}

/* Su mobile torna in verticale */
@media (max-width: 640px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-info-right {
        align-items: flex-start;
        width: 100%;
    }

    .info-row {
        justify-content: flex-start;
    }
}
:root{
  --p:#8150B9;
  --p-dark:#6a3d9e;
  --p-light:#f3eeff;
  --text:#111118;
  --muted:#6b7280;
  --border:#e8e0f5;
  --bg:#f7f5fb;
  --white:#fff;
  --r:14px;
}
.overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(4px);z-index:500;align-items:flex-end;justify-content:center}
.overlay.open{display:flex}
.chat-panel{width:100%;max-width:480px;height:88vh;background:#fff;border-radius:22px 22px 0 0;display:flex;flex-direction:column;overflow:hidden;animation:slideUp .35s cubic-bezier(.34,1.56,.64,1) both;position:relative}
@media(min-width:600px){.overlay{align-items:center;padding:20px}.chat-panel{border-radius:22px;height:82vh}}
@keyframes slideUp{from{transform:translateY(60px);opacity:0}to{transform:translateY(0);opacity:1}}
.chat-head{background:linear-gradient(135deg,#7c3aed,#a855f7);padding:18px 18px 36px;display:flex;align-items:center;justify-content:center;position:relative;flex-shrink:0}
.chat-head-avatar{width:58px;height:58px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;box-shadow:0 4px 16px rgba(0,0,0,.15);position:absolute;bottom:-29px;left:50%;transform:translateX(-50%);z-index:2}
.chat-close{position:absolute;top:12px;right:14px;background:rgba(255,255,255,.2);border:none;color:#fff;width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center;transition:background .2s}
.chat-close:hover{background:rgba(255,255,255,.35)}
.chat-body-header{background:#fff;padding:44px 24px 18px;border-bottom:1px solid #f0eaf8;flex-shrink:0}
.chat-body-header h3{font-size:16px;font-weight:700;color:#111;margin-bottom:6px}
.chat-body-header p{font-size:13.5px;color:#333;line-height:1.55}
.luami-brand{color:#8150B9;font-weight:700}
.chat-msgs{flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth;background:#f7f5fb}
.msg{max-width:82%;padding:11px 15px;border-radius:18px;font-size:13.5px;line-height:1.5;animation:msgIn .25s ease both;white-space:pre-line}
@keyframes msgIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.msg-bot{background:#fff;color:#111;border-bottom-left-radius:4px;align-self:flex-start;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.msg-user{background:#8150B9;color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
.chat-actions{padding:10px 14px;display:flex;flex-wrap:wrap;gap:7px;border-top:1px solid #f0eaf8;background:#fff;min-height:54px;max-height:160px;overflow-y:auto;flex-shrink:0;}

@media (max-width:600px){
  .chat-actions{ max-height:30vh; }
}
.choice-btn{background:#fff;border:1.5px solid #e8e0f5;border-radius:100px;padding:8px 16px;font-size:13px;font-weight:500;color:#111;cursor:pointer;transition:all .18s;font-family:'Poppins',sans-serif;margin-top:10px}
.choice-btn:hover{border-color:#8150B9;color:#8150B9;background:#f3eeff}
.chat-input-row{padding:12px 14px;display:flex;gap:8px;border-top:1px solid #e8e0f5;background:#fff;flex-shrink:0;align-items:center}
.chat-input{flex:1;border:1.5px solid #e8e0f5;border-radius:100px;padding:11px 18px;font-size:13.5px;font-family:'Poppins',sans-serif;outline:none;transition:border-color .2s;background:#f7f5fb;color:#111}
.chat-input:focus{border-color:#8150B9;background:#fff}
.chat-input::placeholder{color:#aaa}
.chat-send{background:#8150B9;border:none;border-radius:100px;color:#fff;cursor:pointer;padding:11px 22px;font-size:13.5px;font-weight:600;font-family:'Poppins',sans-serif;flex-shrink:0;transition:opacity .2s}
.chat-send:hover{opacity:.85}
.typing{display:flex;align-items:center;gap:4px;padding:4px 0}
.typing span{width:6px;height:6px;background:#bbb;border-radius:50%;animation:td 1.1s ease infinite}
.typing span:nth-child(2){animation-delay:.18s}
.typing span:nth-child(3){animation-delay:.36s}
@keyframes td{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-5px);opacity:1}}
.lb{display:none;position:fixed;inset:0;background:rgba(0,0,0,.88);z-index:999;align-items:center;justify-content:center}
.lb.open{display:flex}
.lb img{max-width:92vw;max-height:90vh;border-radius:10px;object-fit:contain}
.lb-x{position:absolute;top:18px;right:18px;background:rgba(255,255,255,.1);border:none;color:#fff;width:38px;height:38px;border-radius:50%;font-size:20px;cursor:pointer}

@media (max-width: 600px) {

    .overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .chat-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

.chat-head {
  position: relative;
}

    .chat-msgs {
        flex: 1 !important;
        overflow-y: auto !important;
    }

    .chat-input-row {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
    }

    .chat-input {
        min-width: 0 !important;
        flex: 1 !important;
        font-size: 16px !important; /* evita zoom iOS */
    }

    .chat-send {
        flex-shrink: 0 !important;
    }

    body.chat-open {
        overflow: hidden !important;
    }
}

.qb-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f5f0ff, #ede9fe);
    border: 1px solid #d8b4fe;
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 12px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.qb-banner { display: none; }

@media (min-width: 768px) {
    .qb-banner { display: flex; }
}

@media (min-width: 768px) {
    .chatbox {
        grid-column: 2;
        grid-row: 1;
    }
    .qb-banner {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }
    .services {
        grid-column: 1;
        grid-row: 1 / 3;
    }
}

.qb-banner:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(129,80,185,0.15); }
.qb-banner-icon { font-size: 24px; }
.qb-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.qb-banner-text strong { font-size: 13px; color: #1a1a2e; }
.qb-banner-text span { font-size: 11px; color: #666; }
.qb-banner-arrow { font-size: 20px; color: #8150B9; font-weight: 700; }

.qb-fab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 0 22px 22px 0;
    background: #8150B9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    z-index: 999;
    animation: qb-pulse 2s infinite;
}

.qb-fab-tooltip {
    position: fixed;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 0.5px solid #d8b4fe;
    color: #1a1a2e;
    font-size: 13px;
    padding: 14px;
    border-radius: 14px;
    width: 220px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    box-shadow: 0 4px 16px rgba(129,80,185,0.15);
}

.qb-fab-tooltip strong {
    font-size: 13px;
    color: #1a1a2e;
    display: block;
    margin-bottom: 6px;
}

.qb-fab-tooltip p {
    font-size: 12px;
    color: #555;
    margin: 0 0 10px;
    line-height: 1.5;
}

.qb-fab-tooltip button {
    width: 100%;
    padding: 8px;
    background: #8150B9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

@keyframes qb-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(129,80,185,0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(129,80,185,0); }
    100% { box-shadow: 0 0 0 0 rgba(129,80,185,0); }
}


@media (min-width: 768px) {
    .qb-fab { display: none !important; }
    .qb-fab-tooltip { display: none !important; }
}

/* Nuova card mobile */
@media (max-width: 767px) {
    body {
        align-items: flex-start;
    }
    .container {
        min-height: 100dvh;
        border-radius: 0;
        padding: 20px 20px 0;
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }
    .content {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 90px;
    }
    .chatbox {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 0.5px solid #e8e0f5;
        padding: 12px 16px 20px;
        z-index: 200;
    }
    .chatbox h3 {
        display: none;
    }
}


.info-icon-btn {
    cursor: pointer;
    font-size: 15px;
    color: #9ca3af;
    line-height: 1;
    user-select: none;
}
.info-icon-btn:hover { color: #8150B9; }
.orari-dropdown {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
    padding: 8px 12px;
    background: #f7f5fb;
    border-radius: 8px;
    border: 0.5px solid #e8e0f5;
}


.container.dark {
    background: linear-gradient(160deg, #1a0f35 0%, #0f0b1e 100%);
    color: #F2F2F3;
    border-color: rgba(129,80,185,0.25);
    box-shadow: 0 0 0 1px rgba(129,80,185,0.15), 0 25px 70px rgba(0,0,0,0.6);
}
.container.dark .header h1 { color: #F2F2F3; }
.container.dark .header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(129,80,185,0.35) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.container.dark .subtitle { color: #9B9BAA; }
.container.dark .services h3 { color: #F2F2F3; }
.container.dark .service {
    background: rgba(255,255,255,0.04);
    border: 0.5px solid rgba(129,80,185,0.2);
    border-left: 2.5px solid #8150B9;
    border-radius: 0 10px 10px 0;
}
.container.dark .service-nome { color: #E2E2E8; }
.container.dark .service-meta { color: #6B6B7A; }
.container.dark .chatbox {
    background: rgba(129,80,185,0.08);
    border: 1px solid rgba(129,80,185,0.25);
}
.container.dark .chatbox h3 { color: #F2F2F3; }
.container.dark .show-more-btn {
    border-color: #2A2A32;
    color: #6B6B7A;
    background: transparent;
}
.container.dark .show-more-btn:hover { background: #222228; }
.container.dark .info-tab {
    background: linear-gradient(135deg, #1e1728, #1a1426);
    border-color: #3d2d5a;
}
.container.dark .info-tab-label { color: #9B6FD4; }
.container.dark .info-tab-value { color: #D4B8F0; }
.container.dark .status-chip.status-open {
    background: #0d2018;
    border-color: #1a4d30;
}
.container.dark .orari-dropdown {
    background: #222228;
    border-color: #2A2A32;
    color: #9B9BAA;
}
.container.dark .qb-banner {
    background: #1e1728;
    border-color: #3d2d5a;
}
.container.dark .qb-banner-text strong { color: #D4B8F0; }
.container.dark .qb-banner-text span { color: #9B6FD4; }
.container.dark .qb-banner-arrow { color: #8150B9; }
.container.dark .chat-btn {
    background: linear-gradient(135deg, #8150B9, #6030a0);
    box-shadow: 0 4px 20px rgba(129,80,185,0.4);
}

body.chat-open .qb-fab,
body.chat-open .qb-fab-tooltip {
    display: none !important;
}

@media (max-width: 768px) {
  #CookiebotWidget {
    display: none !important;
  }
}