/* ============================================================
   chatbox_local_business.css
   Pannello "Local & Business"
   ============================================================ */

#lb2-panel {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    margin: 10px 15px;
    flex-shrink: 0;
    color: #eee;
    font-size: 0.88em;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    min-height: 400px;
}

/* ── HEADER ── */
#lb2-panel .lb2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}
#lb2-panel .lb2-title {
    color: #fff;
    font-weight: bold;
    font-size: 1em;
}
#lb2-panel .lb2-close {
    color: #aaa;
    cursor: pointer;
    font-size: 1.1em;
}
#lb2-panel .lb2-close:hover { color: #fff; }

/* ── BODY: 3 COLONNE ── */
#lb2-panel .lb2-body {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
    overflow: hidden;
}

/* ── COLONNA SX: rubrica ── */
#lb2-panel .lb2-left {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
#lb2-panel .lb2-rubrica-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#lb2-panel .lb2-rubrica-list::-webkit-scrollbar { width: 4px; }
#lb2-panel .lb2-rubrica-list::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

#lb2-panel .lb2-contact-row {
    display: flex;
    gap: 4px;
    align-items: center;
}
#lb2-panel .lb2-contact-name {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #eee;
    padding: 4px 7px;
    font-size: 0.82em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#lb2-panel .lb2-contact-name:hover { background: #2B87F2; border-color: #2B87F2; }
#lb2-panel .lb2-contact-name.lb2-selected { background: #1a3a5c; border-color: #2B87F2; }

#lb2-panel .lb2-contact-num {
    flex: 1.2;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    color: #aaa;
    padding: 4px 7px;
    font-size: 0.78em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lb2-panel .lb2-left-footer {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

/* ── COLONNA CENTRO: campi ── */
#lb2-panel .lb2-center {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 10px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#lb2-panel .lb2-center::-webkit-scrollbar { display: none; }

#lb2-panel .lb2-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#lb2-panel .lb2-label {
    color: #999;
    font-size: 0.76em;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
#lb2-panel .lb2-input,
#lb2-panel .lb2-select,
#lb2-panel .lb2-textarea {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #eee;
    padding: 6px 9px;
    font-size: 0.86em;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}
#lb2-panel .lb2-input:focus,
#lb2-panel .lb2-select:focus,
#lb2-panel .lb2-textarea:focus { border-color: #2B87F2; }
#lb2-panel .lb2-select option { background: #1a1a1a; }
#lb2-panel .lb2-textarea {
    resize: vertical;
    min-height: 64px;
    font-size: 0.82em;
    line-height: 1.4;
}
#lb2-panel .lb2-chr {
    color: #555;
    font-size: 0.72em;
    text-align: right;
}

/* ── COLONNA DX: anteprima ── */
#lb2-panel .lb2-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#lb2-panel .lb2-preview {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#lb2-panel .lb2-preview::-webkit-scrollbar { display: none; }

/* Card anteprima stile WA */
#lb2-panel .lb2-wa-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
}
#lb2-panel .lb2-wa-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.8em;
}
#lb2-panel .lb2-wa-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#lb2-panel .lb2-wa-info {
    padding: 10px 12px;
}
#lb2-panel .lb2-wa-brand {
    color: #aaa;
    font-size: 0.72em;
    text-align: right;
    margin-bottom: 4px;
}
#lb2-panel .lb2-wa-title {
    color: #fff;
    font-weight: bold;
    font-size: 0.92em;
    margin-bottom: 3px;
}
#lb2-panel .lb2-wa-desc {
    color: #aaa;
    font-size: 0.78em;
    line-height: 1.4;
    margin-bottom: 8px;
}
#lb2-panel .lb2-wa-player {
    background: #1a1a1a;
    border-radius: 5px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
#lb2-panel .lb2-wa-play {
    width: 28px;
    height: 28px;
    background: #2B87F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    cursor: pointer;
    flex-shrink: 0;
}
#lb2-panel .lb2-wa-duration {
    color: #aaa;
    font-size: 0.76em;
}
#lb2-panel .lb2-wa-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 1.1em;
    color: #555;
}
#lb2-panel .lb2-wa-msg {
    color: #ccc;
    font-size: 0.8em;
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
}
#lb2-panel .lb2-wa-btns {
    display: flex;
    gap: 6px;
}
#lb2-panel .lb2-wa-btn-primary {
    flex: 1;
    background: #2B87F2;
    border: none;
    border-radius: 5px;
    color: #fff;
    padding: 10px 7px;
    font-size: 0.82em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    line-height: 1.3;
}
#lb2-panel .lb2-wa-btn-sec {
    flex: 1;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #aaa;
    padding: 7px;
    font-size: 0.8em;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── FOOTER ── */
#lb2-panel .lb2-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid #333;
    flex-shrink: 0;
}
#lb2-panel .lb2-footer-price {
    color: #fff;
    font-weight: bold;
    font-size: 1em;
    flex: 1;
}
#lb2-panel .lb2-btn {
    padding: 6px 14px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #2a2a2a;
    color: #eee;
    font-size: 0.82em;
    cursor: pointer;
}
#lb2-panel .lb2-btn:hover { background: #3a3a3a; }
#lb2-panel .lb2-btn-primary {
    background: #2B87F2;
    border-color: #2B87F2;
    color: #fff;
    font-weight: bold;
}
#lb2-panel .lb2-btn-primary:hover { background: #1a6fd4; }
#lb2-panel .lb2-btn-success {
    background: #38a852;
    border-color: #38a852;
    color: #fff;
    font-weight: bold;
}

/* Filtri stato */
#lb2-panel .lb2-filter-row {
    display: flex;
    gap: 6px;
}
#lb2-panel .lb2-filter-btn {
    flex: 1;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #222;
    color: #aaa;
    font-size: 0.78em;
    cursor: pointer;
    text-align: center;
}
#lb2-panel .lb2-filter-btn.lb2-active {
    background: #2B87F2;
    border-color: #2B87F2;
    color: #fff;
    font-weight: bold;
}

/* Mobile */
@media (max-width: 768px) {
    #lb2-panel .lb2-body { flex-direction: column; overflow-y: auto; }
    #lb2-panel .lb2-left,
    #lb2-panel .lb2-center { width: 100%; border-right: none; border-bottom: 1px solid #333; }
    #lb2-panel .lb2-right { min-height: 300px; }
}
