/*  Copyright (C) 2025 Technology Xchange Solutions  <txscorp.com>
 *  Author      Codex    <codex@txscorp.com>
 *  \file       barcodedisposition/css/barcodedisposition.css
 *  \ingroup    barcodedisposition
 *  \brief      Module-level style sheet for Barcode Disposition
 */

/* ----------------------------------------------------------------------
 * 1. Controls line-up
 *     Keep fields aligned exactly 40px from their labels.
 *     Helpful when tweaking spacing near the page title.
 * ---------------------------------------------------------------------- */
.field-label{display:inline-block;padding-right:40px;vertical-align:top;}
.value-cell{padding-left:0!important;}        /* was 40 px – remove it */

/* ----------------------------------------------------------------------
 * 2. Button appearance
 *     Ensures search and save buttons share the same size.
 * ---------------------------------------------------------------------- */
.save-button,
.searchBut {
    font-size:16px;
    padding:6px 20px;
    line-height:24px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.searchBut:hover {
    padding:6px 20px;
}

/* ----------------------------------------------------------------------
 * 3. Unified control width
 *     All selects and inputs in the editor/search form should match widths.
 * ---------------------------------------------------------------------- */
#scanForm select,
.bd-grid select,
.bd-grid input,
.results-table select,
.results-table input { 
    width:195px;
}

/* 3 (cont.) Notification bar width matches search box */
/* ----------------------------------------------------------------------
 * The message bar appears just below the title area. It uses the same
 * width as the search controls so messages line up neatly.
 * ---------------------------------------------------------------------- */
#msgBar {
    position: absolute;
    top: 115px;
    left: 57%;
    transform: translateX(-50%);
    text-align: center;
    min-width: 700px;
}
#msgBar.error{border-color:#c88;background:#ffdddd;}

/* ----------------------------------------------------------------------
 * 4. Results table display fixes
 *     Prevent scrollbars and ensure proper table display
 * ---------------------------------------------------------------------- */
.table-flex-container {
    scrollbar-gutter: unset !important;
    overflow: visible !important;
    max-width: none !important;
    width: auto !important;
}

.results-table {
    overflow: visible !important;
    max-width: none !important;
    width: auto !important;
}

.results-table table {
    overflow: visible !important;
    max-width: none !important;
    width: auto !important;
}

#editorArea table {
    border-collapse: collapse !important;
    table-layout: auto !important;
    /*width: auto !important;*/
    overflow: visible !important;
}

#editorArea td.field-label {
    padding-right: 20px !important;
    white-space: nowrap;
    vertical-align: text-top;
}

#editorArea td.value-cell {
    padding-left: 0 !important;
    vertical-align: top;
}

.results-table tr.after-header td {
    padding-top: 10px;
}

.pic-thumbs {overflow:visible;}
.pic-thumbs .thumb {display:inline-block;margin-right:8px;cursor:pointer;position:relative;z-index:1;} 
.pic-thumbs .thumb:hover {z-index:10;}
.pic-thumbs .thumb img{border:1px solid #ccc;padding:2px;transition:transform 0.18s cubic-bezier(.4,1.3,.5,1);}
.pic-thumbs .thumb:hover img{transform:scale(1.5);z-index:2;box-shadow:0 2px 12px rgba(0,0,0,0.18);background:#fff;}
.pic-box{border:1px solid #ccc;padding:10px;margin:15px;min-height:85%;}
.dropzone{
    border:2px dashed #bbb;
    padding:20px;
    cursor:pointer;
    color:#888;
    min-height:140px;
    text-align:center;
    display:flex;
    align-items:center;
    justify-content:center;
}
.dropzone.drag-hover{background:#f0f0f0}
.pic-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.8);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1000}
.pic-modal .pm-close{position:absolute;top:10px;right:20px;font-size:28px;color:#fff;cursor:pointer}
.pic-modal .pm-prev,.pic-modal .pm-next{position:absolute;top:50%;transform:translateY(-50%);font-size:40px;color:#fff;cursor:pointer;padding:0 15px;}
.pic-modal .pm-prev{left:10px}
.pic-modal .pm-next{right:10px}
.pm-img-container{position:relative;text-align:center}
.pm-img-container img{display:block;margin:auto;cursor:zoom-in;}
.pm-img-container.zoomed img{cursor:zoom-out;}
.pm-img-container .zoom-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:32px;display:none;pointer-events:none;}
.pm-img-container:hover .zoom-icon{display:block;}
.pm-img-container.zoomed .zoom-icon{display:none;}
.pm-actions{text-align:center;margin-top:8px;}
.pm-actions .butAction{display:inline-block;margin:0 6px;min-width:90px;}

/* ----------------------------------------------------------------------
 * 5. Stacked Notes System Styling
 * ---------------------------------------------------------------------- */
.notes-stack {
    width: 195px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background: #f9f9f9;
}

.note-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 8px;
    padding: 8px;
    position: relative;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-content {
    margin-bottom: 5px;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.4;
}

.note-meta {
    font-size: 11px;
    color: #666;
    border-top: 1px solid #f0f0f0;
    padding-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-user {
    font-weight: bold;
}

.note-date {
    color: #999;
    margin-left: 5px;
}

.note-actions {
    display: flex;
    gap: 3px;
}

.note-actions a {
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 2px;
    display: inline-block;
    font-size: 12px;
}

.note-actions a:hover {
    background: #f0f0f0;
}

.add-note-form {
    border-top: 2px solid #ddd;
    padding-top: 8px;
    margin-top: 8px;
}

.new-note-input {
    width: 100% !important;
    margin-bottom: 5px !important;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    resize: vertical;
}

.add-note-btn {
    font-size: 11px !important;
    padding: 4px 8px !important;
    line-height: 1.2 !important;
    width: 100%;
}

.edit-note-input {
    width: 100% !important;
    margin-bottom: 5px !important;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    resize: vertical;
}

.save-edit-btn, .cancel-edit-btn {
    font-size: 11px !important;
    padding: 2px 6px !important;
    margin-right: 5px !important;
    line-height: 1.2 !important;
}

.cancel-edit-btn {
    background: #f8f9fa !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
}

/* ----------------------------------------------------------------------
 * 6. Notes Modal System Styling
 * ---------------------------------------------------------------------- */
.notes-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.notes-modal .nm-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

.notes-modal .nm-close:hover {
    color: #ccc;
}

.notes-modal .nm-x-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    background: #333;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.notes-modal .nm-x-close:hover {
    background: #c00;
    color: #fff;
}

.notes-modal .nm-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    width: 90%;
}

.notes-modal .nm-content h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.notes-summary {
    cursor: pointer;
    color: #0066cc;
    text-decoration: underline;
    width: 195px;
    word-wrap: break-word;
}

.notes-summary:hover {
    color: #004499;
}

.note-count-badge {
    background-color: #003954; /* TXS Blue */
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    display: inline-block;
    margin-right: 5px;
}

.note-count-badge i {
    margin-right: 3px;
}

/* Modal notes styling overrides */
.notes-modal .notes-stack {
    width: 100%;
    max-height: none;
    border: none;
    background: transparent;
    padding: 0;
}

.notes-modal .note-item {
    margin-bottom: 15px;
    padding: 12px;
}

.notes-modal .new-note-input {
    width: 100% !important;
    height: 80px;
    margin-bottom: 10px !important;
}

.notes-modal .add-note-btn {
    width: auto;
    padding: 8px 15px !important;
    font-size: 14px !important;
}
