
/* ==============================
   Interaction Report Filter UI (Compact)
   Developer     : Farhan Akhtar
   Last Modified : 14-01-2026
================================ */

.interaction-filter-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:8px;
    padding:10px 12px; /*  reduced */
    box-shadow:0 1px 6px rgba(0,0,0,0.04);
    margin-bottom:10px;
}

.interaction-filter-title{
    font-size:13px;
    font-weight:700;
    color:#134252;
    margin-bottom:8px; /*  reduced */
}

.filter-label{
    font-size:11px;
    font-weight:600;
    color:#134252;
    margin-bottom:4px; /*  reduced */
    display:block;
}

.filter-input,
.filter-select{
    width:100%;
    height:32px; /*  compact height */
    border:1px solid #d1d5db;
    border-radius:6px;
    padding:5px 8px; /*  reduced */
    font-size:12px;
    outline:none;
    background:#fff;
}

.filter-input:focus,
.filter-select:focus{
    border-color:#1F7437;
    box-shadow:0 0 0 2px rgba(31,116,55,0.10);
}

/*  Compact buttons */
.btn-filter-run{
    background:#1F7437;
    color:#fff;
    border:none;
    border-radius:6px;
    padding:7px 14px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    height:32px; /*  match input height */
}

.btn-filter-run:hover{
    background:#0c441c;
}

.btn-filter-reset{
    background:#f3f4f6;
    color:#111827;
    border:1px solid #d1d5db;
    border-radius:6px;
    padding:7px 14px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    height:32px; /*  match input height */
}

.btn-filter-reset:hover{
    background:#e5e7eb;
}

/*  Make buttons not too wide */
.interaction-filter-card .justify-content-end{
    margin-top:4px;
}

/*  Reduce bootstrap grid gap */
.interaction-filter-card .row.g-3{
    --bs-gutter-y: 10px;
    --bs-gutter-x: 12px;
}

/*  Select2 compact + matching filter height */
.select2-container .select2-selection--single{
    height:32px !important;
    border:1px solid #d1d5db !important;
    border-radius:6px !important;
}

.select2-container .select2-selection--single .select2-selection__rendered{
    line-height:30px !important;
    font-size:12px;
    padding-left:8px !important;
}

.select2-container .select2-selection--single .select2-selection__arrow{
    height:30px !important;
}


/* ==========================================================
   INTERACTION REPORT TABLE - FINAL RESPONSIVE UI
========================================================== */

#interaction_report_wrapper{
    width: 100%;
    overflow: hidden;
}

/*  Datatable body scroll (only when needed) */
.dataTables_scrollBody{
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/*  Fix header/body mismatch width */
.dataTables_scrollHeadInner,
.dataTables_scrollHeadInner table,
.dataTables_scrollBody table{
    width: 100% !important;
}

/*  table layout */
#interaction_report{
    width: 100% !important;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: auto !important; /* IMPORTANT */
}

/* Header style */
#interaction_report thead td{
    background: #fff;
    color: #222;
    font-weight: 600;
}

/* Rows */
#interaction_report tbody td{
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
    white-space: normal;
    word-break: break-word;
}

/* Zebra */
#interaction_report tbody tr:nth-child(even){
    background: #fafafa;
}

/* Hover */
#interaction_report tbody tr:hover{
    background: #f3f8ff;
}

/* Channel icon sizing */
.channel_icon img{
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

/*  Message column clean */
#interaction_report td:nth-child(5){
    max-width: 320px;
}

/*  show 3 lines only for message */
#interaction_report td:nth-child(5) a.openQaModal{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    font-weight: 500;
    color: #0d6efd;
}

#interaction_report td:nth-child(5) a.openQaModal:hover{
    text-decoration: underline;
}

/* Score column */
#interaction_report td:last-child{
    text-align: center;
    font-weight: 700;
    color: #1F7437;
}

/*  Datatable controls UI */
.dataTables_length select{
    height: 30px !important;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.dataTables_filter input{
    height: 30px !important;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 3px 10px;
}

/*  Buttons */
.dt-buttons .btn,
.dt-buttons button{
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

/* alignment of top controls */
.dataTables_length,
.dt-buttons{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /*  responsive */
}

/*  Mobile improvements */
@media (max-width: 768px) {
    #interaction_report{
        font-size: 11px;
    }

    #interaction_report thead th,
    #interaction_report tbody td{
        padding: 8px 6px;
    }

    #interaction_report td:nth-child(5){
        max-width: 220px;
    }
}



