/* ==================== SETTINGS PANEL ==================== */
/* Settings panel specific styles */
#settingsPanel {
    background: #ffffff;
}

/* Fixed footer for settings page */
.settings-footer-fixed {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 0;
    background: #ffffff;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

/* Settings checkboxes - Custom black checkboxes */
#settingsPanel input[type="checkbox"] {
    accent-color: #000000;
}

#settingsPanel input[type="checkbox"]:checked {
    background-color: #000000;
    border-color: #000000;
}

#settingsPanel input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Editable field styles */
.editable-field-container {
    position: relative;
}

.editable-field-container .edit-icon {
    transition: opacity 0.2s ease;
}

.editable-field-container:hover .edit-icon {
    opacity: 1 !important;
}

.editable-input {
    transition: all 0.2s ease;
}

.editable-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Hover effect for editable text */
.editable-field-container:hover .editable-text {
    color: #475569;
}

.editable-field-container.group:hover {
    background-color: rgba(248, 250, 252, 0.5);
    transition: background-color 0.2s ease;
}

/* Workspace list in settings */
.settings-workspace-item {
    border: none;
    cursor: pointer;
    background: none;
}

/* ==================== SETTINGS DROPDOWNS (parties multi / workspace single) ==================== */

.sdd {
    position: relative;
}

.sdd-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
}

.sdd-trigger:hover {
    border-color: #94a3b8;
}

.sdd.open .sdd-trigger {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.sdd-trigger-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sdd-trigger-label.placeholder {
    color: #94a3b8;
}

.sdd-chevron {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sdd.open .sdd-chevron {
    transform: rotate(180deg);
}

.sdd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
}

.sdd-menu.hidden {
    display: none;
}

.sdd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s ease;
    text-align: left;
}

.sdd-item:hover {
    background: #f8fafc;
}

.sdd-item.selected {
    background: #f1f5f9;
}

.sdd-item-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.sdd-item.selected .sdd-item-label {
    font-weight: 600;
    color: #0f172a;
}

/* Custom checkbox square for multi-select rows (wraps a real checkbox) */
.sdd-checkbox {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sdd-checkbox input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.sdd-checkbox .sdd-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
    pointer-events: none;
}

.sdd-checkbox input:checked + .sdd-box {
    background: #0f172a;
    border-color: #0f172a;
}

.sdd-checkbox .sdd-box svg {
    width: 10px;
    height: 10px;
    stroke: #ffffff;
    opacity: 0;
}

.sdd-checkbox input:checked + .sdd-box svg {
    opacity: 1;
}

/* Single-select check mark (workspace) */
.sdd-check {
    width: 14px;
    height: 14px;
    color: #0f172a;
    flex-shrink: 0;
}

/* Avatar tile inside dropdown rows (workspace) */
.sdd-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Selected-party chips under the trigger */
.sdd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.sdd-chips:empty {
    display: none;
}

.sdd-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 3px 6px 3px 10px;
    font-size: 11px;
    color: #334155;
}

.sdd-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sdd-chip-x {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.12s ease;
}

.sdd-chip-x:hover {
    background: #e2e8f0;
    color: #475569;
}

.sdd-chip-x svg {
    width: 9px;
    height: 9px;
}

/* Open upward for sections near the bottom of the scrollable form */
.sdd-menu.sdd-menu-up {
    top: auto;
    bottom: calc(100% + 6px);
}
