Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* CoolCat Layout Styles */
/* Depends on variables defined in CoolCat.js */

/* Main Container */
#cool-cat-container { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    padding: 2px 8px 8px 8px; 
    margin-top: 1em; 
    background: var(--cc-bg); 
    border: 1px solid var(--cc-border); 
    position: relative; 
    min-height: 15px; 
}

/* Header & Toggle */
.cc-header { 
    display: flex; 
    justify-content: flex-end; /* Keeps toggle at the 'end' (right in LTR, left in RTL) */
    margin-block-start: -12px; /* Top margin */
    margin-block-end: 0;
}

.cc-toggle-btn { 
    background-color: var(--cc-bg); 
    border: 1px solid var(--cc-border); 
    color: var(--cc-primary); 
    border-radius: 12px; 
    padding: 2px 10px; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 0.78em; 
    transition: all 0.2s; 
}
.cc-toggle-btn.is-active { 
    background-color: var(--cc-tag-bg); 
    color: var(--cc-text); 
}

/* Tag Area */
.cc-tag-area { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    align-items: center; 
    padding-bottom: 5px; 
}

/* Pills */
.cc-tag { 
    display: inline-flex; 
    align-items: center; 
    background: var(--cc-tag-bg); 
    border: 1px solid transparent; 
    border-radius: 20px; 
    padding: 6px 12px; 
    font-size: 14px; 
    color: var(--cc-text); 
    user-select: none; 
    transition: all 0.2s; 
}
.cc-tag.is-new { background: var(--cc-new-bg); border: var(--cc-success); }
.cc-tag.is-mod { background: var(--cc-mod-bg); border: var(--cc-warn); }
.cc-tag.is-deleted { 
    background: var(--cc-del-bg); 
    border: var(--cc-del-border); 
    color: var(--cc-del-text); 
    text-decoration: line-through; 
    opacity: 0.8; 
}
.cc-tag.is-deleted a { color: inherit !important; }
.cc-tag.is-dup { 
    border: 2px dashed var(--cc-del-border) !important; 
    background-color: var(--cc-mod-bg); 
}

.cc-tag a { 
    text-decoration: none; 
    font-weight: 500; 
    margin-inline-end: 6px; /* Replaces margin-right */
    color: var(--cc-link); 
}
.cc-tag a:hover { text-decoration: underline; }
.cc-tag a.is-missing { color: var(--cc-link-red); } 
.cc-sortkey { 
    font-size: 0.9em; 
    opacity: 0.8; 
    margin: 0 8px; 
    font-family: monospace; 
    color: var(--cc-text); 
    white-space: pre; 
}

/* Pill Icons */
.cc-actions { display: flex; align-items: center; margin-inline-start: 2px; /* Replaces margin-left */ }
.cc-btn { 
    border: none; 
    background: transparent; 
    cursor: pointer; 
    color: var(--color-subtle, #a2a9b1); 
    padding: 2px 8px; 
    font-size: 20px; 
    line-height: 1; 
    border-radius: 4px; 
}
.cc-btn:hover { background: rgba(0,0,0,0.05); color: var(--cc-primary); }
.cc-btn.remove:hover { color: var(--cc-danger); }

/* Inputs */
.cc-input-group { 
    display: inline-flex; 
    align-items: center; 
    border: 2px solid var(--cc-primary); 
    border-radius: 20px; 
    overflow: hidden; 
    max-width: 100%; 
}
.cc-scope-select { 
    border: none; 
    padding: 6px 4px 6px 8px; 
    font-size: 14px; 
    cursor: pointer; 
    outline: none; 
    border-inline-end: 1px solid var(--cc-border); /* Replaces border-right */
    max-width: 44px; 
    appearance: none; 
    text-align: center; 
    height: 100%; 
}
.cc-input { 
    border: none; 
    padding: 6px 12px; 
    font-size: 14px; 
    outline: none; 
    min-width: 150px; 
    flex-grow: 1; 
}
.cc-add-btn { 
    border: 1px dashed var(--cc-border); 
    color: var(--cc-primary); 
    cursor: pointer; 
    padding: 6px 22px; 
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 20px; 
    line-height: 1;
}

.cc-inline-btn { 
    border: none; 
    background: transparent; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 1.2em; 
    padding: 0 8px; 
    line-height: 1; 
}
.cc-inline-btn:hover { background-color: rgba(0,0,0,0.05); }
.cc-confirm-btn { color: var(--cc-success); }
.cc-cancel-inline-btn { color: var(--cc-danger); border-inline-start: 1px solid #eee; /* Replaces border-left */ }

/* Toolbar */
.cc-toolbar { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    padding-top: 10px; 
    border-top: 1px solid var(--cc-border); 
    align-items: stretch; 
    justify-content: flex-end; 
}

#cc-summary-input { 
    flex-grow: 1; 
    min-width: 350px; 
    padding: 8px 10px; 
    border: 1px solid var(--cc-border); 
    border-radius: 4px; 
    font-size: 13px; 
}

.cc-btn-group { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    justify-content: flex-end; 
}

.cc-tool-btn { 
    padding: 8px 16px; 
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer; 
    font-size: 13px; 
    border: 1px solid var(--cc-border); 
    white-space: nowrap; 
    display: inline-flex; 
    align-items: center; 
    height: auto; 
}
.cc-btn-primary { background: var(--cc-primary); color: white; border: none; }
.cc-btn-primary:disabled { background: var(--cc-border); cursor: not-allowed; opacity: 0.7; }

/* .cc-btn-sec removed per clean-up */
.cc-btn-sec:hover { background: rgba(0,0,0,0.05); }

#cc-diff-view { 
    max-height: 300px; 
    overflow-y: auto; 
    background: var(--background-color-base, #fff); 
    border: 1px solid var(--cc-border); 
    padding: 10px; 
    margin-top: 10px; 
    font-size: 13px; 
    display: none; 
}

/* Suggestions */
.cc-suggestions { 
    position: absolute; 
    background: var(--background-color-base, #fff); 
    border: 1px solid var(--cc-border); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    z-index: 2000; 
    max-height: 250px; 
    overflow-y: auto; 
    border-radius: 4px; 
    min-width: 250px; 
    display: none; 
    color: var(--color-base, #202122); 
}
.cc-suggestion-item { 
    padding: 8px 14px; 
    cursor: pointer; 
    font-size: 14px; 
    border-bottom: 1px dotted var(--cc-border); 
}
.cc-suggestion-item:last-child { border-bottom: none; }
.cc-suggestion-item:hover, .cc-suggestion-item.selected { 
    background-color: var(--cc-new-bg); 
    color: var(--cc-primary); 
}
.cc-suggestion-meta { 
    font-size: 0.85em; 
    color: var(--color-subtle, #72777d); 
    margin-inline-start: 8px; /* Replaces margin-left */
    float: right; /* Note: float is physical. In RTL, this might need 'inline-end' if supported or 'float: inline-end' */
}
/* Fix for suggestion meta float in modern browsers */
.cc-suggestion-meta { float: inline-end; }

.cc-summary-wrapper { 
    display: flex; 
    align-items: stretch; 
    flex-grow: 1; 
    margin-right: 5px; 
    min-width: 0; 
    max-width: 100%; 
}
.cc-summary-wrapper input { 
    border-top-right-radius: 0 !important; 
    border-bottom-right-radius: 0 !important; 
    flex: 1 1 auto; 
    min-width: 50px; 
    width: auto; 
}
.cc-summary-wrapper button { 
    border-top-left-radius: 0 !important; 
    border-bottom-left-radius: 0 !important; 
    margin-left: -1px; 
    z-index: 1; 
    padding: 0 8px;
    flex: 0 0 auto; 
}

#cc-uncat-area {
    background: #bbccdd44;
}
.cc-uncat-wrapper {
  padding: 4px 4px;
  margin: 4px 4px;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Flash animation for redirects */
@keyframes cc-flash-anim {
0% { background-color: #00996655; }
80% { background-color: transparent; }
}
.cc-flash {
animation: cc-flash-anim 1.2s ease-in 2;
}