/* Basic reset */
.ec-checklist-wrap { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial; color:#222; margin:20px; }
.ec-header-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.ec-title h2 { margin:0; font-size:22px; }
.ec-sub { font-size:13px; color:#666; margin-top:4px; }

.ec-header-actions .ec-btn { margin-left:8px; }

.ec-btn { background:#fff; border:1px solid #e5e5e5; padding:8px 12px; border-radius:6px; cursor:pointer; font-size:14px; }
.ec-btn:hover { box-shadow:0 2px 6px rgba(0,0,0,0.06); }

.ec-main { display:flex; gap:20px; align-items:flex-start; }
.ec-sidebar { width:260px; }
.ec-tasks-area { flex:1; }

/* progress */
.ec-progress-wrap { background:#fff; padding:10px 0 18px; margin-bottom:10px; }
.ec-progress-label { font-size:13px; color:#444; margin-bottom:8px; }
.ec-progress-bar { background:#eee; height:8px; width:100%; border-radius:10px; overflow:hidden; }
.ec-progress-fill { background:#f7c948; height:100%; width:0; }

/* filters */
.ec-filter-block { margin-top:14px; background:#fff; padding:12px; border-radius:6px; border:1px solid #eee; }
.ec-filter-block h4 { margin:0 0 8px 0; font-size:14px; display:flex; justify-content:space-between; align-items:center; }
.ec-filter-list { list-style:none; padding:0; margin:0; }
.ec-filter-list li { margin-bottom:8px; }
.ec-filter-list a {
    color:#333;
    text-decoration:none;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:6px 6px;
    border-radius:4px;
    cursor:pointer;                 /* pointer for clarity */
}
.ec-filter-list a:hover {
    background: #f6f6f6;
    color: #111;
}

/* Active / selected filter styling */
.ec-filter-list a.active {
    background: #f7c948;
    color: #000;
    font-weight:700;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.03);
}
.ec-filter-list a.active .ec-pill-small,
.ec-filter-list a.active .ec-pill,
.ec-filter-list a.active .ec-count-all {
    background: rgba(0,0,0,0.06);
    color: #000;
}

/* tasks */
.ec-tasks-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
#ec-search { padding:8px; border-radius:6px; border:1px solid #ddd; width:260px; }

.ec-task-list { background:#fff; border-radius:6px; padding:8px; border:1px solid #e6e6e6; min-height:120px; }
.ec-task-card { display:flex; justify-content:space-between; align-items:flex-start; padding:14px; border-bottom:1px solid #f0f0f0; gap:12px; }
.ec-task-card:last-child { border-bottom:0; }

.ec-task-left { display:flex; gap:12px; align-items:flex-start; }
.ec-checkbox input { display:none; }
.ec-checkbox { position:relative; display:inline-block; width:22px; height:22px; border:2px solid #e0dede; border-radius:50%; cursor:pointer; margin-top:2px; background:#fff; }
.ec-checkbox input { position:absolute; left:0; top:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.ec-checkbox .ec-checkmark {
    position:relative;
    background:transparent;
    border-radius:50%;
    overflow:visible;
}

/* Task checkbox: grey check for todo, green filled circle + white check for completed */
.ec-task-card .ec-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #dcdcdc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    flex: 0 0 28px;
    margin-right: 12px;
    box-sizing: border-box;
}

/* Use FontAwesome check glyph inside the circle */
.ec-task-card .ec-checkbox::before{
    content: "\f00c"; /* fa-check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: #9aa0a6;      /* grey for todo */
    opacity: 1;
    line-height: 1;
}

/* Completed state: green filled circle with white check */
.ec-task-card.completed .ec-checkbox {
    background: #28a745;
    border-color: #28a745;
}
.ec-task-card.completed .ec-checkbox::before {
    color: #ffffff;
}

/* ensure sizes align */
.ec-checkbox, .ec-checkbox .ec-checkmark { width:22px; height:22px; }

.ec-task-main { max-width:800px; }
.ec-task-title { font-size:16px; font-weight:600; margin-bottom:6px; }
.ec-task-meta { font-size:13px; color:#666; margin-bottom:6px; display:flex; gap:10px; align-items:center; }
.ec-badge { background:#f7c948; padding:6px 8px; border-radius:4px; font-size:12px; font-weight:700; color:#000; }
.ec-due { color:#777; font-size:13px; }

.ec-task-desc .desc { margin-top:6px; color:#444; }
.ec-task-desc .note { margin-top:4px; color:#777; font-size:13px; }

.ec-task-actions { display:flex; gap:8px; align-items:center; }
.ec-task-actions button {
    background:transparent;
    border:0;
    cursor:pointer;
    font-size:16px;
    color:#666;
    width:34px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:6px;
}
.ec-task-actions button:hover { color:#222; background:#f7f7f7; }

/* Action buttons (edit/trash) as rounded white squares with subtle border and no hover effect) */
.ec-task-actions button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #efecec;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    box-shadow: none;
    transition: none;
    margin-left: 8px;
}
.ec-task-actions button i { font-size: 15px; }

/* modal */
.ec-modal { display:none; position:fixed; left:0; top:0; right:0; bottom:0; background: rgba(0,0,0,0.4); z-index:9999; align-items:center; justify-content:center; }
.ec-modal[aria-hidden="false"] { display:flex; }
.ec-modal-content { background:#fff; padding:18px; border-radius:8px; width:420px; max-width:95%; }
.ec-modal-content h3 { margin-top:0; }
.ec-modal-content label { display:block; margin-top:8px; font-size:13px; color:#333; }
.ec-modal-content input[type="text"], .ec-modal-content input[type="date"], .ec-modal-content select, .ec-modal-content textarea { width:100%; padding:8px; margin-top:6px; border-radius:6px; border:1px solid #ddd; }
.ec-modal-actions { margin-top:12px; display:flex; gap:8px; justify-content:flex-end; }

/* loading state (simple) */
.loading { opacity:0.6; position:relative; }
.loading:after { content:""; position:absolute; right:10px; top:10px; width:18px; height:18px; border:3px solid #eee; border-top-color:#333; border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin{ to { transform:rotate(360deg); } }

/* empty */
.ec-empty { padding:20px; color:#777; text-align:center; }

/* responsive */
@media(max-width:900px){
    .ec-main { flex-direction:column; }
    .ec-sidebar { width:100%; order:2; }
    .ec-tasks-area { order:1; }
}

/* Global AJAX loader */
#ec-global-loader { display:none; position:fixed; inset:0; z-index:99999; pointer-events:none; }
#ec-global-loader .ec-loader-backdrop { position:absolute; inset:0; background:rgba(255,255,255,0.6); backdrop-filter: blur(2px); }
#ec-global-loader .ec-loader-box { position:fixed; right:20px; top:20px; display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #eee; padding:10px 14px; border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,0.06); pointer-events:auto; transform:translateY(-6px); opacity:0; transition:all .16s ease; }
#ec-global-loader .ec-loader-text { color:#333; font-size:13px; font-weight:600; }
#ec-global-loader .ec-spinner { width:20px; height:20px; border-radius:50%; border:3px solid #eee; border-top-color:#f7c948; animation:ec-spin 0.9s linear infinite; }
@keyframes ec-spin { to { transform:rotate(360deg); } }

/* active state */
#ec-global-loader.active { display:block; pointer-events:none; }
#ec-global-loader.active .ec-loader-box { transform:translateY(0); opacity:1; }

/* optional: prevent page interactions while loading (uncomment if desired)
.ec-loading body { pointer-events: none; user-select: none; }
*/

/* NEW: Print-template button style for specific action buttons
   Matches the print-template buttons (white bg, gold border), no hover effect */
.ec-download,
.ec-print,
.ec-reset,
.ec-add-btn {
    background: #fff;
    border: 1px solid #f0c137; /* gold border as in print template */
    color: #111;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: none; /* remove default hover shadow */
    transition: none;  /* remove hover transition */
}

/* ensure icons have correct spacing */
.ec-download i,
.ec-print i,
.ec-add-btn i,
.ec-reset i {
    font-size: 14px;
    line-height: 1;
}

/* explicitly disable hover visual changes for these buttons */
.ec-download:hover,
.ec-print:hover,
.ec-reset:hover,
.ec-add-btn:hover {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* make Reset appear smaller (optional) */
.ec-reset {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 5px;
}

/* Vendor selection container */
#ec-vendor-selection {
    margin: 12px 0;
    padding: 14px;
    background: #fffaed;
    border: 1px solid #f0c137;
    border-radius: 8px;
}

.ec-vendor-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ec-vendor-search-btn,
.ec-vendor-modal-btn {
    flex: 1;
    background: #f7c948;
    border: none;
    color: #111;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: none;
}

.ec-vendor-search-btn:hover,
.ec-vendor-modal-btn:hover {
    background: #f7c948 !important;
    box-shadow: none !important;
}

/* Vendor search modal styling */
.ec-vendor-search-body {
    padding: 20px;
}

.ec-search-field {
    position: relative;
    margin-bottom: 16px;
}

.ec-search-field i {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #999;
    font-size: 14px;
}

.ec-search-field input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.ec-vendor-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

.ec-vendor-result-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .1s;
}

.ec-vendor-result-item:hover {
    background: #f9f9f9;
}

.ec-vendor-result-item.selected {
    background: #f7c948;
    font-weight: 600;
}

.ec-vendor-result-name {
    font-weight: 600;
    color: #111;
    font-size: 14px;
}

.ec-vendor-result-meta {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.ec-modal-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

.ec-btn-cancel,
.ec-btn-save {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: none;
}

.ec-btn-cancel {
    background: #fff;
    color: #333;
}

.ec-btn-cancel:hover {
    background: #f5f5f5 !important;
}

.ec-btn-save {
    background: #f7c948;
    border-color: #f0c137;
    color: #111;
}

.ec-btn-save:hover {
    background: #f7c948 !important;
}

/* Modal base */
.ec-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
}
.ec-modal .ec-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(1px);
    opacity: 1;
}
.ec-modal .ec-modal-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 96%; 
    max-width: 900px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    padding: 0;
    overflow: hidden;
    pointer-events: auto;
}

/* hidden by default */
.ec-modal[aria-hidden="true"] { display: none; opacity: 0; pointer-events: none; }

/* open state */
.ec-modal.open,
.ec-modal[aria-hidden="false"] {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* prevent body scroll when modal open */
body.ec-modal-open {
    overflow: hidden;
}

/* small helper: modal header/close button */
.ec-modal-header { padding: 14px 18px; display:flex; justify-content:space-between; align-items:center; background:#fff; }
.ec-modal-close { background:transparent; border:0; font-size:22px; line-height:1; cursor:pointer; }

/* Vendor selection (initially hidden, controlled by JS) */
#ec-vendor-selection {
    display: none;
    margin: 12px 0;
    padding: 14px;
    background: #fffaed;
    border: 1px solid #f0c137;
    border-radius: 8px;
}

/* Ensure the Add/Edit modal stays compact and centered (override broader rules) */
#ec-addModal .ec-modal-content {
    width: 420px;
    max-width: 95%;
    padding: 18px;
}

/* keep vendor search modal a bit larger but limited */
#ec-vendor-search-modal .ec-modal-content { max-width: 540px; padding: 0; }

/* ensure modals display:flex when visible (prevents layout shift) */
.ec-modal { display: none; position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.ec-modal[aria-hidden="false"], .ec-modal.open { display: flex; align-items: center; justify-content: center; pointer-events: auto; }

/* ensure modal content doesn't stretch full width on desktop */
.ec-modal .ec-modal-content { box-sizing: border-box; }

/* hide vendor-selection by default (safety) */
#ec-vendor-selection{ display:none; }


/* vendor selection close button (top-right) */
#ec-vendor-selection { position: relative; }
.ec-vendor-selection-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width:30px;
    height:30px;
    border-radius:6px;
    border:0;
    background:#fff;
    color:#444;
    font-size:18px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 1px 2px rgba(0,0,0,0.06);
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
/* no hover change (user requested no hover style) */
.ec-vendor-selection-close:hover { background:#fff; color:#444; box-shadow:none; }
/* ensure hidden/visible behaviours don't shift layout */
#ec-category[style*="display:none"] { display:none !important; }

/* category wrapper hides both label and select when hidden */
#ec-category-wrap { display:block; }
#ec-category-wrap[style*="display:none"] { display:none !important; }